Automation library · Money admin

Log email receipt data to Google Sheets with Gmail and OpenAI

Started by a clock, and works across Gmail and Google Sheets. It hands the judgement calls to OpenAI. 22 steps, 4 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

22 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 2Model 4Logic 10Service 6

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

  1. 1Receipt arrives (Gmail)Gmail triggerStarts it
  2. 21st of the month, 8amSchedule triggerStarts it
  3. 3OpenAI model (bring your own key)Lm Chat Open AiModel
  4. 4Force clean JSON outputOutput Parser StructuredModel
  5. 5⚙️ Your settingsSetLogic
  6. 6Extract fields (AI)Chain LlmModel
  7. 7Receipt or monthly summary?IfLogic
  8. 8Found an amount and a merchant?IfLogic
  9. 9Read what is already loggedGoogle SheetsService
  10. 10Read the full ledgerGoogle SheetsService
  11. 11Build the ledger rowSetLogic
  12. 12Tell me a receipt could not be readGmailService
  13. 13Keep only the new receiptsCodeLogic
  14. 14Total last month by categoryCodeLogic
  15. 15Append to the expense ledgerGoogle SheetsService
  16. 16PDF or photo?SwitchLogic
  17. 17Email the monthly summaryGmailService
  18. 18Extract text from PDFExtract From FileService
  19. 19Transcribe photo with AI visionOpen AiModel
  20. 20Any text in the PDF?IfLogic
  21. 21Normalize (photo path)SetLogic
  22. 22Normalize (PDF path)SetLogic

How it's built

Starts on
A clock
Steps
22, with 4 branches
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on a clock.

Does it use AI?

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

How long does it take to set up?

Take your time. At 22 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 22 steps before you point it at anything that matters.