Post approved Trello bookkeeping drafts to Xero with receipt attachments
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (5)
- Trello Trigger
n8n-nodes-base.trelloTrigger - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Switch
n8n-nodes-base.switch
What it does
Quick overview This workflow listens for an “Approved” label on a Trello card, reads the AI draft bookkeeping JSON from card comments, and posts the corresponding transaction to Xero. It then adds a Xero deep link back to Trello, uploads receipt images as Xero attachments, and moves the card to Done. How it works 1. Triggers in Trello when a user adds the configured Approved label to a card on the target board. 2. Fetches the card’s comments, extracts the <!-- AIDRAFTJSON -- payload, validates required fields, and skips processing if a <!-- XEROURL -- sentinel comment already exists. 3. For SPENDMONEY and PAYBILL entries, pulls active Xero bank accounts and resolves the bank account and payment reference from the draft and any reviewer comments, pausing to request confirmation on the Trello card if values are ambiguous. 4. For PAYBILL entries, fetches open supplier bills from Xero and either matches the payment to a single ACCPAY invoice or asks the reviewer to confirm the bill in a Trello comment. 5. Builds and posts the appropriate Xero record (Bank Transaction, Bill, Payment, or Manual Journal) via the Xero API and generates a Xero deep link for the created entity. 6. Immediately writes the <!-- XEROURL -- deep link back to Trello, then downloads image attachments from the Trello card and uploads them to the Xero record as receipt attachments. 7. Posts a success comment on the Trello card, removes the For Review label, and moves the card to the configured Done list, or on failure comments the error details, adds the Xero Failed label, and removes Approved. Setup 1. Create Trello API credentials and Xero OAuth2 credentials in n8n, and set your Xero tenant ID (YOURXEROTENANTID) in all Xero HTTP requests. 2. Update the Trello board ID (YOURTRELLOBOARDID) and paste your Trello label/list IDs for Approved, For Review, Done, and Xero Failed (YOURTRELLOAPPROVEDLABELID, YOURTRELLOFORREVIEWLABELID, YOURTRELLODONELISTID, YOURTRELLOXEROFAILEDLABELID). 3. Import and activate the upstream workflow that writes the <!-- AIDRAFTJSON -- comment to cards (the companion “AI Draft/Commit” workflow), then activate this workflow. 4. Ensure Trello cards include receipt images as attachments if you want them uploaded to Xero, and optionally set TRELLON8NBOTMEMBERID as an environment variable to ignore bot-added Approved label events. Requirements - Workflow 1 imported and active — Import HITL Bookkeeping – AI Draft (01-…) first. This workflow reads the <!-- AIDRAFTJSON -- comment that Workflow 1 creates. Both workflows must be active. - Trello API: API key and token with access to your bookkeeping board - Xero OAuth2 API: Connected to the organisation you post into - Trello board setup: A bookkeeping board with labels and lists configured: 1) Approved (trigger label) 2) For Review, 3) Xero Failed 4) A Done list for completed cards - Placeholder IDs replaced — Update every YOUR placeholder in the workflow: YOURTRELLOBOARDID, YOURTRELLOAPPROVEDLABELID, YOURTRELLOFORREVIEWLABELID, YOURTRELLODONELISTID, YOURTRELLOXEROFAILEDLABELID, YOURXEROTENANTID (on all Xero HTTP Request nodes) - Xero prerequisites: Suppliers exist in Xero (drafts need a matched xerocontactid). Active bank accounts for SPENDMONEY and PAYBILL. Chart of accounts and tax types aligned with what Workflow 1 drafts. - Operational prerequisite: A card must already have an AI draft comment from Workflow 1. A reviewer adds the Approved label to trigger posting. - Optional: Set TRELLON8NBOTMEMBERID in n8n environment variables if your Trello account is used by the automation, so the workflow ignores bot-initiated label changes. Customization - Trello board structure: Point to a different board, Done list, or label names/IDs. Keep label semantics the same (Approved = post, For Review = pending review, Xero Failed = posting error). - HITL confirmation gates: When bank account, payment reference, or open bill is ambiguous, the workflow comments on the card and removes Approved. Reviewers reply