Do you want to extract only numbers from the email subject line using Power Automate flow? This tutorial is for you here; I have explained how to extract numbers from the email subject line in Power Automate flow.
Scenario:
Recently, I got a requirement to extract only numbers from the email subject line using Power Automate flow.
Here, I will show you an example of extracting only numbers from the subject line when a new email arrives in Outlook using Flow.
Extract Numbers from Email Subjects using Power Automate
Let us see how to extract numbers from email subjects using Power Automate Flow
Step-1:
Create an automated cloud flow and select the trigger when a new email arrives (V3) from the trigger actions. Expand the trigger action and choose the parameter as highlighted below:
Folder: Select the Folder; here, I have selected my Inbox folder presented in Outlook from the show picker.
Step-2:
Add a new step and choose the select data operation; in the from section, pass the below expression, which splits the value and returns the array.
chunk(triggerOutputs()?['body/subject'],1)
In the Map section, switch the map to the text mode and use the below expression, which checks if the value is an integer and then returns the exact value; else, return the null value by using the if function and isInt() expression.
if(isInt(item()),item(),null)
Step-3:
Add a new step, choose the compose data operation, and use the below expression, which displays only the extracted numbers from the email subject line.
join(body('Select'),'')
Step-4:
Save and test the flow. I have sent an email from a testing user ID with the subject line Product – Hardisk ST3320SCEP Launched!
So the flow triggers automatically and runs successfully like below: In the Compose data operation output section, we can see it extracts only numbers from the email subject line
This is how to extract numbers from email subjects using Power Automate Flow.
Conclusion
I hope you get an idea of extracting only numbers from the subject line when a new email arrives in Outlook using Power Automate flow. Here, I have also shown you an example of extracting only numbers from the email subject line in Power Automate.
You may also like:
- How to Save Email Attachment to SharePoint using Power Automate?
- Send a Customized Email when a new file is added using Power Automate
- Send an Email When an Item is Deleted in SharePoint via Power Automate
- How to Send Birthday Email using Power Automate?
- How to Extract String After Character in Power Automate?
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.