Expensify.org is accepting proposals for new campaigns. Submit yours here by May 15th to receive up to $100,000 in funding for campaigns dismantling injustice related to: Climate Justice, Food Security, Housing Equity, Reentry Services, and Youth Advocacy.

Creating a template

Sree Expensify Customer Posts: 3

I am trying to run the following command and it is throwing the error "Couldn't read data from file "[email protected]_template.ftl". Wondering where/how can I create the template?

curl -X POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \
    -d 'requestJobDescription={
    }' \
    --data-urlencode '[email protected]_template.ftl'


Best Answer

  • Francois Laithier
    Francois Laithier Expensify Team Posts: 27 Expensify Team
    Accepted Answer

    Hi there,

    You can see the curl @ operator as a useful way to load the content of a parameter to pass in your POST request from a file, instead of putting it directly in the command line. Essentially, the line --data-urlencode '[email protected]_template.ftl' will instruct curl to load the content of the file expensify_template.ftl, URL-encode it, and pass it in the request under the name template.

    So for this example, you would store your template in a file called expensify_template.ftl in the same directory you're making the request from. If you want to store the template in a different directory, you can also specify its relative or absolute path, e.g. --data-urlencode '[email protected]/path/to/expensify_template.ftl'.

    For a quick test, you can use a pre-made sample templates from the documentation.


Sign In or Register to comment.