Transparent tracking pixel for email open detection
$20/month : Unlimited workflows
2500 executions/month
THE #1 IN WEB SCRAPING
Scrape any website without limits
HOSTINGER 🎉 Early Black Friday Deal
DISCOUNT 20% Try free
DISCOUNT 20%
Self-hosted n8n
Unlimited workflows - from $4.99/mo
#1 hub for scraping, AI & automation
6000+ actors - $5 credits/mo
📌 Description
This workflow serves a 1x1 transparent PNG image via a webhook, which can be embedded in an email to track when the email is opened. When the image is loaded by the recipient's email client, the webhook is triggered, optionally capturing a userId to identify who opened the email.
📂 Workflow Steps
Webhook Trigger (
Request img)- Path:
/webhook/change-with-your-id - Triggered by an HTTP request (e.g. when the image is loaded in an email).
- Accepts a query parameter
idto identify the recipient.
- Path:
Set Base64 Data (
Create data pix)- Creates a variable
datacontaining a Base64-encoded transparent PNG image (1x1 pixel).
- Creates a variable
Convert to Binary (
Create img bin)- Converts the Base64
datastring into a binary file. - Sets MIME type to
image/png.
- Converts the Base64
Respond to Webhook (
Respond to Webhook)- Sends the binary image file in the HTTP response.
Logging (
Do anything to log)- Placeholder node to log or process the
idor request metadata. - You can access the
idusing{{$json["query"]["id"]}}. - You can also use any parameter you want
- Placeholder node to log or process the
✉️ How to Use in Emails
Embed the image in an HTML email like this:
<img src="https://<your-n8n-instance>/webhook/db4880e7-2134-4994-94e5-a4a3aa120440?id=1234" width="1" height="1" alt />
When the email is opened and the image is loaded, the workflow will be triggered.
🛠️ Notes
- Some email clients block images by default; this may prevent tracking.
- You can enhance the workflow to store open events in a database, log the timestamp, IP, or user agent.
- Make sure to comply with data privacy and consent regulations (e.g. GDPR).