Provide the connection string for your Service Bus, the topic name, and the subscription name.
Sample ARM template for the trigger:
{
"inputs": {
"parameters": {
"topicName": "your-topic-name-here",
"subscriptionName": "your-subscription-name-here"
},
"serviceProviderConfiguration": {
"connectionName": "serviceBus",
"operationId": "receiveTopicMessages",
"serviceProviderId": "/serviceProviders/serviceBus"
}
},
"splitOn": "@triggerOutputs()?['body']"
}
Add an HTTP action to send the email.
{
"inputs": {
"method": "POST",
"uri": "your-email-service-provider-API-endpoint",
"headers": {
"token": "your-authentication-token",
"content-type": "application/json"
},
"body": {
"From": "@triggerOutputs()?['body']?['UserProperties/from']",
"HtmlBody": "@triggerOutputs()?['body']?['UserProperties/htmlBody']",
"ReplyTo": "@triggerOutputs()?['body']?['replyTo']",
"Subject": "@triggerOutputs()?['body']?['UserProperties/subject']",
"To": "@triggerOutputs()?['body']?['to']"
}
}
}
Save the Workflow: Save the Logic App workflow. It will now trigger every time a message is received on the specified Service Bus topic subscription.