cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mrudd
Frequent Visitor

When a new email arrives (V3) initialize variable string value from email subject.

With the 'When a new email arrives (V2)' for Outlook.com I can then initialize a variable with a simple expression such as:

 

concat(triggerBody()?['Subject'],triggerBody()?['From'])

 

However I can't do this with "When a new email arrives (V3)' for Office 365 Outlook.  It just returns null. Is it broken or do I have to use some other method?

 

How can I get the 'subject' into a string variable from this trigger?

 

Thanks

-Mike

1 ACCEPTED SOLUTION

Accepted Solutions
Mrudd
Frequent Visitor

For anyone searching, I found a way to get this.  I had to Initialize Variable and just make the value something that worked first. eg: triggerOutputs()?['Body']

 

Then below in an "apply to each" I could then use 'Set Variable' to select the dynamic content 'Subject' or any concat/substring expression.

 

-Mike 

View solution in original post

4 REPLIES 4
ekarim2020
Resident Rockstar
Resident Rockstar

Try the following, which is based on dynamic content:

concat(triggerOutputs()?['body/subject'],triggerOutputs()?['body/from'])

 

ekarim2020_0-1631316324333.png

Ellis

Mrudd
Frequent Visitor

Thanks for the suggestion.  I tried that, but it still returned blank.   I know we recently enabled MFA, could that be causing any kind of an issue?  I have already gone through and reauthorized my connections though.

 

Thanks

-Mike

Mrudd
Frequent Visitor

Also in the attempts. I tried to just select the dynamic content.  However PowerAutomate automatically wraps that in an 'Apply to each' object.  Then the initialize variable doesn't work.

Mrudd_0-1631556336748.png

 

Mrudd
Frequent Visitor

For anyone searching, I found a way to get this.  I had to Initialize Variable and just make the value something that worked first. eg: triggerOutputs()?['Body']

 

Then below in an "apply to each" I could then use 'Set Variable' to select the dynamic content 'Subject' or any concat/substring expression.

 

-Mike 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Top Solution Authors
Users online (2,802)