How To Change An Email Subject In Power Automate
Power Automate can be used to change an email subject line. There is no dedicated flow action to do this. However, we can call the Microsoft Graph API with the Outlook Send An HTTP Request action and use it to change the email’s subject if we know the right endpoint. Best of all, it doesn’t require any premium licensing.
Table of Contents
• Introduction: The IT Helpdesk Case Id Automation
• Configure The "When A New Email Arrives" Trigger Settings
• Change The Email Subject Using The Microsoft Graph API
• Run The Flow To Update An Email Subject In Power Automate
Introduction: The IT Helpdesk Case Id Automation
The IT helpdesk at a financial services company tracks each case by assigning it a unique case id. When a new request for help email is received in their inbox the helpdesk uses Power Automate to change the subject line to include a Case Id.
For example, [Case Id #1] appears at the end of this email’s subject line.
Configure The “When A New Email Arrives” Trigger Settings
Open Power Automate and create a new automated flow using the Office 365 Outlook – When A New Email Arrives (V3) trigger. Choose the Folder named Inbox.
Go to the trigger’s Settings and enable Split On. This tells Power Automate to evaluate each email individually as it arrives in the inbox.
We also want to determine whether the flow needs to add a Case Id or if it already has one.
Use this expression in the Trigger Conditions to only change the subject line of emails with no Case Id.
Change The Email Subject Using The Microsoft Graph API
The new email subject line should include the original subject and then append a tracking number to the end. Add a Data Operations – Compose action to the flow with the following values in the Inputs field. In this tutorial we will use a hardcoded value since the focus is on how to update the Subject Line.
There is not any Power Automate action to change a subject line so we must use the Microsoft Graph API instead. Insert the Office 365 Outlook – Send An HTTP Request action into the flow and select the PATCH method.
Use the following URI to update the message object.
Supply this JSON to the Body of the action.
Write this code in the Content-Type field.
Run The Flow To Update An Email Subject In Power Automate
That’s all we need to change the email subject line of an incoming message. Press the Test button in the Power Automate editor and then send an email to the target inbox.
The flow will complete successfully.
And the email subject line will be updated to include [Case Id# 1] at the end.
Did You Enjoy This Article? 😺
Subscribe to get new Power Apps & Power Automate articles sent to your inbox each week for FREE
If you have any questions or feedback about How To Change An Email Subject In Power Automate please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.