PICKED FROM N8N.IO · DOCUMENTS & DATA ENTRY

Documents arrive by Gmail attachment or webhook and are sent to LlamaParse for text extraction. OpenAI classifies each one, writes a summary and, for invoices, extracts the details. Results go to Google Sheets and Drive, with summaries and errors sent to Telegram.

Template by Joseph LePage · 19.8k views on n8n.io · listed there as “Advanced AI powered document parsing & text extraction with Llama Parse”

THE WORKFLOW36 NODES
⚡︎Webhook@Gmail@Gmail TriggerLLimit@Get Message↯Parse Documentwith LlamaParse✦Summarize Email◆gpt-4o-mini▦Save LlamaParseID and Summary t…▲Save Document toGoogle Drive✦Extract InvoiceDetails as JSON◆gpt-4o-mini1◆gpt-4o-mini2▦Update GoogleSheet by LlamaPa…≡Invoice Details≡Prepare MessageTSend InvoiceDetails as Teleg…◆gpt-4o-mini3TSend ErrorMessage 2TSend ErrorMessage 1TSend DocumentSummary as Teleg…✦SummarizeDocument✦Classify ParsedDocument≡Get ParsedMarkdown≡Prepare Data↯HTTP Request⑂Is there an EmailAttachement⊞Aggregate≡Edit Fields⋈Merge EmailProcessing⋈Merge⑂If Supported FileExtensions–No Operation, donothing–No Operation, donothing1▲Save SummarizedDocument to Goog…▲Save ParsedDocument to Goog…
DIFFICULTY
Advanced
NODES
36
USES AI
Yes
PUBLISHED
February 2025

001 / WHAT HAPPENS

  1. 01

    A Gmail trigger or webhook receives a document and checks the file type is supported.

  2. 02

    The file is uploaded to LlamaParse and the text is retrieved as markdown.

  3. 03

    OpenAI classifies the document and writes a summary.

  4. 04

    For invoices, OpenAI extracts details as structured data.

  5. 05

    The original is saved to Drive, results go to Google Sheets and a Telegram message is sent.

WHO IT SUITS

Suits a business that receives mixed documents by email and wants them sorted, summarised and logged, with a quick alert to staff.

CONNECTS

  • Gmail
  • LlamaParse
  • OpenAI
  • Google Drive
  • Google Sheets
  • Telegram

002 / BEFORE YOU USE IT HERE

  • !Customer or staff details sent to an overseas AI provider such as OpenAI is a cross-border disclosure under APP 8 of the Privacy Act, so say so in your privacy policy.
  • !LlamaParse is a US-hosted paid service and Telegram is not hosted in Australia, so document contents leave the country.
  • !It has around 40 nodes and several error paths, so set it up in stages and test each branch.
  • !API keys, Telegram chat ID, Drive folder and sheet columns belong to the author and must be replaced.

LOCAL SWAP

Swap the Telegram nodes for Slack or Microsoft Teams nodes if your team works there.

Need n8n and the AI hosted in Australia? →

004 / QUESTIONS

Anything else is quicker to answer on a call. Thirty minutes, free, with the people who would build it.

Yes. Every template on this list is free on n8n.io. You need an n8n account (n8n Cloud or self-hosted) and accounts for the apps it connects to, some of which charge for API use.

We adapt templates to your systems, add approval steps where customers are involved, host n8n in Australia when the data calls for it and hand it over documented.

Book a free call→