Automation library · Data collection

Extract spending history from Gmail to google sheet

Started by an arriving email, and works across Gmail and Google Sheets. It hands the judgement calls to Gemini and Groq. 21 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini, Groq

21 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 2Model 6Logic 9Service 4

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

  1. 1Get invoiceGmail triggerStarts it
  2. 2Get paymentGmail triggerStarts it
  3. 3Structured Output Parser1Output Parser StructuredModel
  4. 4Google Gemini Chat Model1Lm Chat Google GeminiModel
  5. 5Groq Chat ModelLm Chat GroqModel
  6. 6Structured Output ParserOutput Parser StructuredModel
  7. 7Extract invoiceExtract From FileService
  8. 8Extract paymentExtract From FileService
  9. 9Extract detailsChain LlmModel
  10. 10Extract details1Chain LlmModel
  11. 11Invoice dataSetLogic
  12. 12Payment dataSetLogic
  13. 13SendGoogle SheetsService
  14. 14Send1Google SheetsService
  15. 15SwitchSwitchLogic
  16. 16HTMLHtmlLogic
  17. 17Set data 1SetLogic
  18. 18Set data 2SetLogic
  19. 19Split OutSplit OutLogic
  20. 20MergeMergeLogic
  21. 21Set data 0SetLogic

How it's built

Starts on
An arriving email
Steps
21, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets
Model
Gemini, Groq

Questions

What does it need to run?

An n8n account, plus your own Gmail and Google Sheets accounts, and a key for Gemini and 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 Gemini and Groq. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 21 steps it is large: read it before trusting it with anything live.

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 21 steps before you point it at anything that matters.