Skip to main content

Notifications

Community site session details

Community site session details

Session Id : mGoMfS2Fu/tOe0tWbygpBg
Power Automate - General Discussion
Suggested answer

Track Email Opens using a Pixel Tracker and Power Automate

Like (2) ShareShare
ReportReport
Posted on 11 Nov 2024 04:19:29 by 10
Hi All,

I have been searching fo this, but could not find a complete and comprehensive solution, so I built my own solution that I am sharing this to you here
 
How does it work?
The core of this email tracking system lies in the use of an HTML image tag linked to a Power Automate HTTP request URL. Here’s how it operates at high level:

Embedding the Tracker: Whenever you send an email that you want to track, you’ll embed a 1x1 pixel image tag in the email body. This image tag’s src attribute points to a unique Power Automate HTTP request URL.

Triggering the Power Automate Flow: When the recipient opens the email, their email client tries to load the embedded image by sending a request to the Power Automate URL.

Logging and Serving the Pixel:
Power Automate captures this request, triggering the flow to log that the email has been opened.
The flow then serves the transparent 1x1 pixel image back to the email client, completing the request and rendering the image invisibly to the recipient.
With the basics covered, let’s dive into how to implement this email tracker step-by-step.

Step 1: Create Your Tracking Pixel
Host the Pixel Image: You’ll need to host a transparent 1x1 pixel image file online, either on your server or via cloud storage, like Azure Blob Storage or SharePoint. What is important is that you have an URL and anyone call reach this URL.


Save the URL for later use. With your pixel tracker ready, we can use Power Automate to capture when the image is accessed.

Step 2: Create a Power Automate Flow to Capture Opens
Create a new Power Automate Flow with an HTTP request Trigger:

 
This step will receive HTTP requests whenever the pixel is accessed (we will this part later in step 3).
 
Configure the HTTP trigger to accept GET requests, as the image URL will send a GET request every time it's loaded.
Configure to allow anyone to trigger the Flow
 

We’ll add custom parameters to the URL generated by Power Automate. These parameters allow us to capture key tracking details:
email: Identifies the email recipient.
trackID: A short identifier for the campaign.
emailId: Tags each individual email within the campaign to distinguish multiple sends.

Extract Query Parameters

There are many resources available online on how to extract query parameters in an HTTP requet.
We save this parameters into 3 separate Variables
 
 
Store information:

Store the captured data in a location that suits your reporting needs, such as SharePoint line, Dataverse, or Excel Online.
 

Get and Serve the Pixel

Since this HTTP request will be added to an image tag, it needs to serve an image in response to the email client. Here’s how it works:
 

Add an HTTP call using the URL of the image hosted in our Step 1

 
We serve this response which end the Flow
 
 
Step 3: Embed the Tracking Pixel in Your Email
Add and IMG HTML Tag to your email. URL will be provided by Power Automate (see begining of step 2). To this URL, add our custom parameter too: trackID, email and emailId
 

Test and Analyze Results
Send a few test emails to verify that the pixel triggers the HTTP request correctly and that Power Automate logs the open events.
If everything works well, you should start seeing entries where the information is stored as soon as the email is opened.
 

Hope you enjoyed this tutorial!
 

 
Categories:
  • Suggested answer
    SangKitameraki Profile Picture
    10 on 18 Apr 2025 at 07:38:07
    Track Email Opens using a Pixel Tracker and Power Automate
    @lex02, thanks for the feedback
    In case you like it, I also post how to track click on email link here: https://www.kitameraki.com/post/how-to-easily-track-link-clicks-in-your-marketing-emails-using-power-automate
  • lex02 Profile Picture
    4 on 17 Apr 2025 at 12:34:47
    Track Email Opens using a Pixel Tracker and Power Automate
    This worked flawlessly for me. Thank you so much

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,077 Most Valuable Professional

Leaderboard
Loading started