Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. When Slack Message Received
  2. Extract Textract Data
  3. Normalize Expense Data
  4. Check Validation Confidence
  5. Request Clearer Photo in Slack
  6. Read Manager from Sheets
  7. Request Approval via Slack
  8. If Approval Granted
  9. Submit Expense Claim to Xero
  10. Link Receipt to Xero Invoice
  11. Append Approved to Sheets
  12. Announce Rejection in Slack
  13. Append Rejected to Sheets
  14. Filter Receipt Images

20 steps in total.

Similar automations