Skip to content

Microsoft Teams Conditionals

Conditionals or Execution Conditions give you the power to decide if a particular action on Microsoft Teams will be performed or not when the workflow is triggered by an incoming event. This is similar to applying "if-then-else" logic to the execution of an action based on the attribute value coming from the workflow's trigger event.

You can add conditions to any action in your workflow.

To decide which actions should be performed in response to a particular trigger based on its characteristics or the data attributes. you can even apply a complex logic using AND, OR, and grouping of such conditions.

Each of the Conditionals support different operators based on the passed data type like string, number, boolean, etc. Read here to learn more about Execution Conditions.

Example Scenario

We will take a scenario where you are using Microsoft Teams as the trigger application. There could be multiple application actions that could be performed upon receiving an outlook trigger.

Each of these actions in the flow could use different conditions as per the data attributes available in the Microsoft Teams trigger event. This allows each action to execute based on its defined execution conditions.

In this example, the workflow is triggered when a new message is received on the channel in Microsoft Teams. It has two actions,

  • First is an Outlook "send email" action
  • Second is ServiceNow "Create Incident" action.

While using Microsoft Teams as the trigger application, the following attributes will be available to you while creating your application actions.

  • Mentioned User - Mentioned user(s) in the message.
  • Has Attachment - If the message has an attachment.
  • From - Name of the message sender.
  • Content - The content of the message.
  • Created At - Date and time when message was posted or updated.
  • Attachment Name - Name of the files attached to the message.
  • Mentioned Outgoing Webhook - Mentioned outgoing webhook(s) in the message.
  • Mentioned Channel - Mentioned channel(s) in the message.

In Figure 1 below, and email will be sent from Outlook only if the message on teams is sent by Daniel or Emma.

Conditional Processing in Connect iPaaS

Figure 1. Conditional Processing in Connect iPaaS

Similarly, as shown in Figure 2 below, the action on ServiceNow will only be performed if either Shashank or the team myTeam is mentioned in the message.

Conditional Processing in Connect iPaaS

Figure 2. Conditional Processing in Connect iPaaS