n8n

How to Automate Gmail Invoice Alerts to Slack?

Keep your finance team on top of new invoices without digging through email. The flow watches your inbox, finds invoice messages, reads the attached file to get the total, and alerts the team when the amount is high. It also emails the finance manager with the original invoice for quick approval.

Here is how it works step by step. The IMAP email node checks the Gmail Inbox and looks for the word invoice in the email body. If it matches, the file attachment is sent to Mindee to extract the total amount. A simple rule checks if the total is over 1000. When the amount is high, the workflow sends an SMTP email to the finance manager with the original attachment and posts a Slack message to a chosen channel with the amount and sender details. The Slack post helps the team act fast while the manager gets the full file.

Setup is simple. You need access to Gmail via IMAP, a Mindee API key, a Slack token, and an SMTP account such as Mailtrap. Change the amount limit in the If node to match your policy. Expect faster approvals, fewer missed invoices, and less manual sorting. This fits small and mid sized finance teams, agencies, and any group that needs quick invoice checks with a clear handoff.

What are the key features?

  • IMAP inbox check scans the Gmail Inbox for new messages
  • Keyword filter finds emails that contain the word invoice in the body
  • Attachment handling passes the first file as binary property attachment_0
  • Mindee extracts the total amount from the attached invoice file
  • Numeric rule flags invoices greater than 1000 for review
  • SMTP email sends the original invoice to the finance manager for approval
  • Slack message posts the amount and sender details to a chosen team channel

What are the benefits?

  • Reduce manual inbox scanning from 30 minutes a day to 5 minutes
  • Automate up to 80% of invoice triage and routing work
  • Speed up approvals by 50% with instant Slack alerts
  • Connect Gmail, Mindee, Slack, and SMTP in one flow
  • Handle higher invoice volume without adding staff

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gmail, Mindee, Slack and Mailtrap. See the Tools Required section above for links to create accounts with these services.
  3. In the Email Read IMAP node, create a new credential for Gmail. Double click the node, choose Credential to connect with, click Create new credential, and follow the on screen steps to connect your Gmail IMAP account. Make sure IMAP is enabled in Gmail settings.
  4. Confirm the IMAP node is set to mailbox Inbox and format resolved. Send yourself a test email and click Execute Node to see if messages load in n8n.
  5. Open the If email body contains invoice node and keep the condition set to contains invoice. Send a test email with the word invoice in the body to confirm the True path is used.
  6. In the Mindee node, create a new Mindee API Key credential. Double click the node, click Create new credential, then paste your API key from the Mindee dashboard API page. Keep resource as invoice and binary property name as attachment_0.
  7. Test attachment flow: email yourself a PDF invoice as the first attachment. In the IMAP node output, check that binary attachment_0 exists. If the name differs, update the Mindee node binaryPropertyName to match.
  8. Open the If Amount > 1000 node and adjust the threshold to your policy if needed. Run a test with an invoice above and below the limit to confirm the check works.
  9. In the Send email to finance manager node, create or select SMTP credentials for Mailtrap. Double click the node, click Create new credential, and follow the on screen steps. Keep attachments set to attachment_0 so the original invoice is sent.
  10. In the Slack node, create a new Slack Access Token credential. Double click the node, select Create new credential, and follow the on screen steps. Set the channel to your finance channel and update the message text if needed.
  11. Run a full test: send a real invoice email with the word invoice in the body and a PDF attached. Confirm Mindee returns a total and that high value invoices trigger both the email and the Slack message.
  12. Troubleshoot common issues: if no attachment is found, check the file type and attachment index. If Mindee returns empty data, try a clearer PDF or image. If Gmail fails to connect, verify IMAP access and app passwords. If Slack does not post, confirm the channel and token scopes.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Mailtrap

Sign up

Free: $0 / mo, 3,500 emails / mo via API/SMTP (150/day), 1 domain

Mindee

Sign up

Starter: €44 / mo billed annually, 500 pages / mo (+€0.05 per additional page)

Slack

Sign up

Free plan: $0 / mo; limited to 10 apps (third-party or custom) and usable via Slack API

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.