Approve Slack expense receipts and post invoices to Xero with Textract and OpenAI
Needs changesWhat this workflow does
This workflow has 20 nodes and runs on Slack events. Along the way it connects Slack and Google Sheets. It also calls api.xero.com over HTTP.
How it runs
Trigger: On Slack events.
- Filter: keeps only the items that match a condition
- Textract Expense Analysis (AWS Textract): uses AWS Textract
- Extract Textract Data (Code): runs custom JavaScript code
- AI Expense Categorization (OpenAI): work with chat
- Normalize Expense Data (Code): runs custom JavaScript code
- Check Validation Confidence (If): checks a condition and branches into true / false
- Read Manager from Sheets (Google Sheets): uses Google Sheets
- Request Clearer Photo in Slack (Slack): uses Slack
- Request Approval via Slack (Slack): send and wait for a reply
- If: checks a condition and branches into true / false
…plus 9 more steps. See the full node list below.
Services it uses
HTTP calls to: api.xero.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- OpenAI (legacy) in AI Expense Categorization: replace with OpenAI node (AI section).
- Also check Slack Trigger requires a signing secret on the Slack API credential.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| OpenAI (legacy) AI Expense Categorization | OpenAI node (AI section) |
Nodes used (10)
- Slack Trigger
n8n-nodes-base.slackTrigger - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Filter
n8n-nodes-base.filter - AWS Textract
n8n-nodes-base.awsTextract - OpenAI
n8n-nodes-base.openAi - Switch
n8n-nodes-base.switch
From the author
Quick overview This workflow captures expense receipt images shared in Slack, extracts key fields with AWS Textract, categorizes the spend with OpenAI, requests manager approval in Slack, then creates an authorised ACCPAY invoice in Xero with the receipt…