CONNECT APP
Build with Expensify
Business Management
- API key
MCP
Give your agent Expensify tools
Every Expensify action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Expensify account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "expensify",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Create Expense:
const result = await mcp.callTool({
name: "expensify-create-expense",
arguments: {
employeeEmail: "Employee Email",
currency: "Currency",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "expensify",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Create Expense:
result = await session.call_tool("expensify-create-expense", {
"employeeEmail": "Employee Email",
"currency": "Currency",
})API PROXY
Call the Expensify API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Expensify API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations",
})
// Any allowed Expensify endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9pbnRlZ3JhdGlvbnMuZXhwZW5zaWZ5LmNvbS9JbnRlZ3JhdGlvbi1TZXJ2ZXIvRXhwZW5zaWZ5SW50ZWdyYXRpb25z?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Expensify actions from your backend
Connect a user's Expensify account once, then run Create Expense on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "expensify-create-expense",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
expensify: { authProvisionId: "apn_xxxxxxx" },
employeeEmail: "Employee Email",
currency: "Currency",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="expensify-create-expense",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"expensify": {"authProvisionId": "apn_xxxxxxx"},
"employeeEmail": "Employee Email",
"currency": "Currency",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "expensify-create-expense",
"configured_props": {
"expensify": { "authProvisionId": "apn_xxxxxxx" },
"employeeEmail": "Employee Email",
"currency": "Currency"
}
}'TOOLS
Expensify actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Create Expense
actionCreates a new expense. See docs hereWritev0.0.7 -
Create Report
actionCreates a new report with transactions in a user's account. See docs hereWritev0.0.5 -
Export Report
actionExport Expensify reports to a file (csv, xls, xlsx, txt, pdf, json, xml). See the documentationWritev0.0.4 -
Export Report To PDF
actionExport a report to PDF. See docs hereRead-onlyv0.0.7 -
Get Report
actionRetrieve a single Expensify report by ID, returning a structured object with the report metadata plus its complete expense line-item list (per-expense amount, currency, merchant, date, category, receiptURL, etc.). NOT a file. Implemented via the Report Exporter with reportIDList set to the given ID and an embedded Freemarker JSON template read in memory. Use List Reports to discover report IDs. This action also covers per-expense reads: the returned transactionList contains full expense details, so a separate expense-by-ID lookup is unnecessary. See the documentationRead-onlyv0.0.2 -
List Expenses
actionList individual expenses (transactions) for an employee within a date range, returning a structured JSON array (each with amount, currency, merchant, created date, category, receiptURL, reportID). NOT a file. Implemented via the Report Exporter with an embedded Freemarker JSON template that flattens transactionList, read in memory. Use List Policies to discover valid IDs for the optional policyId filter. To read all expenses on one specific report, use Get Report instead. See the documentationRead-onlyv0.0.2 -
List Policies
actionRetrieves a list of policies. See the documentationRead-onlyv0.0.4 -
List Reports
actionSearch Expensify reports by state and/or date range and return a structured JSON array of report summaries (reportID, reportName, total, status, submitterEmail, etc.), NOT a file. Use this to find reports before acting on them. Under the hood this calls the Report Exporter with an embedded Freemarker JSON template and reads the result in memory (no /tmp file written). You must provide either a reportState or a startDate/endDate range. Note: OPEN reports cannot be returned when an employeeEmail filter is set (API restriction). Use List Policies to discover valid policy IDs for the optional policyId filter. Use Get Report to retrieve a single report's full expense line items. See the documentationRead-onlyv0.0.2 -
Reimburse Report
actionMark an APPROVED Expensify report asREIMBURSEDvia the Integration ServerreportStatusupdater. This is the only report-status transition the API supports — Approve and Reject are not available (attemptingAPPROVEDreturns responseCode 410). Use List Reports with reportState=APPROVED to find reports eligible for reimbursement. See the documentationWritev0.0.2
EVENTS
Expensify triggers
Event sources your backend can deploy for users and receive through a webhook.
No Expensify triggers are available yet.
- App slug
- expensify
- Authentication
- API key
- Categories
- Business Management
- Actions
- 9
- Triggers
- 0
- API proxy
- Available