Automate email tracking & generate pixel for lead nurturing with Google Sheet
This workflow automates the process of sending personalized lead-nurturing emails and tracking when each recipient opens the message through a custom tracking pixel. It integrates Google Sheets, Gmail, OpenAI, and webhooks to generate, deliver, and monitor engagement with your email sequence.
It sends personalized emails containing a unique, invisible tracking pixel and then monitors who opens the email by detecting when the pixel is loaded, logging the activity back to a Google Sheets CRM.
Key Features
✅ 1. Fully Automated Lead Nurturing
Once leads are added to the Google Sheet, the workflow handles everything:
- Generating email content
- Creating tracking pixels
- Sending emails
- Updating CRM fields
No manual actions required.
✅ 2. Real-Time Email Open Tracking
Thanks to the pixel + webhook integration:
- You instantly know when a lead opens an email
- Data is written back to the CRM automatically
- No external email marketing platforms are needed
✅ 3. Infinite Scalability with Zero Extra Cost
You can send emails and track performance using:
- n8n (self-hosted or cloud)
- Gmail
- Google Sheets
- AI-generated content
This replicates features of expensive tools like HubSpot or Mailchimp—without their limits or pricing tiers.
✅ 4. Clean and Organized CRM Updates
The system keeps your CRM spreadsheet structured by automatically updating:
- Send dates
- Pixel IDs
- Open status
This ensures you always have accurate, up-to-date engagement data.
✅ 5. Easy to Customize and Expand
You can easily add:
- Multi-step email sequences
- Click tracking
- Lead scoring
- Zapier/Make integrations
- CRM synchronization
The workflow is modular, so each step can be modified or extended.
How it Works
-
Load Lead Data from Google Sheets
The workflow reads your CRM-like Google Sheet containing lead information (name, email, and status fields such as EMAIL 1 SEND, PIXEL EMAIL 1, etc.).
This allows the system to fetch only the leads that haven’t received Email 1 yet.
-
Generate a Unique Tracking Pixel
For each lead, the workflow creates a unique identifier (“pixel ID”). This ID is later appended to a small invisible 1×1 image—your tracking pixel.
Example pixel structure used in emails:
<img src width="1" height="1">
When the email client loads this image, n8n detects the open event via the webhook.
-
Use AI to Generate a Personalized HTML Email
An OpenAI node creates the email body in HTML, inserting the tracking pixel directly inside the content. This ensures the email is personalized, consistent, and automatically includes the tracking mechanism.
-
Send the Email via Gmail
The Gmail node sends the generated HTML email to the lead.
After sending, the workflow updates the Google Sheet to log:
- Email sent flag
- Pixel ID generated
- Sending date
-
Detect Email Opens with Webhook + Pixel Image When the recipient opens the email, their client loads the hidden pixel. That triggers your webhook, which:
- Extracts the pixel ID and email address from the query parameters
- Matches it with the lead in Google Sheets
-
Update CRM When Email Is Opened
The workflow updates the CRM by marking OPEN EMAIL 1 as “yes” for the corresponding pixel ID.
This transforms your sheet into a live tracking dashboard of lead engagement.
Set up Steps
To configure this workflow, follow these steps:
-
Prepare the CRM:
- Make a copy of the provided Google Sheet template.
- In your copy, fill in the "DATE," "FIRST NAME," "LAST NAME," and "EMAIL" columns with your lead data.
-
Configure the Workflow:
- In the "Get CRM," "Update CRM," and "Update Open email 1" nodes, update the
documentIdfield to point to your new Google Sheet copy. - In the "Generate Pixel" node, locate the
webhook_urlassignment. Replace the placeholder texthttps://YOUR_N8N_WEBHOOK_URLwith the actual, production webhook URL generated by the "Webhook" node in your n8n environment. Important: After setting this, you must activate the workflow for the webhook to be live and able to receive requests.
- In the "Get CRM," "Update CRM," and "Update Open email 1" nodes, update the
-
Configure Credentials:
- Ensure the following credentials are correctly set up in your n8n instance:
- Google Sheets OAuth2 API: For reading from and updating the CRM sheet.
- Gmail OAuth2: For sending emails.
- OpenAI API: For generating the email content.
- Ensure the following credentials are correctly set up in your n8n instance:
-
Test and Activate:
- Execute the workflow once manually to send test emails. Check the Google Sheet to confirm that the "EMAIL 1 SEND," "PIXEL EMAIL 1," and "EMAIL 1 DATE" columns are populated.
- Open one of the sent test emails to trigger the tracking pixel.
- Verify in the Google Sheet that the corresponding lead's "OPEN EMAIL 1" field is updated to "yes."
- Once testing is successful, activate the workflow.
Summary
This workflow provides a powerful, low-cost automation system that:
- Sends personalized AI-generated emails
- Tracks email opens via a unique pixel
- Logs all actions into Google Sheets
- Automatically updates lead engagement data
Need help customizing?
Contact me for consulting and support or add me on Linkedin.
Automate Email Tracking & Generate Pixel for Lead Nurturing with Google Sheet
This n8n workflow streamlines your lead nurturing process by automating email tracking and generating unique tracking pixels for each lead. It integrates with Google Sheets to manage lead data, creates personalized tracking pixels, and allows you to send emails with these pixels to monitor engagement.
What it does
- Triggers Manually: The workflow can be initiated manually to process a batch of leads.
- Reads Lead Data from Google Sheets: It fetches lead information (e.g., email addresses) from a specified Google Sheet.
- Loops Through Each Lead: The workflow processes each row (lead) from the Google Sheet individually.
- Generates Unique Tracking Pixel URL: For each lead, it constructs a unique URL for an email tracking pixel using a Webhook. This pixel URL includes a unique identifier for the lead.
- Updates Google Sheet with Pixel URL: The generated tracking pixel URL is then written back to the corresponding lead's row in the Google Sheet.
- Sends Email with Tracking Pixel: It sends an email to the lead, embedding the unique tracking pixel in the email body. This allows you to monitor when the email is opened.
- Responds to Webhook (Pixel Hit): When a recipient opens an email, the tracking pixel is "hit," triggering the Webhook. The workflow then updates the Google Sheet, marking the email as "opened" for that specific lead.
- AI Agent for Email Content (Optional/Placeholder): The workflow includes an AI Agent node, likely intended for generating or refining email content, though its specific configuration isn't detailed in the provided JSON.
- OpenAI Chat Model (Optional/Placeholder): Similarly, an OpenAI Chat Model node is present, suggesting potential use for dynamic email content generation or personalization.
- Converts Data to File (Optional/Placeholder): A "Convert to File" node is included, which could be used for exporting data, perhaps for reporting or further processing, but its exact role in this flow is not explicitly defined.
Prerequisites/Requirements
- n8n Account: A running instance of n8n.
- Google Sheets Account: A Google Sheet containing your lead data (at least email addresses and a column for the tracking pixel URL and opened status).
- Gmail Account: For sending emails.
- OpenAI API Key (Optional): If you intend to use the AI Agent or OpenAI Chat Model for dynamic content generation.
Setup/Usage
- Import the Workflow: Import the provided JSON into your n8n instance.
- Configure Credentials:
- Google Sheets: Set up your Google Sheets credential to allow n8n to read from and write to your spreadsheet.
- Gmail: Configure your Gmail credential to enable n8n to send emails on your behalf.
- Webhook: The Webhook node will automatically generate a unique URL when activated. This URL is used as the tracking pixel.
- OpenAI (Optional): If using the AI nodes, configure your OpenAI API key credential.
- Update Google Sheet Node (ID: 18):
- Specify the Spreadsheet ID and Sheet Name where your lead data is stored.
- Ensure the columns for email, tracking pixel URL, and opened status are correctly referenced.
- Update Edit Fields Node (ID: 38):
- Verify that the fields being edited or added (e.g.,
pixelUrl) match your Google Sheet column names and desired data structure.
- Verify that the fields being edited or added (e.g.,
- Update Gmail Node (ID: 356):
- Configure the "To" email address to use the email from your Google Sheet (e.g.,
{{ $json.email }}). - Craft your email subject and body. Crucially, embed the tracking pixel URL in the email body. This can be a small, invisible image tag like
<img src="{{ $json.pixelUrl }}" width="1" height="1">.
- Configure the "To" email address to use the email from your Google Sheet (e.g.,
- Activate the Workflow: Once configured, activate the workflow.
- Execute Manually: Click "Execute Workflow" on the "When clicking ‘Execute workflow’" node (ID: 838) to start processing your leads.
- Monitor Webhook Responses: The "Respond to Webhook" node (ID: 535) will be triggered when an email containing the tracking pixel is opened, updating your Google Sheet with the opened status.
Related Templates
Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax
Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions
Synchronizing WooCommerce inventory and creating products with Google Gemini AI and BrowserAct
Synchronize WooCommerce Inventory & Create Products with Gemini AI & BrowserAct This sophisticated n8n template automates WooCommerce inventory management by scraping supplier data, updating existing products, and intelligently creating new ones with AI-formatted descriptions. This workflow is essential for e-commerce operators, dropshippers, and inventory managers who need to ensure their product pricing and stock levels are synchronized with multiple third-party suppliers, minimizing overselling and maximizing profit. --- Self-Hosted Only This Workflow uses a community contribution and is designed and tested for self-hosted n8n instances only. --- How it works The workflow is typically run by a Schedule Trigger (though a Manual Trigger is also shown) to check stock automatically. It reads a list of suppliers and their inventory page URLs from a central Google Sheet. The workflow loops through each supplier: A BrowserAct node scrapes the current stock and price data from the supplier's inventory page. A Code node parses this bulk data into individual product items. It then loops through each individual product found. The workflow checks WooCommerce to see if the product already exists based on its name. If the product exists: It proceeds to update the existing product's price and stock quantity. If the product DOES NOT exist: An If node checks if the missing product's category matches a predefined type (optional filtering). If it passes the filter, a second BrowserAct workflow scrapes detailed product attributes from a dedicated product page (e.g., DigiKey). An AI Agent (Gemini) transforms these attributes into a specific, styled HTML table for the product description. Finally, the product is created in WooCommerce with all scraped details and the AI-generated description. Error Handling: Multiple Slack nodes are configured to alert your team immediately if any scraping task fails or if the product update/creation process encounters an issue. Note: This workflow does not support image uploads for new products. To enable this functionality, you must modify both the n8n and BrowserAct workflows. --- Requirements BrowserAct API account for web scraping BrowserAct n8n Community Node -> (n8n Nodes BrowserAct) BrowserAct templates named “WooCommerce Inventory & Stock Synchronization” and “WooCommerce Product Data Reconciliation” Google Sheets credentials for the supplier list WooCommerce credentials for product management Google Gemini account for the AI Agent Slack credentials for error alerts --- Need Help? How to Find Your BrowseAct API Key & Workflow ID How to Connect n8n to Browseract How to Use & Customize BrowserAct Templates How to Use the BrowserAct N8N Community Node --- Workflow Guidance and Showcase STOP Overselling! Auto-Sync WooCommerce Inventory from ANY Supplier
Tax deadline management & compliance alerts with GPT-4, Google Sheets & Slack
AI-Driven Tax Compliance & Deadline Management System Description Automate tax deadline monitoring with AI-powered insights. This workflow checks your tax calendar daily at 8 AM, uses GPT-4 to analyze upcoming deadlines across multiple jurisdictions, detects overdue and critical items, and sends intelligent alerts via email and Slack only when immediate action is required. Perfect for finance teams and accounting firms who need proactive compliance management without manual tracking. 🏛️🤖📊 Good to Know AI-Powered: GPT-4 provides risk assessment and strategic recommendations Multi-Jurisdiction: Handles Federal, State, and Local tax requirements automatically Smart Alerts: Only notifies executives when deadlines are overdue or critical (≤3 days) Priority Classification: Categorizes deadlines as Overdue, Critical, High, or Medium priority Dual Notifications: Critical alerts to leadership + daily summaries to team channel Complete Audit Trail: Logs all checks and deadlines to Google Sheets for compliance records How It Works Daily Trigger - Runs at 8:00 AM every morning Fetch Data - Pulls tax calendar and company configuration from Google Sheets Analyze Deadlines - Calculates days remaining, filters by jurisdiction/entity type, categorizes by priority AI Analysis - GPT-4 provides strategic insights and risk assessment on upcoming deadlines Smart Routing - Only sends alerts if overdue or critical deadlines exist Critical Alerts - HTML email to executives + Slack alert for urgent items Team Updates - Slack summary to finance channel with all upcoming deadlines Logging - Records compliance check results to Google Sheets for audit trail Requirements Google Sheets Structure Sheet 1: TaxCalendar DeadlineID | DeadlineName | DeadlineDate | Jurisdiction | Category | AssignedTo | IsActive FED-Q1 | Form 1120 Q1 | 2025-04-15 | Federal | Income | John Doe | TRUE Sheet 2: CompanyConfig (single row) Jurisdictions | EntityType | FiscalYearEnd Federal, California | Corporation | 12-31 Sheet 3: ComplianceLog (auto-populated) Date | AlertLevel | TotalUpcoming | CriticalCount | OverdueCount 2025-01-15 | HIGH | 12 | 3 | 1 Credentials Needed Google Sheets - Service Account OAuth2 OpenAI - API Key (GPT-4 access required) SMTP - Email account for sending alerts Slack - Bot Token with chat:write permission Setup Steps Import workflow JSON into n8n Add all 4 credentials Replace these placeholders: YOURTAXCALENDAR_ID - Tax calendar sheet ID YOURCONFIGID - Company config sheet ID YOURLOGID - Compliance log sheet ID C12345678 - Slack channel ID tax@company.com - Sender email cfo@company.com - Recipient email Share all sheets with Google service account email Invite Slack bot to channels Test workflow manually Activate the trigger Customizing This Workflow Change Alert Thresholds: Edit "Analyze Deadlines" node: Critical: Change <= 3 to <= 5 for 5-day warning High: Change <= 7 to <= 14 for 2-week notice Medium: Change <= 30 to <= 60 for 2-month lookout Adjust Schedule: Edit "Daily Tax Check" trigger: Change hour/minute for different run time Add multiple trigger times for tax season (8 AM, 2 PM, 6 PM) Add More Recipients: Edit "Send Email" node: To: cfo@company.com, director@company.com CC: accounting@company.com BCC: archive@company.com Customize Email Design: Edit "Format Email" node to change colors, add logo, or modify layout Add SMS Alerts: Insert Twilio node after "Is Critical" for emergency notifications Integrate Task Management: Add HTTP Request node to create tasks in Asana/Jira for critical deadlines Troubleshooting | Issue | Solution | |-------|----------| | No deadlines found | Check date format (YYYY-MM-DD) and IsActive = TRUE | | AI analysis failed | Verify OpenAI API key and account credits | | Email not sending | Test SMTP credentials and check if critical condition met | | Slack not posting | Invite bot to channel and verify channel ID format | | Permission denied | Share Google Sheets with service account email | 📞 Professional Services Need help with implementation or customization? Our team offers: 🎯 Custom workflow development 🏢 Enterprise deployment support 🎓 Team training sessions 🔧 Ongoing maintenance 📊 Custom reporting & dashboards 🔗 Additional API integrations Discover more workflows – Get in touch with us