AutomationMart
Home/Browse/Generate invoices, save to Drive and send email to customer with JS + G Sheets
n8n

Generate invoices, save to Drive and send email to customer with JS + G Sheets

n8nn8n11 modulesv1.0
codeemailSendgoogleDrivegoogleSheetshttpRequestifsetwebhook

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 1. Trigger (Webhook) Starts when an order form is submitted, capturing customer and order details. 2. Generate Random Order ID A Function node creates a unique alphanumeric invoice ID (e.g., INV-X92B7D). 3. Check for Duplicate Order ID Goog

At a glance

Generate invoices, save to Drive and send email to customer with JS + G Sheets is a ready-made n8n workflow you import as a workflow JSON file β€” no build required. It connects code, emailSend, googleDrive, googleSheets. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
code, emailSend, googleDrive, googleSheets, httpRequest, if
Modules
11
Price
Free
Version
v1.0
Generate invoices, save to Drive and send email to customer with JS + G Sheets workflow diagram

About this workflow

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 1. Trigger (Webhook) Starts when an order form is submitted, capturing customer and order details. 2. Generate Random Order ID A Function node creates a unique alphanumeric invoice ID (e.g., INV-X92B7D). 3. Check for Duplicate Order ID Google Sheets looks up the generated order ID in your invoice log sheet to prevent duplicates. 4. Conditional Check (IF Node) If the ID already exists β†’ regenerates a new ID (loops back) If unique β†’ proceeds to invoice creation 5. Prepare Invoice Data A Set node formats customer info, date, order items, and the unique order ID to fit your invoice template. 6. Convert HTML to PDF HTTP Request node sends your invoice HTML to the RapidAPI HTML-to-PDF service and receives the PDF file. 7. Upload PDF to Cloud Storage Save the PDF in Google Drive or Dropbox with a clear file name like Invoice-INV-X92B7D.pdf. 8. Send Invoice Email to Customer Email node attaches the PDF and includes the order ID in the email subject/body. 9. Log Invoice Details Append invoice data (customer info, order ID, total, PDF link) to your Google Sheet for tracking. --- βš™οΈ Node Details & Setup 1. Webhook Trigger Configure to receive form submissions (order details like name, email, items, total). 2. Function: Generate Random Order ID Sample JS code generates unique IDs prefixed by INV-. 3. Google Sheets: Lookup Row Set up connection to your invoice log sheet. Search for existing order ID to avoid duplicates. 4. IF Node: Check Order ID Existence Condition: If order ID found β†’ loop to regenerate. Else β†’ continue workflow. 5. Set Node: Prepare Invoice HTML Define variables like customer name, date, items, and order ID. This data populates your HTML invoice template. 6. HTTP Request: Convert HTML to PDF API URL to get your key Send invoice HTML in the request body. Receive PDF file blob or download URL. 7. Google Drive (or Dropbox) Upload Upload the PDF file. Use file name format: Invoice-{{$json["orderid"]}}.pdf 8. Email Node Recipient: customer email from the form data. Attach generated PDF. Include order ID in email subject or body for reference. 9. Google Sheets: Append Row Log invoice metadata to keep records updated. --- πŸ“ Google Sheets Template You can make a copy of the invoice log template here This sheet includes columns for order\id, customer name, email, total, and invoice PDF link. Customize it as needed. --- πŸ“Œ Additional Notes Customize the invoice HTML template inside the Set node to match your branding. Ensure API credentials for RapidAPI, Google Drive/Dropbox, and email are properly set up in your n8n credentials. You can expand this workflow by adding payment processing or SMS notifications. --- Need help or want a custom workflow? Reach out via email at joseph@uppfy.com.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n β†’ click the menu β†’ Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

AI-powered Telegram task assistant with Notion integration

This workflow creates a powerful AI assistant in Telegram that helps you manage your tasks in Notion. The assistant leverages OpenAI's language models to understand natural language commands, process voice messages, and maintain context through conversations. Key features: - Processes both text and voice messages in Telegram - Transcribes voice messages automatically - Maintains conversation context with memory - Manages Notion tasks through a custom tool: β€’ List all tasks β€’ Add new tasks with

Free

AI resume screening with GPT-4o & error handling | Google Sheets & Drive flow

GPT-4o Resume Screener with Error Handling - Google Sheets & Drive Pipeline How it works Enterprise-grade resume screening automation built for production environments. This workflow combines intelligent AI analysis with comprehensive error handling to ensure reliable processing of candidate applications. Every potential failure point is monitored with automatic recovery and notification systems. Core workflow steps: 1. Intelligent Email Processing - Monitors Gmail with attachment validation and

Free

Auto generate & post LinkedIn content for Amazon sellers with GPT-4o & Apify

How it works This powerful automation turns LinkedIn influencer activity into high performing Amazon seller content, fully hands-off. It runs in two phases: 1. AI Content Generator Retrieves influencer usernames from Airtable Scrapes their most recent LinkedIn post via Apify Uses OpenAI (GPT-4o) to generate original Amazon focused post content Generates a branded LinkedIn image using AI (WeSpark visual identity) Saves content & image link to Google Drive Creates a record in Airtable with S

Free

Telegram AI bot-to-human handoff for sales calls

This n8n template demonstrates an approach to perform bot-to-human handoff using Human-in-the-loop functionality as a switch. In this experiment, we play with the idea of states we want our agent to be in which controls it's interacton with the user. First state - the agent is onboarding the user by collecting their details for a sales inquiry. After which, they are handed-off / transferred to a human to continue the call. Second state - the agent is essentially "deactivated" as

Free

Centralized n8n error management system with automated email alerts via Gmail

Advanced n8n Error Handling: Automated Email Alerts & Global Error Workflow Configuration In any automated environment, n8n workflows, while powerful, can sometimes encounter unexpected issues or fail during execution. Without a dedicated error handling strategy, these failures might go unnoticed, leading to incomplete processes, data inconsistencies, or critical operational disruptions. Manually monitoring every workflow execution or sifting through logs for error details is inefficient and can

Free

Sync GitHub workflows to n8n after pull request merges

Who is this for? This template is ideal for developers, DevOps engineers, and automation managers who manage their n8n workflows using GitHub. It helps teams streamline their CI/CD automation by syncing changes from GitHub directly into n8n after a pull request (PR) is merged. What problem is this workflow solving? Manually restoring workflows after reviewing and merging code in GitHub can be tedious and error-prone. This workflow solves that by automating the restore process, ensuring that any

Free

Audit competitor SEO content with Decodo, Gemini, and Google Sheets

Never guess your SEO strategy again. This advanced workflow automates the most time-consuming part of SEO: auditing competitor articles and identifying exactly where your brand can outshine them. It extracts deep content from top-ranking URLs, compares it against your specific brand identity, and generates a ready-to-use "Action Plan" for your content team. The workflow uses Decodo for high-fidelity scraping, Gemini 2.5 Flash for strategic gap analysis, and Google Sheets as a dynamic "Brand Brai

Free

Extract pay slip data with Line Chatbot and Gemini to Google Sheets

Workflow Overview: Extract text from image using AI is worth because you need no code. It incorporates Google Gemini 2.0 Flash model for important text extraction from image. If you code without AI, you have to use multiple condition and may cause a lot of bug but with Google Gemini, you don't need any coding and if the Pay Slip is different, Gemini will extract it automatically. Workflow description: 1. User uses Line Messaging API to send Pay Slip image or message to the chatbot, create Line B

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint β€” instant download
  • Setup guide PDF included
  • 5 downloads Β· valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

β‚Ή2,499/ session
3 hrs Β· video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free