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

Add url to body of e-mail in a flow

Sending e-mail from a flow triggered in Dynamics 365:

 

How does one grab the url to include it in the body of an outlook e-mail in the flow?

 

I was given a JSON command, but it doesn't work.  (Perhaps I'm not inserting it correctly?)  uriHost(body('Parse_JSON_to_get_execution_context')?['@odata.context'])

 

I also want to pull owner and account and include them in the e-mail, but blanks are returned.  How do I accomplish these?

9 REPLIES 9
Highlighted
Super User III
Super User III

Re: Add url to body of e-mail in a flow

Hi @Anonymous 

 

Could you post a screenshot of your flow?

 

uriHost() expression should give you the url. So it depends the data you are passing. 

 

To retrieve owner you need Get Record by Id step. Here you need to pass the id of owner from your trigger. The entity you need to configure for this step is users.

 

To retrieve Account you need Get Record by Id step. Here you need to pass the id of Account from your trigger. The entity you need to configure for this step is Accounts.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted
Anonymous
Not applicable

Re: Add url to body of e-mail in a flow

Hi,

Thanks for your interest.  Here are the pertinent parts of the flow:

 
 
 

Annotation 2020-05-12 083247.jpg

Annotation 2020-05-12 083317.jpg

Annotation 2020-05-12 083347.jpg

 

 

I don't quite understand your comments about "Id step".  Are you saying I need to link to the Accounts and User entities to properly grab account name and owner?  

 

 

 
Highlighted
Super User III
Super User III

Re: Add url to body of e-mail in a flow

Hi @Anonymous 

 

Thanks for the screenshot.

 

image.png

 

Above is that added as an expression? Check the run history and see the results.

 

Yes for the Account and Owner you need another two action steps Get Record. Set the identifier (account/owner) from the previous step.

 

image.png

 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted
Anonymous
Not applicable

Re: Add url to body of e-mail in a flow

This is the error:

Annotation 2020-05-12 090520.jpg

Highlighted
Super User III
Super User III

Re: Add url to body of e-mail in a flow

Hi @Anonymous 

 

Could you please post your expression?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted
Anonymous
Not applicable

Re: Add url to body of e-mail in a flow

uriHost(body('Parse_JSON_to_get_execution_context')?['@mcdonald.com'])

Highlighted
Super User III
Super User III

Re: Add url to body of e-mail in a flow

Hi @Anonymous 

 

Check this in a compose statement and see what value you are getting via execution history.

 

body('Parse_JSON_to_get_execution_context')?['@mcdonald.com']

 

Also post your JSON body content.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted
Microsoft
Microsoft

Re: Add url to body of e-mail in a flow

What is '@mcdonald.com', is it an item that exists in JSON?

If you specify '@odata.context' from your base post, I don't think you'll get an error.

Highlighted
Anonymous
Not applicable

Re: Add url to body of e-mail in a flow

That's my misunderstanding of what to do with this.

I have this workaround, using JSON... but I can't make heads or tails of it:

 

https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Dynamic-record-URL-attribute-not-present-in...

 

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,958)