n8n

How to Capture Email Opens for Campaign Analytics?

Get reliable email open tracking with a tiny image served from n8n. Marketers and sales teams can see when an email loads and tie it to a contact using a simple id in the link. It is a fast way to measure campaign engagement without buying extra tools.

A public webhook receives the request each time the image loads in the mailbox. A Set node holds a base64 version of a 1x1 transparent PNG, then Convert to File turns it into a real image with the image/png type. Respond to Webhook streams the binary file back so the email client displays it, while an optional step can log the id and request details for reporting. The flow is light, has no external credentials, and returns the image in milliseconds.

Set your own webhook path, publish the URL, and place it in an img tag inside your HTML email with a query like id equals 123. As opens come in, you can record time, user agent, and source by expanding the logging step or adding a database node. Expect quick insight into subject line tests and follow ups while cutting manual tracking work from hours to minutes.

What are the key features?

  • Webhook endpoint returns a 1x1 transparent PNG when called
  • Set node stores base64 pixel data in a field named data
  • Convert to File creates a binary image named pixel with image/png
  • Respond to Webhook streams the binary image back to the caller
  • NoOp step available to log id, timestamp, IP, and user agent
  • Supports id query parameter for per contact tracking
  • No external credentials or APIs required

What are the benefits?

  • Reduce manual open tracking from hours to minutes
  • Identify which contact opened using an id in the URL
  • Serve a tiny 1x1 image that uses very little bandwidth
  • Works with any email platform that supports HTML images
  • Keep all data in your own system with no outside service
  • Handle large send volumes with a simple endpoint

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. Open the Request img node and set a unique path so the URL is easy to manage. Copy the Production URL for use in emails.
  3. In the Request img node, confirm Response Mode is set to use a Response node and that it points to Respond to Webhook.
  4. Open the Create data pix node and keep the provided base64 string for the 1x1 transparent PNG or replace it with your own pixel data.
  5. Open the Create img bin node and confirm Source Property is data, Binary Property Name is pixel, and MIME type is image/png.
  6. Activate the workflow. Open the Production webhook URL in a browser and confirm you receive a 200 response with content type image/png.
  7. Place the Production URL inside an img tag in your HTML email and add a query parameter like id=123 to identify the contact.
  8. Send a test email to yourself, open it, then check the n8n executions list. Review the NoOp step or execution data to see the id and request details.
  9. If you want to store events, add a database or spreadsheet node after the NoOp step and map fields such as id, timestamp, IP, and user agent.
  10. If images do not load, check that your n8n instance is public and uses a valid SSL certificate. Some email clients block images, so test across clients.
  11. If you see caching, add a cache buster query like t={{$now}} so each open forces a fresh request.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.