Library / Documents, PDF & OCR
Documents, PDF & OCR
Approve Slack expense receipts and post invoices to Xero with Textract and OpenAI
When something happens in a connected app, it reads and extracts data from documents with OpenAI / ChatGPT using AWS Textract, Google Sheets, Slack.
What it does
## Expense Receipt Approval (Slack -> Textract -> Manager Approval -> Xero) ### How it works This workflow starts when a receipt image is posted in Slack, verifies that it is an image, and uses AWS Textract plus GPT to extract, categorize, normalize, and validate the expense details. Valid receipts are routed to the employee’s manager for Slack approval, while unclear submissions receive a request for a better photo. Approved expenses are converted into either a Xero bill or expense claim, the receipt is attached to the Xero record, and the outcome is logged; rejected expenses are also notified and logged. ### Setup steps - Configure the Slack Trigger with the correct workspace, app permissions, event subscription, and channel or file-upload source for receipt images. - Add AWS credentials with permission to run Textract AnalyzeExpense on uploaded receipt files. - Configure OpenAI credentials for the GPT categorization step and review the prompt/category mapping used by the node. - Connect Google Sheets credentials and prepare sheets for manager lookup plus approved/rejected audit logging with the expected columns. - Configure Xero API/OAuth access for the HTTP Request nodes, including tenant ID, authorization headers, account codes, tax rates, and endpoints for bills, expense claims, and attachments. - Verify the custom Code nodes preserve required fields such as employee, amount, date, merchant, category, Slack file binary data, and Xero record IDs across branches. ### Customization Adjust the validation rules, GPT expense categories, manager lookup sheet, approval message format, and the switch logic that decides whether an approved item becomes a Xero bill or an expense claim.
The steps
- When Slack Message Received
- Extract Textract Data
- Normalize Expense Data
- Check Validation Confidence
- Request Clearer Photo in Slack
- Read Manager from Sheets
- Request Approval via Slack
- If Approval Granted
- Submit Expense Claim to Xero
- Link Receipt to Xero Invoice
- Append Approved to Sheets
- Announce Rejection in Slack
- Append Rejected to Sheets
- Filter Receipt Images
20 steps in total.
Similar automations
Documents, PDF & OCRExtract Text from Documents with AWS Textract and S34 stepsDocuments, PDF & OCRSend a File from AWS S3 to Textract3 stepsDocuments, PDF & OCRExtract Telegram File Text with AWS Textract to Airtable5 stepsDocuments, PDF & OCRExtract Text from Telegram Images with AWS Textract4 steps