Example of EDI Message
Configured with Gmail, Gmail Trigger, Google Sheets, Split Out. Review the connections and setup before adapting this template.
Node categories in this workflow
- Transform
- Data store
- Routing
- Trigger
- Messaging
- Code
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Order Information | Transform | Edit Fields | See node parameters |
| Return Orders | Data store | Google Sheets | append |
| Outbound Orders | Data store | Google Sheets | append |
| Order Type | Routing | If | See node parameters |
| Email Trigger | Trigger | Gmail Trigger | See node parameters |
| Subject includes EDI | Routing | If | See node parameters |
| Extract Body | Transform | Edit Fields | See node parameters |
| Get Email | Messaging | Gmail | get |
| Parse EDI Message | Code | Code | See node parameters |
| Order Info + Orderlines | Transform | Merge | See node parameters |
| Flatten Data to Orderlines | Code | Code | See node parameters |
| Split Out by Line | Transform | Split Out | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
None declared. HTTP requests and Code nodes may still need configuration.
Workflow notes
5. Do you need more details?
5. Do you need more details?
Find a step-by-step guide in this tutorial 🎥 Watch My Tutorial
1. Workflow Trigger with Gmail Trigger
1. Workflow Trigger with Gmail Trigger
The workflow is triggered by a new email received in your Gmail mailbox. If the subject includes the string "EDI" we proceed, if not we do nothing.
How to setup?
- Gmail Trigger Node: set up your Gmail API credentials Learn more about the Gmail Trigger Node
Example of EDI Message
Example of EDI Message
You can send yourself this email to test the workflow.
UNA:+.? '
UNB+UNOC:3+SENDER_ID+RECEIVER_ID+240317:1200+ORDER67890'
UNH+1+ORDERS:D:96A:UN'
BGM+220+PO56789012+9'
DTM+137:20250318:102'
DTM+2:20250325:102'
DTM+10:20250324:102'
NAD+BY+BUYER_ABC::91'
NAD+SU+SUPPLIER_XYZ::91'
NAD+DP+WAREHOUSE_001::91'
NAD+DP+Main Distribution Center'
LIN+1++987654:IN'
IMD+F++:::Product X Description'
QTY+21:50:EA'
PRI+AAA:20.00'
LIN+2++654987:IN'
IMD+F++:::Product Y Description'
QTY+21:150:EA'
PRI+AAA:12.75'
UNT+10+1'
UNZ+1+ORDER67890'UNA:+.? '
UNB+UNOC:3+SENDER_ID+RECEIVER_ID+240317:1200+ORDER67890'
UNH+1+ORDERS:D:96A:UN'
BGM+220+PO56789012+9'
DTM+137:20250318:102'
DTM+2:20250325:102'
DTM+10:20250324:102'
NAD+BY+BUYER_ABC::91'
NAD+SU+SUPPLIER_XYZ::91'
NAD+DP+WAREHOUSE_001::91'
NAD+DP+Main Distribution Center'
LIN+1++987654:IN'
IMD+F++:::Product X Description'
QTY+21:50:EA'
PRI+AAA:20.00'
LIN+2++654987:IN'
IMD+F++:::Product Y Description'
QTY+21:150:EA'
PRI+AAA:12.75'
UNT+10+1'
UNZ+1+ORDER67890'
2. Get Email Body & Parse EDI Message
2. Get Email Body & Parse EDI Message
The first node extracts the email body using the ID from the trigger. This body is parsed using the code node to extract order information.
How to setup?
- Gmail Node: set up your Gmail API credentials Learn more about the Gmail Node
4. Store the Transactions in a Google Sheet
4. Store the Transactions in a Google Sheet
This block will filter the order based on the order type (Return Orders, Outbound Orders) extracted from the order information node. Results are stored in two distinct sheets of the same Google Sheet file.
How to setup?
- Add Results in Google Sheets:
- Add your Google Sheet API credentials to access the Google Sheet file
- Select the file using the list, an URL or an ID
- Select the sheet in which the vocabulary list is stored
- You don't need to create columns as the mapping is automatic. Learn more about the Google Sheet Node
3. Process Parsed Data
3. Process Parsed Data
This block extract order information and format the orderlines to be stored in a google sheet.
How to setup?
Nothing to do.
Example of EDI Message
Example of EDI Message
Purpose and structure
This folder contains the Example of EDI Message workflow. Its executable nodes use code, gmail, gmailTrigger, googleSheets, if, merge, set, splitOut. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Email Trigger
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/0793_Splitout_Code_Send_Triggered.json MIT; preserve source notices.