email template in logic app

SriRaghavendran Prabhakaran 405 Reputation points
2024-01-29T14:55:37.7933333+00:00

Hello, I am working on workflow with logic app. Here based on HTTP request response, I have to replace the values of email template stored in blob storage. I have configured HTTP request and also able to retrieve templete stored at blob storage using GETBLOBcontent. As a next step, I have to edit the values in Html templete with dynamic values from HTTP request. Help me to achieve the same.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2024-01-31T11:05:22.41+00:00

    @SriRaghavendran Prabhakaran Thanks for reaching out.

    It would always be great to provide your input and what is the expected output so the community can assist you.

    To answer your question, you can review the string function that is available in logic app. Let say if my email body has content something like

    Hi {0}, How are you

    enter image description here

    Now you can leverage the replace function and replace the {0} with your custom value. This is just an example, and you can dynamically pass the value as per your workflow.

    replace(variables('EmailBody'),'{0}','Mayank')

    In logic app there is nothing like String.Format method so the alternative I am using the replace method and making sure that my body follows a structure which I can replace the text in my workflow.

    Alternatively, you can use the inline code if it is complex calculation and if you know or offload this functionality to azure function and call azure function from logic app.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.