Automate birthday discount emails for e-commerce using Google Sheets and Gmail
⚙ How It Works & Setup Steps: Automated Birthday Discount
How It Works
This workflow is a powerful yet simple automation to delight your customers on their birthdays. It runs every day on a schedule you define and automatically pulls data from your customer list on Google Sheets. The workflow then checks to see if any customer has a birthday on the current day. If a match is found, it generates a unique discount code and sends a personalized, celebratory email with the code directly to the customer. This ensures no birthday is ever missed, fostering customer loyalty and driving sales with zero manual effort.
Setup Steps
Follow these steps to get the workflow running in your n8n instance and start sending automated birthday discounts.
1. Prerequisites
You will need a working n8n instance and a few key accounts:
- Google Sheets: To store your customer data, including their email address and birthday. The birthday column should be formatted as
MM-dd(e.g.,08-27). - Gmail: To send the personalized birthday emails to your customers.
2. Workflow Import
Import the provided workflow JSON into your n8n canvas. All the necessary nodes will appear on your canvas, ready for configuration.
3. Configure Credentials
Connect the following credentials to their respective nodes:
- Google Sheets: Connect your Google account to the
Get Customer Datanode. - Gmail: Connect your Gmail account to the
Send Birthday Emailnode.
4. Customize the Workflow
Get Customer Data:- Enter the
Spreadsheet IDandSheet Nameof your Google Sheet containing the customer data.
- Enter the
Is It Their Birthday?:- This node compares the customer's birthday column with the current date. Ensure
{{ $json.birthday }}matches the exact name of your birthday column in Google Sheets.
- This node compares the customer's birthday column with the current date. Ensure
Generate Discount Code:- This node is pre-configured to create a simple unique code. For an e-commerce platform (like Shopify or WooCommerce), you will need to replace this node with the specific API call to generate a valid coupon code in your system.
Send Birthday Email:- Enter your sender email in the
From Emailfield. - Customize the
SubjectandMessagewith your own text and branding to make it personal. The{{ $json.name }}and{{ $json.discountCode }}expressions will automatically pull the correct customer name and generated code.
- Enter your sender email in the
5. Activate the Workflow
Once all configurations are complete, click "Save" and then "Active". The workflow is now live and will automatically run every morning to send out birthday wishes!
Automate Birthday Discount Emails for E-commerce using Google Sheets and Gmail
This n8n workflow automates the process of sending personalized birthday discount emails to customers. It regularly checks a Google Sheet for customers whose birthdays are approaching and, if a discount code is available, sends them a celebratory email via Gmail.
What it does
- Schedules Daily Check: The workflow runs automatically at a set interval (e.g., daily) to check for upcoming birthdays.
- Fetches Customer Data: It retrieves customer information, including names, email addresses, birthdays, and discount codes, from a specified Google Sheet.
- Calculates Age and Upcoming Birthday: A custom JavaScript function processes the data to calculate the customer's current age and determine if their birthday is within the next 7 days.
- Filters for Eligible Customers: It filters the list to only include customers whose birthdays are upcoming and who have an available discount code.
- Sends Personalized Birthday Email: For each eligible customer, it sends a personalized birthday email containing their name and the discount code using Gmail.
Prerequisites/Requirements
- n8n Instance: A running n8n instance.
- Google Sheets Account: A Google Sheets account with a spreadsheet containing customer data (Name, Email, Birthday, Discount Code).
- Gmail Account: A Gmail account configured as a credential in n8n for sending emails.
- Google Sheets Credential: A Google Sheets OAuth2 or API Key credential configured in n8n.
Setup/Usage
- Import the Workflow: Import the provided JSON into your n8n instance.
- Configure Credentials:
- Google Sheets: Set up your Google Sheets credential. Ensure it has access to the spreadsheet you intend to use.
- Gmail: Set up your Gmail credential.
- Update Google Sheets Node (Node 18):
- Specify the Spreadsheet ID of your customer data sheet.
- Ensure the Sheet Name is correct.
- Verify the Range if your data does not start from A1.
- Review Function Node (Node 14): This node contains JavaScript logic to calculate birthdays. You may need to adjust the date formatting or the "days in advance" logic if your requirements differ.
- Review If Node (Node 20): This node filters customers. Ensure the conditions for
birthdayInNext7DaysanddiscountCodeare appropriate for your data. - Update Gmail Node (Node 356):
- Customize the Subject and Body of the email. Use expressions to dynamically insert customer names and discount codes (e.g.,
{{ $json.name }},{{ $json.discountCode }}). - Ensure the "To" field correctly uses the customer's email address (e.g.,
{{ $json.email }}).
- Customize the Subject and Body of the email. Use expressions to dynamically insert customer names and discount codes (e.g.,
- Activate the Workflow: Once configured, activate the workflow. The "Schedule Trigger" node (Node 839) will run the workflow automatically at the configured interval.
Related Templates
AI-powered code review with linting, red-marked corrections in Google Sheets & Slack
Advanced Code Review Automation (AI + Lint + Slack) Who’s it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting — all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0–10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your team’s channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow — reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why it’s valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n — combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your team’s review history transparent and centralized.
Ai website scraper & company intelligence
AI Website Scraper & Company Intelligence Description This workflow automates the process of transforming any website URL into a structured, intelligent company profile. It's triggered by a form, allowing a user to submit a website and choose between a "basic" or "deep" scrape. The workflow extracts key information (mission, services, contacts, SEO keywords), stores it in a structured Supabase database, and archives a full JSON backup to Google Drive. It also features a secondary AI agent that automatically finds and saves competitors for each company, building a rich, interconnected database of company intelligence. --- Quick Implementation Steps Import the Workflow: Import the provided JSON file into your n8n instance. Install Custom Community Node: You must install the community node from: https://www.npmjs.com/package/n8n-nodes-crawl-and-scrape FIRECRAWL N8N Documentation https://docs.firecrawl.dev/developer-guides/workflow-automation/n8n Install Additional Nodes: n8n-nodes-crawl-and-scrape and n8n-nodes-mcp fire crawl mcp . Set up Credentials: Create credentials in n8n for FIRE CRAWL API,Supabase, Mistral AI, and Google Drive. Configure API Key (CRITICAL): Open the Web Search tool node. Go to Parameters → Headers and replace the hardcoded Tavily AI API key with your own. Configure Supabase Nodes: Assign your Supabase credential to all Supabase nodes. Ensure table names (e.g., companies, competitors) match your schema. Configure Google Drive Nodes: Assign your Google Drive credential to the Google Drive2 and save to Google Drive1 nodes. Select the correct Folder ID. Activate Workflow: Turn on the workflow and open the Webhook URL in the “On form submission” node to access the form. --- What It Does Form Trigger Captures user input: “Website URL” and “Scraping Type” (basic or deep). Scraping Router A Switch node routes the flow: Deep Scraping → AI-based MCP Firecrawler agent. Basic Scraping → Crawlee node. Deep Scraping (Firecrawl AI Agent) Uses Firecrawl and Tavily Web Search. Extracts a detailed JSON profile: mission, services, contacts, SEO keywords, etc. Basic Scraping (Crawlee) Uses Crawl and Scrape node to collect raw text. A Mistral-based AI extractor structures the data into JSON. Data Storage Stores structured data in Supabase tables (companies, company_basicprofiles). Archives a full JSON backup to Google Drive. Automated Competitor Analysis Runs after a deep scrape. Uses Tavily web search to find competitors (e.g., from Crunchbase). Saves competitor data to Supabase, linked by company_id. --- Who's It For Sales & Marketing Teams: Enrich leads with deep company info. Market Researchers: Build structured, searchable company databases. B2B Data Providers: Automate company intelligence collection. Developers: Use as a base for RAG or enrichment pipelines. --- Requirements n8n instance (self-hosted or cloud) Supabase Account: With tables like companies, competitors, social_links, etc. Mistral AI API Key Google Drive Credentials Tavily AI API Key (Optional) Custom Nodes: n8n-nodes-crawl-and-scrape --- How It Works Flow Summary Form Trigger: Captures “Website URL” and “Scraping Type”. Switch Node: deep → MCP Firecrawler (AI Agent). basic → Crawl and Scrape node. Scraping & Extraction: Deep path: Firecrawler → JSON structure. Basic path: Crawlee → Mistral extractor → JSON. Storage: Save JSON to Supabase. Archive in Google Drive. Competitor Analysis (Deep Only): Finds competitors via Tavily. Saves to Supabase competitors table. End: Finishes with a No Operation node. --- How To Set Up Import workflow JSON. Install community nodes (especially n8n-nodes-crawl-and-scrape from npm). Configure credentials (Supabase, Mistral AI, Google Drive). Add your Tavily API key. Connect Supabase and Drive nodes properly. Fix disconnected “basic” path if needed. Activate workflow. Test via the webhook form URL. --- How To Customize Change LLMs: Swap Mistral for OpenAI or Claude. Edit Scraper Prompts: Modify system prompts in AI agent nodes. Change Extraction Schema: Update JSON Schema in extractor nodes. Fix Relational Tables: Add Items node before Supabase inserts for arrays (social links, keywords). Enhance Automation: Add email/slack notifications, or replace form trigger with a Google Sheets trigger. --- Add-ons Automated Trigger: Run on new sheet rows. Notifications: Email or Slack alerts after completion. RAG Integration: Use the Supabase database as a chatbot knowledge source. --- Use Case Examples Sales Lead Enrichment: Instantly get company + competitor data from a URL. Market Research: Collect and compare companies in a niche. B2B Database Creation: Build a proprietary company dataset. --- WORKFLOW IMAGE --- Troubleshooting Guide | Issue | Possible Cause | Solution | |-------|----------------|-----------| | Form Trigger 404 | Workflow not active | Activate the workflow | | Web Search Tool fails | Missing Tavily API key | Replace the placeholder key | | FIRECRAWLER / find competitor fails | Missing MCP node | Install n8n-nodes-mcp | | Basic scrape does nothing | Switch node path disconnected | Reconnect “basic” output | | Supabase node error | Wrong table/column names | Match schema exactly | --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. Contact: shilpa.raju@digitalbiz.tech For more such offerings, visit us: https://www.digitalbiz.tech ---
Daily cash flow reports with Google Sheets, Slack & Email for finance teams
Simplify financial oversight with this automated n8n workflow. Triggered daily, it fetches cash flow and expense data from a Google Sheet, analyzes inflows and outflows, validates records, and generates a comprehensive daily report. The workflow sends multi-channel notifications via email and Slack, ensuring finance professionals stay updated with real-time financial insights. 💸📧 Key Features Daily automation keeps cash flow tracking current. Analyzes inflows and outflows for actionable insights. Multi-channel alerts enhance team visibility. Logs maintain a detailed record in Google Sheets. Workflow Process The Every Day node triggers a daily check at a set time. Get Cash Flow Data retrieves financial data from a Google Sheet. Analyze Inflows & Outflows processes the data to identify trends and totals. Validate Records ensures all entries are complete and accurate. If records are valid, it branches to: Sends Email Daily Report to finance team members. Send Slack Alert to notify the team instantly. Logs to Sheet appends the summary data to a Google Sheet for tracking. Setup Instructions Import the workflow into n8n and configure Google Sheets OAuth2 for data access. Set the daily trigger time (e.g., 9:00 AM IST) in the "Every Day" node. Test the workflow by adding sample cash flow data and verifying reports. Adjust analysis parameters as needed for specific financial metrics. Prerequisites Google Sheets OAuth2 credentials Gmail API Key for email reports Slack Bot Token (with chat:write permissions) Structured financial data in a Google Sheet Google Sheet Structure: Create a sheet with columns: Date Cash Inflow Cash Outflow Category Notes Updated At Modification Options Customize the "Analyze Inflows & Outflows" node to include custom financial ratios. Adjust the "Validate Records" filter to flag anomalies or missing data. Modify email and Slack templates with branded formatting. Integrate with accounting tools (e.g., Xero) for live data feeds. Set different trigger times to align with your financial review schedule. Discover more workflows – Get in touch with us