Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Email Automation

Email Automation

Approve and audit expense claims with Google Gemini and Google Sheets

When an API call/webhook arrives, it handles email with Google Gemini using IMAP Email, Gmail, Google Sheets.

What it does

## Intelligent Expense & Invoice Claims Agent ### How it works 1. A receipt arrives either through the web portal's upload form or as an email attachment, and gets split into one item per file. 2. Gemini reads each file and extracts vendor, amount, category, and date for every bill it finds. 3. The workflow scores fraud/policy risk against Ledger history and either auto-approves the claim or routes it to a manager for sign-off. 4. Auto-approved claims are logged and the employee is emailed immediately; pending claims are logged and the manager gets an Approve/Reject email link. 5. When the manager clicks a link, the Ledger is updated, the employee is notified of the outcome, and an audit log entry is written. 6. A separate read-only endpoint lets the portal's "Check Status" button look up any claim by ID at any time. ### Setup steps - [ ] Confirm the Google Sheets credential (Expense Agent Data) has edit access to the Policy Rules, Ledger, and Audit Log tabs. - [ ] Confirm the Gmail credential can send from the address used for approval-request and employee-notification emails. - [ ] Confirm the Google Gemini (PaLM) API credential is active and has quota for image/PDF analysis. - [ ] Set the IMAP credential if email-submitted receipts should be supported. - [ ] Point the frontend portal's upload/check-status URLs at this workflow's production webhook URLs. ### Customization Adjust auto-approval thresholds per category in the Policy Rules sheet rather than in code. The duplicate-detection window is a straight vendor+amount match against Ledger history — tighten or loosen that comparison in "Evaluate Risk & Format History" if it's too strict or too loose.

The steps

  1. Capture Employee Info
  2. Ask Gemini to Read Receipt
  3. Parse Extracted Data
  4. Get Policy Rules
  5. Check Policy and Risk
  6. Auto-Approve or Needs Sign-off?
  7. Log to Ledger - Auto Approved
  8. Log Pending Claim
  9. Find Pending Claim
  10. Approved or Rejected?
  11. Update Ledger - Approved
  12. Update Ledger - Rejected
  13. Write Audit Log
  14. Get Ledger History

33 steps in total.

Similar automations