cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnthonyPhan
Level 8

Add Dynamic content in text editor

Hi All, 
The standard way to add dynamic content into a feild is by using the side panel shown below.

This method becomes very comberson and unusable as the content becomes very large (for example the body of a email containing HTML content as well as dynamic content)

 

Is there a way I can simple add dynamic content withour using the side panel? for example by wrapping an expression is specific character e.g.

[concat('a','b')]

image.png

6 REPLIES 6

Re: Add Dynamic content in text editor

In the Body field, you can write whatever you want and mix it with any fields from the Dynamic Content.FlowMailBodyMixed.png

 

If you are using HTML (as the in the image above), ensure that it says "Yes" in the Is HTML? field under advanced options 🙂

Kind regards, John

AnthonyPhan
Level 8

Re: Add Dynamic content in text editor

Hi John,

 

Thank you for the response. Unfortunaly it does not address the question.

 

I would like to add dynamic contant without using the side panel. That way I can use a seperate text editor and simply past it into the field. This is ideal as my HTML content and span hundreds of lines. It is then very inconvenient to go tinot the side panel and add dynamic content in all the required spots.

Re: Add Dynamic content in text editor

Ok 🙂 Let me see if I got the correct understanding. You want to use an editor to add one or more fields from the Dynamic Content into an HTML code, without using the sidepanel, but simply by writing the additional code in an editor outside of the Flow portal.

 

Well, I took the code from my example, copied it and pasted it into an editor. What I got is this (same part as the previous image)

 

%2Fatea%2Esharepoint%2Ecom%2Fsites%2Fags-kb">
     <img src="https://atea.sharepoint.com/sites/ags-kb/style library/images/hr/UsingAGSKB.png" height="128" title="Nominate employee using AGS KB!">
     <p>@{items('Apply_to_each')?['Title']}Using AGS KB</p>
    </a>
   </td>

 

The bold part is the field from the Dynamic Content! I then pasted it back into the body field and ran my flow - it works as normal!

So yes, it can be done and the only issue is to get the formula correct !

 

Good luck, kind regards, John

AnthonyPhan
Level 8

Re: Add Dynamic content in text editor

Hi John,

 

Yes your understanding is correct. I also tried what you described but with an extra step.

 

1) copy fields

2) paste into text editor (notepad++)

3) Copy the text from the text editor

4) Paste back into Flow

 

The above steps did not work as flow did not detect the dynamic content. Can you confirm you did step 3, as it is necessry in order to make edits to the code. I belive the clipboard contains some meta data for the dynamic content that does not appear in the text editor.

 

Re: Add Dynamic content in text editor

Yes, I can do all the steps.

1) Identify the fields I need, add them to the body!

FlowMailBodyExample.png

 

 

 

 

 

 

 

 

2) Copy the above to Notepad++ and you get this!

FlowMailBodyCode.png 

 

3) Modify the code to this - add new row with Modified date directly in the Notepad++!

FlowMailBodyNewCode.png 

 

4) Paste back into the flow, mail body, and ran the flow - got this e-mail with the modified date also!

FlowMailNewReceived.png

 

The only problem is to get the code for the fields correct.

Kind regards, John

 

 

 

 

 

 

 

 

Community Support Team
Community Support Team

Re: Add Dynamic content in text editor

Hi @ AnthonyPhan,

 

Does @JohnAageAnderse’s last reply solve your problem? The solution is works on my side.

 

You could refer to steps below:

1. You could add a “Created” dynamic content in the Body field as below:

8.png

2. You could copy the “Created” dynamic content to a Notepad, the expression in the Notepad as below:

@{triggerBody()?['Created']}

3.Copy the expression from the Notepad to the body field of the “Send an email”.

9.png

4.You could add another expression of “Modified” by copy the expression of “Created” and modify it.

10.png

The flow would run successfully as below:

 11.png

 

 

Regards,
Alice Zhang

Helpful resources

Announcements
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 Kudoed Authors
Users Online
Currently online: 176 members 5,900 guests
Please welcome our newest community members: