cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
th_son
New Member

Use text from an email in push notification message

Hi,

 

I woudl like to setup a flow that will send me a push notification when I receive a specific email. I want to use the contents of the email to compose the message for the push notification.

 

Some details about the email:

  • Email will always come from same address.
  • The email comes in as HTML

What I have do so far:

  • The flow will trigger when I receive this specific email
  • I convert the email to plain text.

Email after conversion

Alert

Customer

Company Name

Title

Some very important Alert

Severity

Informational

Category

UnwantedSoftware
Detection Time

The date and Time

Some Portal Portal Link

Generic HTML Link



This message from Microsoft is an important part of a program, service, or
product that you or your company purchased or participates in.

Microsoft respects your privacy. Please read ourPrivacy Statement
Generic HTML Link

Microsoft Corporation
One Microsoft Way
Redmond, WA 98052 USA 

Generic HTML Link

I want to take "Severity", "Informational", "Category", and "UnwantedSoftware" and format it like this:

Severity: Informational
Category: UnwantedSoftware

The "Information" and "UnwantedSoftware" part may not always read that way, it could change based on what triggers the email.

 

Any ideas on how I might do that?

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @th_son,

 

You could add a Compose under the "Html to text" action, and then choose the "the plain text content" dynamic content of the "Html to text" action in the Compose input field,

And then refer to screenshot below to create the flow:

Capture.PNG

 

The expression in Informational action the as below:

last(split(first(split(outputs('Compose'),'Category')),'Severity'))

The expression in UnwantedSoftware action the as below:

last(split(first(split(outputs('Compose'),'Detection Time')),'Category'))

 

The expression in the Compose 4 action the as below:

concat('Severity:',outputs('Informational'),'Category:',outputs('UnwantedSoftware'))

 

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

2 REPLIES 2
v-yuazh-msft
Community Support
Community Support

Hi @th_son,

 

You could add a Compose under the "Html to text" action, and then choose the "the plain text content" dynamic content of the "Html to text" action in the Compose input field,

And then refer to screenshot below to create the flow:

Capture.PNG

 

The expression in Informational action the as below:

last(split(first(split(outputs('Compose'),'Category')),'Severity'))

The expression in UnwantedSoftware action the as below:

last(split(first(split(outputs('Compose'),'Detection Time')),'Category'))

 

The expression in the Compose 4 action the as below:

concat('Severity:',outputs('Informational'),'Category:',outputs('UnwantedSoftware'))

 

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

Hi Alice,

 

So I tested this out and it works great. Thank you so much for taking the time to respond.

I am just curious though, how does it actually work?

 

I am especially confused by the following:

last(split(first(split(outputs('Compose'),'Category')),'Severity'))

I was trying to follow it to understand how it is actually accomplishing its task, but I haven't had any luck.

 

That may be a loaded question so I don't blame you if you don't respond.

 

On a side note, when the push notification comes in I get the test all on one line? Is it possible to separate "Severity" and "Category" onto their own lines?

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,705)