How to add a script to the head of an email?
Question

According to Microsoft's documentation

"To embed an actionable message card in an email message, we need to wrap the card in a <script> tag. The <script> tag is then inserted into the <head> of the email's HTML body. "

I have tried the Script_CreateOrUpdate action from the IncludeJavascriptAPI Extension inside the Preparation for the Email, but no script appears to be added to the email.

Any ideas how to do this? The use case is exactly specified in the link to the documentation above, which is concerning sending an Actionable MessageCard message via email to an Outlook 365 user.

Hi Maxime,

Thanks for the response! I'm not sure if I can do that. It really is a general question though as to whether OutSystems supports adding a script to an email header sent from a traditional web app. It looks like the answer is no, and I'm hoping someone can confirm that.

Since posting the question, I have found this resource which suggests using the Outlook REST API.

Hi Donald, can you upload your oml here? Maybe also the email generated?


Thank you

Hi Maxime,

Thanks for the response! I'm not sure if I can do that. It really is a general question though as to whether OutSystems supports adding a script to an email header sent from a traditional web app. It looks like the answer is no, and I'm hoping someone can confirm that.

Since posting the question, I have found this resource which suggests using the Outlook REST API.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.