Skip to main content

Automate email tracking & generate pixel for lead nurturing with Google Sheet

Workflow preview

Workflow preview
100%
Automate email tracking & generate pixel for lead nurturing with Google Sheet preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 , G...

Best for

  • Lead Nurturing automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.webhook, n8n-nodes-base.respondtowebhook, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.splitinbatches, n8n-nodes-base.googlesheets, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
Automate email tracking & generate pixel for lead nurturing with Google Sheet
Workflow name
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

  1. 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.

  2. 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.

  1. 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.

  1. 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
  2. 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
  3. 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:

  1. 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.
  2. Configure the Workflow:

    • In the "Get CRM," "Update CRM," and "Update Open email 1" nodes, update the documentId field to point to your new Google Sheet copy.
    • In the "Generate Pixel" node, locate the webhook_url assignment. Replace the placeholder text https://YOUR_N8N_WEBHOOK_URL with 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.
  3. 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.
  4. 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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 3 - Respond to Webhook

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 4 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 5 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 6 - Get CRM

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 7 - Generate Pixel

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Email Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 9 - Send email

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 10 - Update CRM

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 11 - Create data pixel in base64

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Create pixel image

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 14 - Get vars

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 15 - Update Open email 1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automate email tracking & generate pixel for lead nurturing with Google Sheet
Complexity advanced
Nodes 20
Categories Lead Nurturing, Multimodal AI
Author Davide
Published 26 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11248/11248.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate email tracking & generate pixel for lead nurturing with Google Sheet do?

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 , G...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, Multimodal AI use case.