Export Google Sheets to CSV or Excel and email files with Gmail
Ready for 3.0What this workflow does
This workflow has 7 nodes and runs when someone submits an n8n form (“Google Sheets Exporter”). Along the way it connects Google Sheets and Gmail.
How it runs
Trigger: When someone submits an n8n form (“Google Sheets Exporter”).
- 2. Sheets - Read Data from User Sheet (Google Sheets): uses Google Sheets
- 3. Code - Validate Input and Attach Context (Code): runs custom JavaScript code
- 4. Switch - Route to CSV or XLSX (Switch): routes items into 2 branches
- 5. Spreadsheet File - Convert to XLSX (Spreadsheet File): reads or writes a spreadsheet file (legacy node)
- 6. Spreadsheet File - Convert to CSV (Spreadsheet File): reads or writes a spreadsheet file (legacy node)
- 7. Gmail - Email File to User (Gmail): uses Gmail
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 Spreadsheet File (5. Spreadsheet File - Convert to XLSX, 6. Spreadsheet File - Convert to CSV): Convert to File / Extract from File.
Nodes used (6)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Spreadsheet File
n8n-nodes-base.spreadsheetFile - Gmail
n8n-nodes-base.gmail
From the author
Quick Overview This workflow collects a Google Sheet ID and export preferences via an n8n Form, reads the selected tab from Google Sheets, converts the rows to CSV or Excel (XLSX), and sends the generated file as a Gmail attachment to the requester. How it…