HTTP Response to EMAIL Body

Post Reply
ckuhlmannHP
Newbie
Posts: 14
Joined: Tue Jan 09, 2018 9:19 pm

HTTP Response to EMAIL Body

Post by ckuhlmannHP »

Hello,

I have a flow set up that pings an HTTP endpoint to run a quick report. The endpoint returns a an HTML string as its response. I am trying to take this response and email it out. For the life of me, I can't figure out how to get the response into the body of the email. Does anyone have any advice on how I might do this?

Thanks
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: HTTP Response to EMAIL Body

Post by freddyp »

The "HTTP request" element gives you the possibility to attach the reply from the web server as a dataset. The "Send mail" element gives you the possibility to choose a dataset as the body of the mail.
ckuhlmannHP
Newbie
Posts: 14
Joined: Tue Jan 09, 2018 9:19 pm

Re: HTTP Response to EMAIL Body

Post by ckuhlmannHP »

Thank you freddyp,

I do have it saving the response to a dataset 'HTTPResponse' But I can't seem to find where you can set the body to a dataset in the send email. I tried the include attached body text, I tried template in the job and set to the dataset.

Or do you set the body text to a "multi line with the variable" but in that case, I can't figure out how to set the dataset as the body.

Any help would be much appreciated.

Thanks
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: HTTP Response to EMAIL Body

Post by freddyp »

On "Mail send" you should set the property "Body template" to "Associated with job" and the property "Template dataset" (which will appear when you change the body template property) to "HTTPResponse". And set the "Message format" property to "HTML", of course, or it will not look nice.
ckuhlmannHP
Newbie
Posts: 14
Joined: Tue Jan 09, 2018 9:19 pm

Re: HTTP Response to EMAIL Body

Post by ckuhlmannHP »

That was the ticket!

thank you.
Post Reply