cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Use dynamic Content in Expressions?

Hello,


i want use dynamic Content in Expressions.


I have the Received Time from e-mail and i want to use the Exppression "formatDateTime". But i dont know, how i can declare the dynamic content "Received Time" in the expression like formatDateTime([Received Time], MM-YYYY).

 

I want to export emails into onedrive for business an the name of the emails should look like this: "Subject-YYYY-MM". So when i use the dynamic content "Received Time", i get a timestamp like this 2017-12-20T10:00:00:0000Z. So i want to format the timestamp 🙂


Thanks for help!

3 REPLIES 3
Community Support Team
Community Support Team

Re: Use dynamic Content in Expressions?

Hi MS_ycmh1992,

 

Please try to add the following code in a Compose action, then you would get the date time formatted as “yyyy-MM”.

formatDateTime(triggerBody()?['DateTimeReceived'],'yyyy-MM')

3.PNG

Please have a try with it and feel free post back if you need more help.

 

More details about formatDateTime function, please see it at here:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Bangar
Level: Power Up

Re: Use dynamic Content in Expressions?

Yes , it worked for me. 

 

any idea on how to get the triggerBody() all attributes . 

 

Regards,

Bangar Raju

Highlighted
jfthuong
Level: Power Up

Re: Use dynamic Content in Expressions?

Aren't they visible in "Dynamic Content"?

 

What you can do is:

  • Go to "Expression"
  • Start entering your function
  • Click on "Dynamic Content"
  • Scroll and click on the attribute you need: it will add the value automatically in the expression

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,998)