Two CSVs in one Gmail message
A signature image occupies the first attachment slot. The two CSVs you need sit in different slots, and tomorrow’s message reuses one filename. Import this n8n workflow to parse every CSV and keep the message and file attached to each row.
Download the n8n workflow JSON
https://bulldo.gs/demos/gmail-csv/gmail-csv-rows.jsonRun the rehearsal
- Open an empty workflow in n8n. Select the canvas menu and choose Import from URL with the address above, or Import from File with the downloaded JSON.
- Select Execute Workflow. The sample node creates three fictional messages and six attachments. Three have CSV filenames. The others are two signature images and a text note.
- Open Keep message and filename. You should see four items. Expand
sourceto see the message ID, filename and original attachment property. Expandrowto see the parsed columns.
| Message | File | Item | Units |
|---|---|---|---|
| example-A | orders.csv | Pencils, blue | 3 |
| example-A | orders.csv | Erasers | 2 |
| example-A | returns.CSV | Folders | 1 |
| example-B | orders.csv | Labels | 4 |
Use it in your own workflow
In a copy of your existing workflow, paste the final three nodes together. Feed Select CSV attachments with one n8n item per Gmail message, containing json.id and downloaded binary attachments. Enable attachment downloads on your existing Gmail node. Keep the node names so the final step can follow n8n’s item links.
The filter accepts filenames ending in .csv, ignoring case. The parser expects UTF-8 comma-separated text with a header. The practice data uses comma delimiters and keeps the units column as text. For a semicolon-delimited regional export, change the CSV delimiter. Check the character encoding and date or decimal conventions before using parsed values in calculations. A matching extension alone does not verify a file’s contents. The example stops at the parsed rows for inspection. Replaying a message produces the same rows again. A downstream append step needs its own duplicate handling.
If your CSV has one row per collection image, two rows can belong to the same object. Try grouping three image rows into two Omeka S items in Google Sheets. Check that object 007 keeps both files in their original order.
If you only need to find the messages first, use the Gmail attachment search builder. For broader file types, n8n has a generic binary splitter. See its workflow import instructions.
Need one notice before processing the rows? Import the batch notice example and check that each original record reaches the next node.
Did the rehearsal return the rows you expected? Tell us the attachment and row counts. Counts alone are enough to compare runs.