📦 Electronic data interchange (EDI) message parsing with Gmail and Google Sheet
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs on Gmail events. Along the way it connects Google Sheets and Gmail.
How it runs
Trigger: On Gmail events.
- Subject includes EDI (If): checks a condition and branches into true / false
- Get Email (Gmail): get
- Extract Body (Edit Fields (Set)): sets 1 field: body
- Parse EDI Message (Code): runs custom JavaScript code
- Order Information (Edit Fields (Set)): sets 5 fields: documentType, documentNumber, orderDate…
- Flatten Data to Orderlines (Code): runs custom JavaScript code
- Order Info + Orderlines (Merge): merges the data from its input branches
- Split Out: splits a list into separate items
- Order Type (If): checks a condition and branches into true / false
- Return Orders (Google Sheets): append
…plus 1 more step. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102)
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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Email Trigger).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge - Split Out
n8n-nodes-base.splitOut
From the author
Tags: Supply Chain Management, Logistics, Transportation, Data Transmission Context Hey! I'm Samir , a Supply Chain Engineer and Data Scientist from Paris founder of LogiGreen Consulting We help small and medium businesses improve their logistics processes…