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

Send an email (V2) Dynamic Content

When using Send an email (v2) and viewing in Code View, I add a Dynamic field to the content (i.e. a hyperlink a href="<dynamic field>") but when I change the view back Html View it changes the whole email body.

 

For example code view will turn from this:

<a href="http://system.domain.com/index.php?id=[Dynamic Content]&code=[Dynamic Content]">click here</a>

Changed into this:

[Dynamic Content]<a href="http://system.domain.com/index.php?id=&lt;object custom=">&amp;code=</a>[Dynamic Content]<a href="href="http://system.domain.com/index.php?id=&lt;object custom=">"&gt;click here</a>

Absoultely no idea how this happens.. But if I set the code view with the Dynamic Content and Save the Flow, it will work.

However next time I open the Send an email (V2) step it displays as above...

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Frequent Visitor

Re: Send an email (V2) Dynamic Content

I used an expression inside the email body using concat function:

concat('<a href="https://{url first part}',variables('myvar'),'{url last part}">Description</a>'

 

After you save, just use peek code for the Send an email (V2) and see the html body.

 

It was tested and working until they solve the email body editor.

View solution in original post

Highlighted
Frequent Visitor

Re: Send an email (V2) Dynamic Content

I solved a similar problem by using a variable.  I initialized a variable varHtmlLinkToItem like this:

variable1.png

then I added this variable in the html view of the Send an Email (v2) action:

variable2.png

 

View solution in original post

14 REPLIES 14
Highlighted
Community Support
Community Support

Re: Send an email (V2) Dynamic Content

Hi @jasonbic ,

 

If you want to add a similar hyperlink tag to email body, it is recommended to use Send an email action directly and set Is html field to Yes.

 

In addition, if you are configuring a hyperlink in Send an email (V2) action, please manually configure Link Title and Link Target using the feature provided in the editing tool.

Image refernece:

4.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Send an email (V2) Dynamic Content

@v-bacao-msftthank you for your response.

 

Is there a reason Send an email is recommended over Send an email (V2)?

 

Additionally, you cannot add Dynamic Content when using Link Title and Link Target.

Highlighted
Helper I
Helper I

Re: Send an email (V2) Dynamic Content

Hi,

Recently 'send an email' has been depreciated and it is still not possible to ad dynamic content to a hyperlink in send an email V2.  Will this be added soon? We send a link to a sharepoint item in emails, and this is not useable anymore.

thanks

Highlighted
Helper I
Helper I

Re: Send an email (V2) Dynamic Content

We have this issue as well. Can't select the old send email, and can't send any new dynamic links now. 

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Send an email (V2) Dynamic Content

This is kind of a big deal... I'm using the new V2 Send and email actions but my carefully crafted HTML email gets hosed the moment I add a simple link that contains the item's ID appended to the URL as a query string parameter.

 

Isn't this one of the simplest and most typical uses of Flow? How can this just straight up not work properly?

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Send an email (V2) Dynamic Content

This is not "Solved" by the way.

Highlighted
Frequent Visitor

Re: Send an email (V2) Dynamic Content

Still not working, this need to be be fixed.

 

Either allow dynamic content to be used in the link target or the ability to set Is html on the on the mail.

 

With the "Send an Email"-actiongone this is really frustrating when you ned to create links based on dynamic content... 

Highlighted
Frequent Visitor

Re: Send an email (V2) Dynamic Content

I used an expression inside the email body using concat function:

concat('<a href="https://{url first part}',variables('myvar'),'{url last part}">Description</a>'

 

After you save, just use peek code for the Send an email (V2) and see the html body.

 

It was tested and working until they solve the email body editor.

View solution in original post

Highlighted
Helper II
Helper II

Re: Send an email (V2) Dynamic Content

works for me.

Highlighted
Frequent Visitor

Re: Send an email (V2) Dynamic Content

Hi @NirolfD , can you explain how to obtain the url first part and url last part?

 

And what should replace the  'myvar' ?

 

Thanks

Highlighted
Frequent Visitor

Re: Send an email (V2) Dynamic Content

Hi @aanyoti ,

 

If you want to send a link with a record in CRM you need to send to the user something like this:

https://YourOrg.crm4.dynamics.com/main.aspx?app=d365default&forceUCI=1&pagetype=entityrecord&etn=account&id=0c223724-1f21-46b4-95cb-9d31f38c030f

In this case, the url has only 2 parts: green and red.

In the proposed solution myvar is a name for a variable defined inside Flow. You don't necessarily need a variable for this.

You can get the link from your browser after you open the record in CRM.

 

Highlighted
Advocate I
Advocate I

Re: Send an email (V2) Dynamic Content

Could the workaround proposed by @NirolfD be marked at the solution until this is fixed please? The original solution is not up-to-date any more

Highlighted
Frequent Visitor

Re: Send an email (V2) Dynamic Content

I solved a similar problem by using a variable.  I initialized a variable varHtmlLinkToItem like this:

variable1.png

then I added this variable in the html view of the Send an Email (v2) action:

variable2.png

 

View solution in original post

Highlighted
Helper I
Helper I

Re: Send an email (V2) Dynamic Content

That works great, thanks!

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (6,655)