Automation library · Money admin

Validate invoice tax compliance from Gmail with Groq

Started by an arriving email, and works across Gmail, Google Drive, Google Sheets, Notion and one other. It hands the judgement calls to Groq. 17 steps, 1 branch: a working afternoon to understand properly.

MediumCalls a model: Groq

17 stepsMedium: a working afternoon
1Branch: places the flow splits
0Loops or waits
5Services it connects to

The flow

Starts it 1Model 3Logic 4Service 9

The steps in the order they run, from what starts it.

  1. 1Invoice Field SchemaOutput Parser StructuredModel
  2. 2LLMLm Chat GroqModel
  3. 3Monitor InboxGmail triggerStarts it
  4. 4AI Extract InvoiceChain LlmModel
  5. 5Fetch Email AttachmentsGmailService
  6. 6Fetch Tax RulesNotionService
  7. 7Format AI OutputSetLogic
  8. 8Lookup PO DetailsGoogle SheetsService
  9. 9Read PDF ContentExtract From FileService
  10. 10Consolidate Validation DataMergeLogic
  11. 11Compliance EngineCodeLogic
  12. 12Log Audit EntryNotionService
  13. 13Check Compliance StatusIfLogic
  14. 14Slack: Notify ApprovalSlackService
  15. 15Slack: Alert AP Team (Block)SlackService
  16. 16Archive to Google DriveGoogle DriveService
  17. 17Email: Notify Supplier of RejectionGmailService

How it's built

Starts on
An arriving email
Steps
17, with 1 branch
Size
Medium: a working afternoon
Connects to
Gmail, Google Drive, Google Sheets, Notion, Slack
Model
Groq

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Drive, Google Sheets, Notion and Slack accounts, and a key for Groq. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an arriving email.

Does it use AI?

Yes. It calls Groq. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 17 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 17 steps before you point it at anything that matters.