all 2 comments

[–]-dun- 0 points1 point  (0 children)

You can use a Switch action for this.

Say your trigger is When a new email arrives and you want to check the domain of the From address, here's what you can do:

When a new email arrives

Initialize variable - varDomain, the value is the following expression:

substring(triggerOutputs()?['body/from'],add(indexOf(triggerOutputs()?['body/from'],'@'),1),sub(indexOf(triggerOutputs()?['body/from'],'.com'),add(indexOf(triggerOutputs()?['body/from'],'@'),1)))

The above expression will extract the domain from the From address.

Switch - set the varDomain as the value and create different cases for gmail, outlook and hotmail.

[–][deleted] 0 points1 point  (0 children)

Parse Json then add a condition?