Forum Discussion
Sending JSON Payloads from ADF to Logic Apps — Embedding SAS Links in EmailMessage
I’ve been working on passing a JSON payload from Data Factory into a Logic App that sends emails. The challenge was embedding a SAS URL into the EmailMessage field so recipients could click the link.
Attempts and Issues
Anchor Tag with Double Quotes (href="...")
json"<a href=\\"https://storage.example.com/file.xlsx\\">File.xlsx</a>"
Failed: Logic Apps threw JSON parsing errors (unexpected character h).
Cause: Escaped quotes (\\") were double-escaped, producing \"https://...\" in the payload.
Anchor Tag with Escaped Quotes
Tried \\\\\" around the URL.
Failed: Email rendered the link as literal text (\"https://...\") instead of a clickable link.
Cause: Logic Apps treated the extra backslashes as part of the string.
Anchor Tag with Single Quotes (href='...')
json"<a href='https://storage.example.com/file.xlsx'>File.xlsx</a>"Failed: ADF expression builder flagged parsing errors.
Cause: Single quotes conflicted with ADF’s JSON string handling.
Raw URL Only (No <a> tag)
json"EmailMessage":"Hello Team<br/><br/>Download here:<br/><br/>https://storage.example.com/file.xlsx<br/><br/>Thanks,<br/>Team"
Success: Email sent successfully, SAS URL appeared as plain text and was clickable in Outlook.
Trade-off: No custom link text, but reliable and production-safe.
Final Working Solution
We settled on removing the <a href> tag and sending the raw SAS URL directly. This avoids JSON escaping issues and ensures the link is clickable in most email clients:
{ "EmailTo": "[email protected]", "PipelineName": "Sample Pipeline", "EmailMessage": "Hello Team<br/><br/>File ready for download:<br/><br/>https://storage.example.com/file.xlsx<br/><br/>Thank You<br/>Automation Team", "Subject": "Automated SAS Download", "EmailCC": "[email protected]" }
Question for the Community
Has anyone found a reliable way to embed a proper <a href> clickable link inside the EmailMessage field when sending JSON from ADF to Logic Apps, without breaking the JSON parser?
1 Reply
- v-nmadadi-msftCommunity Support
Hi abhidotnet ,
Thanks for reaching out to the Microsoft fabric community forum.You will find people who are good in Fabric and Power BI in this forum, but your issue seems more related to Azure Data factory and Logic apps for which you can check out this forum Azure - Microsoft Q&A
where you will find people who are good with respect to the service area you are trying to use.
I hope this information helps. Please do let us know if you have any further queries.
Thank you