Templates / Log Brazilian NF-e invoice XMLs from Gmail into Google Sheets

Log Brazilian NF-e invoice XMLs from Gmail into Google Sheets

Ready for 3.0

by Daniel Carvalho ✓ · 3 views · created 2026-11-02 · Invoice Processing

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 44 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail and Google Sheets.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. One item per attachment (Split Out): splits a list into separate items
  2. Read Review tab (Google Sheets): uses Google Sheets
  3. Keep XML files (Filter): keeps only the items that match a condition
  4. Added in the last 24 hours (Filter): keeps only the items that match a condition
  5. Describe failure (Edit Fields (Set)): sets 4 fields: stage, failure, sourceFile…
  6. Read XML file (Extract from File): extracts data from a file (text)
  7. Format alert line (Edit Fields (Set)): sets 1 field: alertLine
  8. Send failure alert (Gmail): uses Gmail
  9. Complete NF-e or event XML (Filter): keeps only the items that match a condition
  10. Collect alert lines (Aggregate): combines items into one

…plus 32 more steps. See the full node list below.

Services it uses

GmailGoogle Sheets

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (17)

From the author

Quick overview This workflow polls Gmail for emails with XML attachments, extracts Brazilian NF-e invoice data, validates the 44-digit access key against the XML content, and upserts one row per invoice into Google Sheets while sending invalid or conflicting…

Excerpt from Daniel Carvalho's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.