Reputation: 1562
I am creating a Logic App on Azure and in this process I have to create a HTML table with some data, insert that table in an email body and send that email using SendGrid.
Almost everything works, except that my table should have a column containing a URL to some website.
The problem is that somehow the Create HTML table action does not return <a>
as HTML tag but <a>
and the Send email's body (even if it's considered HTML content) can't process/interpret that.
I am using a concat(string1, string2 .. )
Expression
to build the URL and I think it builds it correctly. The output look ok, only raw output is messed up.
Create HTML table
action returns this:
Output:
Raw Output:
<td><a="https: ...
This is how the Output is injected into the email body of Send Email
:
If the raw output could be changed to be in a more HTML format, the email body will parse it and display the URL in a correct way. (I'm not sure if I expressed myself very well. But even if I create a simple html file with that raw output, the a
tag will be displayed in browser as simple text...)
Any ideas? I think that if I replace the concat()
expression and generate the URL before, the raw output of Generate URL table
will still mess up the final result.
Maybe if there is a way to stop the replacement of <
and >
with <
and >
it will work, but I don't know how to do that..
Upvotes: 1
Views: 1541
Reputation: 15754
For this problem, I initialize a variable to simulate your situation and we can just replace the <
with <
and replace the >
with >
. Then the send email action will work fine. Please refer to the steps below:
The whole expression is:
replace(replace(body('Create_HTML_table'), '<', '<'), '>', '>')
Hope it helps~
Upvotes: 1