Page 1 of 1
HTTP Response to EMAIL Body
Posted: Fri Jan 17, 2020 10:54 pm
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
Re: HTTP Response to EMAIL Body
Posted: Mon Jan 20, 2020 3:15 pm
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.
Re: HTTP Response to EMAIL Body
Posted: Tue Jan 21, 2020 5:17 pm
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
Re: HTTP Response to EMAIL Body
Posted: Tue Jan 21, 2020 5:40 pm
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.
Re: HTTP Response to EMAIL Body
Posted: Tue Jan 21, 2020 5:47 pm
by ckuhlmannHP
That was the ticket!
thank you.