0
votes

I've been creating a prototype with Azure Logic Apps using an email response condition. This example is so simple, but I can't make behave as I'm expecting. A few hours later I am declaring defeat.

What is supposed to happen from this Workflow is when I click on 'Approve' it's supposed to go down the YES branch and send me an email that says 'Approved', but it always goes down the NO branch and sends me an email that says 'Rejected'!

The conditionality code is below (with my email address replaced by 'me').

"expression": "@equals(body('Send_approval_email'), 'Approve')"
1

1 Answers

1
votes

Use "expression": "@equals(body('Send_approval_email')?['SelectedOption'], 'Approve')"

Using "@equals(body('Send_approval_email'), 'Approve')", you will try to compare:

{ "SelectedOption": "Approve" }

and

"Approve"

which obviously doesn't match.

Hope this helps :)

Julien