Pradeep
Pradeep

Reputation: 5500

How to read the parameter values in send email action in azure logic app

I have created azure logic app using ARM Templates from visual studio 2017. In that I used send email action for sending emails. But I want to read the values from parameters in send email action for subject, to, body properties.

Example for Subject: “Hi, how are you? <parameter value>”

So, can anyone please suggest on this.

Upvotes: 0

Views: 713

Answers (1)

Frank Borzage
Frank Borzage

Reputation: 6796

Maybe you can refer to the following format to read the value of the parameter:

"Send_an_email_(V2)": {
    "runAfter": {
        "xxxxxxxxxx": [
            "Succeeded"
        ]
    },
    "type": "ApiConnection",
    "inputs": {
        "body": {
            "Body": "<p>@{parameters('param1')}</p>",
            "Subject": "@{parameters('param2')}",
            "To": "@{parameters('param3')}"
        },
        "host": {
            "connection": {
                "name": "@parameters('$connections')['office365']['connectionId']"
            }
        },
        "method": "post",
        "path": "/v2/Mail"
    }
}

For your subject example, you can use "Subject": "Hi, how are you? @{parameters('param2')}"

Upvotes: 1

Related Questions