Back to Templates
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.
Webhook Trigger (Request img
)
/webhook/change-with-your-id
id
to identify the recipient.Set Base64 Data (Create data pix
)
data
containing a Base64-encoded transparent PNG image (1x1 pixel).Convert to Binary (Create img bin
)
data
string into a binary file.image/png
.Respond to Webhook (Respond to Webhook
)
Logging (Do anything to log
)
id
or request metadata.id
using {{$json["query"]["id"]}}
.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.