Generate Invoices, Save to Drive and Send Email to Customer with JS + G Sheets — n8n 工作流
概览
This workflow automates invoice generation from form submissions, ensuring unique order IDs, creating PDF invoices, storing files, emailing customers, and logging invoice data — all seamlessly integrated.
🔹 Workflow Overview
Trigger (Webhook) Starts when an order form is submitted, capturing customer and order details.
Generate Random Order ID A Function node creates a unique alphanumeric invoice ID (e.g., INV-X92B7D).
Check for Duplicate Order ID Google Sheets looks up the generate
使用的节点
Send EmailGoogle SheetsHTTP RequestGoogle DriveCode
工作流预览
⚡
W
Webhook Simulator
Generate Invoice ID
Check if ID Already Exists
I
If Does not Exist
S
Set Fields
Create Invoice HTML
HTML to PDF
Upload PDF to GDrive
Email Invoice to Customer
Append Details to Invoic…
Download PDF from API
11 nodes11 edges
工作原理
- 1
触发器
工作流由 webhook 触发器启动。
- 2
处理
数据流经 11 个节点, connecting code, emailsend, googledrive。
- 3
输出
工作流完成自动化并将结果发送到配置的目标。
节点详情 (11)
SE#1
Send Email
emailSend
GO#2
Google Sheets
googleSheets
HT#3
HTTP Request
httpRequest
GO#4
Google Drive
googleDrive
CO#5
Code
code
如何导入此工作流
- 1点击右侧 下载 JSON 按钮保存工作流文件。
- 2打开你的 n8n 实例,依次点击 工作流 → 新建 → 从文件导入。
- 3选择下载的
generate-invoices-save-to-drive-and-send-email-to-customer-with-js-g-sheets文件并点击导入。 - 4为每个服务节点配置 凭证(API 密钥、OAuth 等)。
- 5点击 测试工作流 验证一切正常,然后激活它。
或直接在 n8n → 从 JSON 导入 中粘贴:
{ "name": "Generate Invoices, Save to Drive and Send Email to Customer with JS + G Sheets", "nodes": [...], ...}
集成
codeemailsendgoogledrivegooglesheetshttprequestifsetwebhook
创建者
Joseph
@mjomba
标签
codeemailsendgoogledrivegooglesheetshttprequestifsetwebhook