Automatically Post Zendrop Invoices as Xero Expenses — Zero Manual Entry
This recipe pulls new invoices from Zendrop via its API and creates matching expense transactions in Xero automatically. Accountants save hours each week by eliminating copy-paste data entry between the two platforms.
- 1
Schedule the workflow to run hourly
Add a
Schedule Triggernode. SetRuletoEvery Hour. This polls Zendrop regularly so no invoice is missed. You can tighten to every 30 minutes during busy periods. - 2
Fetch new invoices from Zendrop
Add an
HTTP Requestnode namedGet Zendrop Invoices. SetMethodtoGETandURLtohttps://api.zendrop.com/v1/invoices. Add aHeadercalledAuthorizationwith valueBearer YOUR_ZENDROP_API_KEY. In the nodeNotes, paste your API key reminder. SetQuery Parameterstatustounpaidto fetch only new invoices. - 3
Extract and map invoice fields
Add a
Setnode namedMap Invoice Fields. Create fields:invoiceNumbermapped to{{ $json.invoice_number }},amountmapped to{{ $json.total_amount }},currencymapped to{{ $json.currency }},invoiceDatemapped to{{ $json.created_at }}, anddescriptionmapped toZendrop Order - {{ $json.order_id }}. These become the payload sent to Xero. - 4
Create the expense bill in Xero
Add an
HTTP Requestnode namedCreate Xero Bill. SetMethodtoPOSTandURLtohttps://api.xero.com/api.xro/2.0/Invoices. UnderAuthenticationchooseOAuth2and connect your Xero OAuth2 credential (Client ID and Secret from Xero Developer portal). SetBody Content TypetoJSONand paste the body:{ "Type": "ACCPAY", "InvoiceNumber": "{{ $json.invoiceNumber }}", "Date": "{{ $json.invoiceDate }}", "DueDate": "{{ $json.invoiceDate }}", "CurrencyCode": "{{ $json.currency }}", "LineItems": [{ "Description": "{{ $json.description }}", "Quantity": 1, "UnitAmount": {{ $json.amount }}, "AccountCode": "300" }] }. Update AccountCode300to match your Xero chart of accounts. - 5
Handle errors with a conditional check
Add an
Ifnode namedCheck Xero Response. SetConditionto{{ $json.Status }}equalsOK. Route thetruebranch to end (success). On thefalsebranch you can add a future notification node. This prevents silent failures when Xero rejects a malformed request.
Frequently asked questions
What Xero account code should I use for Zendrop expenses?
Use whichever account code your chart of accounts assigns to cost of goods sold or supplier purchases — commonly 300 or 310 in Xero's default chart. Ask your accountant to confirm the correct code before activating the workflow.
How do I avoid duplicate bills if the workflow runs multiple times?
Zendrop's API returns invoices filtered by status. Once you mark an invoice as paid or processed in Zendrop, it will no longer appear in the `unpaid` query. Alternatively, store processed invoice IDs in a Google Sheet and add an If node to skip already-seen IDs.
Does this workflow support multiple currencies?
Yes. The `Map Invoice Fields` step passes the `currency` field directly from Zendrop to Xero's `CurrencyCode`. Make sure the currency is enabled in your Xero organisation settings under Currencies before the first bill is created.