Skip to main content

Expensify Connector

Expensify Expensify provides an industry leading expense management system.

Use the Expensify component to programmatically download expense report data for analysis or insertion into an accounting package, provision accounts for new hires, and much more.

API Documentation​

This component was built using the Expensify API Reference.

Connections​

Basic Connection​

Basic connection for Expensify

Create a new authentication connection. Refer to the following guide for more information.

Prerequisites​

  • Access to the Expensify integrations page at https://www.expensify.com/tools/integrations/

Setup Steps​

  1. Navigate to https://www.expensify.com/tools/integrations/ and select the option that creates a new set of credentials.
  2. A pair of credentials, partnerUserID and partnerUserSecret, is generated and shown on the page.
    1. Store the partnerUserID and partnerUserSecret pair in a secure location, as they are not shown again.

Configure the Connection​

Create a connection of type Basic Connection and enter the following values:

  • Enter the partnerUserID value into Partner User ID.
  • Enter the partnerUserSecret value into Partner User Secret.
InputCommentsDefault
Partner User IDThe partnerUserID generated on the Expensify Integrations page. See the Integration Server documentation for how to generate it.
Partner User SecretThe partnerUserSecret generated together with the Partner User ID. Expensify shows it only once, so store it securely when it is generated.

Triggers​

New Policies​

Checks for new policies in Expensify on a configured schedule.

InputCommentsDefault
Connection
Show New RecordsWhen true, newly created records are included in trigger results.true

Actions​

Create Expense​

Create expenses in a user’s account.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create expenses.expenses
Employee EmailThe email address of the Expensify user whose account the job runs against.
Transaction ListThe transactions to add to the report.

Create Expense Rule​

Create expense rules for a given employee on a given policy.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create an expense rule.expenseRules
Employee EmailThe email address of the Expensify user whose account the job runs against.
Policy IDThe unique identifier for the policy (workspace) the job runs against. The policy must be owned or shared by the user.
ActionsThe actions to perform on the expense rule.

Create Policy​

Creates a policy.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create a policy.policy
Policy NameThe name of the policy to create.
PlanSpecifies the plan of the policy. If not specified, the new policy will be created under the team plan.

Create Report​

Creates a report, with transactions, in a user’s account.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to create a report.report
Employee EmailThe email address of the Expensify user whose account the job runs against.
ReportThe report to create.
ExpensesThe expenses to add to the report.
Policy IDThe unique identifier for the policy (workspace) the job runs against. The policy must be owned or shared by the user.

Download Report​

Download reports that were generated with the Report Exporter job.

InputCommentsDefault
Connection
File NameThe name of a file generated from the exporter job.
File SystemThe file system the exporter job stored the file on. Use the same value the file was generated with.integrationServer

Export Report​

Export expense or report data in a configurable format for analysis or insertion into an accounting package.

InputCommentsDefault
Connection
File ExtensionSpecifies the format of the generated report. Note: if the 'pdf' option is chosen, one PDF file will be generated for each report exported.json
Start DateFilters out all reports submitted or created before the given date, whichever occurred last (inclusive). yyyy-mm-dd formatted date.2016-01-01
End DateFilters out all reports submitted or created after the given date, whichever occurred last (inclusive). yyyy-mm-dd formatted date.2016-01-01
Approved AfterFilters out all reports approved before, or on, the given date. Only applies to reports that have been approved. yyyy-mm-dd formatted date.
Mark as Exported Label FilterFilters out reports that have already been exported with this label.
Policy ID ListThe IDs of the policies to get information for.[]
Report ID ListThe IDs of the reports to get information for.[]
Additional FieldsAdditional optional fields: includes File Basename, Include Full Page Receipts PDF, Limit, and Test.
File BasenameThe name of the generated file(s) will start with this value, and a random part will be added to make each filename globally unique. If not specified, the default value export is used.
Include Full Page Receipts PDFWhen true, generated PDFs include full page receipts. This parameter is used only if fileExtension contains pdf.false
LimitMaximum number of reports to export.
TestWhen true, the actions defined in On Finish are not executed.false
Report StateThe report state to filter on. Only reports in this state are exported.REIMBURSED
Employee EmailThe email address of the Expensify user whose account the job runs against.
On FinishThe actions Expensify runs when the job finishes, such as emailing a summary of the changes to a list of recipients.
TemplateThe template parameter is used to format the Expensify data as you wish. It is based on the Freemarker language's syntax.
<#if addHeader == true>
Merchant,Original Amount,Category,Report number,Expense number<#lt>
</#if>
<#assign reportNumber = 1>
<#assign expenseNumber = 1>
<#list reports as report>
<#list report.transactionList as expense>
${expense.merchant},<#t>
<#-- note: expense.amount prints the original amount only -->
${expense.amount},<#t>
${expense.category},<#t>
${reportNumber},<#t>
${expenseNumber}<#lt>
<#assign expenseNumber = expenseNumber + 1>
</#list>
<#assign reportNumber = reportNumber + 1>
</#list>

Get Policy​

Gets specific information about listed policies.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to get information specific to policies.policy
Policy ID ListThe IDs of the policies to get information for.[]
FieldsSpecifies the fields of the policy to gather information for.[]
User EmailSpecifies the user to gather the policy list for. Third-party access must have been granted by that user/company domain beforehand.

List Cards​

Gets the list of credit cards that are assigned at the domain level.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to list the cards of a domain.domainCardList
DomainThe name of the domain to get the cards for.

List Policies​

Gets a list of policies with some relevant information about them.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to get a policy summary list.policyList
Admin OnlyWhen true, only returns the policies the user is an admin of.false
User EmailSpecifies the user to gather the policy list for. Third-party access must have been granted by that user/company domain beforehand.

Raw Request​

Send a raw HTTP request to the Expensify API.

InputCommentsDefault
Connection
URLThis input is not required as the Expensify API is a single endpoint.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.[]
File DataFile Data to be sent as a multipart form upload.[]
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.[]
Query ParameterA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.[]
HeaderA list of headers to send with the request.[]
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false

Update Employee​

Add, update or remove policy members.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to update an employeeemployees
EmployeesReplace or update the existing employees of the policy with the ones provided. If the employee does not exist, it will be created.
Provisioning OptionsOptions that control how the employee update is applied: dry run, primary policy assignment, and approval chain fixes.
Dry RunWhen true, employees are not actually provisioned or updated. Use this for development.false
Set Employee Primary PolicySpecifies the policy to set as the primary policy for the employee. If not specified, the employee will not have a primary policy.none
Fix Approval ChainsWhen true, Expensify automatically invites managers (submitsTo), managers’ managers, and so on to policies where they approve reports, if it is not their primary policy.true
On FinishThe actions Expensify runs when the job finishes, such as emailing a summary of the changes to a list of recipients.

Update Expense Rules​

Update a preexisting expense rule for a given employee on a given policy.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to update an expense rule.expenseRules
Employee EmailThe email address of the Expensify user whose account the job runs against.
Policy IDThe unique identifier for the policy (workspace) the job runs against. The policy must be owned or shared by the user.
Rule IDThe rule to update.
ActionsThe actions to perform on the expense rule.

Update Policy​

Manage categories, tags and report fields on a policy.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to update a policy.policy
Policy IDThe unique identifier for the policy (workspace) the job runs against. The policy must be owned or shared by the user.
Policy ID ListThe IDs of the policies to get information for.[]
CategoriesReplace or update the existing categories of the policy with the ones provided.
TagsReplace the existing tags of the policy with the ones provided.
Report FieldsReplace or update the existing report fields of the policy with the ones provided.

Update Report Status​

Update the status of a report.

InputCommentsDefault
Connection
TypeSpecifies to the job that it has to update the status of a list of reports.reportStatus
StatusThe status to change the reports to. At the moment, only Reimbursed is supported. Only reports in the Approved status can be updated to Reimbursed. All other reports will be ignored.REIMBURSED
FiltersThe filters to apply to the report list.