Are you receiving SNAP/EBT benefits? The Expensify.org/SNAP-VAX campaign is live and accepting new members. Learn more about receiving $50 for submitting a SNAP receipt and $50 for getting your COVID-19 vaccine here and join today!

{"responseMessage":"Could not process template","responseCode":500}

ashtonfei
ashtonfei Expensify Customer Posts: 3
edited May 1 in Integrations and API

I got the error message in the question title. The template works when I tested with Postman.


Here is the template:

<#if addHeader == true>

  ExpensifyID, Timestamp, Merchant, Amount, Card, User, Description, GL Code, Job Code, Cost Code, Last Updated, Receipt<#lt>

</#if>

<#assign reportNumber = 1>

<#assign expenseNumber = 1>

<#list reports as report>

  <#list report.transactionList as expense>

    <#if expense.modifiedMerchant?has_content>

      <#assign merchant = expense.modifiedMerchant>

    <#else>

      <#assign merchant = expense.merchant>

    </#if>

    <#if expense.convertedAmount?has_content>

      <#assign amount = expense.convertedAmount/100>

    <#elseif expense.modifiedAmount?has_content>

      <#assign amount = expense.modifiedAmount/100>

    <#else>

      <#assign amount = expense.amount/100>

    </#if>

    <#if expense.modifiedCreated?has_content>

      <#assign created = expense.modifiedCreated>

    <#else>

      <#assign created = expense.created>

    </#if>

    <#assign card = expense.cardNumber>

    ${expense.transactionID},<#t>

    ${created},<#t>

    ${merchant},<#t>

    ${amount},<#t>

    ${card},<#t>

    ${report.submitter.fullName},<#t>

    ${expense.comment},<#t>

    ${expense.ntag1GlCode},<#t>

    ${expense.ntag1GlCode},<#t>

    ${expense.ntag1GlCode},<#t>

    ${expense.inserted},<#t>

    ${expense.receiptFilename}<#lt>

    <#assign expenseNumber = expenseNumber + 1>

  </#list>

  <#assign reportNumber = reportNumber + 1>

</#list>

Answers