--- title: "Create Workflow in Microsoft Teams" slug: "create-workflow-in-microsoft-teams" updated: 2025-04-30T05:10:37Z published: 2025-04-30T05:10:37Z canonical: "docs.biztalk360.com/create-workflow-in-microsoft-teams" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.biztalk360.com/llms.txt > Use this file to discover all available pages before exploring further. # Create Workflow in Microsoft Teams Microsoft suggests using Power Automate Workflows to post messages to Teams Channels. They also provide built-in templates to facilitate this. However, BizTalk360 recommends to make few changes in workflow templates to ensure seamless integration. **Why customization of the built-in workflow template is necessary?** When using the built-in workflow template, only the workflow owners can see whether the message was posted or not, and what is the reason for failure if it wasn’t posted. BizTalk360 will always receive a general acknowledgement stating that the request to post a message was received, but it does not provide details on whether the message was successfully posted or failed due to an error. To correctly determine the status of message posting and take appropriate action, we recommend customizing the template as outlined in the following section. #### **Create Workflow in Microsoft Teams** Follow these steps to create a flow from the Microsoft Teams: 1. Log in to **Microsoft Teams**. 2. Click on **View more apps (...)** and search for the Workflows app. 3. Click **Add** to install the Workflows. ![](https://cdn.document360.io/253f6006-3994-42d0-98cd-fdc637f51791/Images/Documentation/image-PY2LB7VA.png) 4. On the Workflows → Home page, you’ll see a list of templates relevant to Microsoft Teams, Click on **Post to a channel when a webhook request is received** workflow. 5. Provide a name for the workflow and verify the sign-in option, then select **Next**. 6. On the next page, you’ll be able to choose the Team and Channel to which the notification will be posted. After selecting the appropriate options, click **Create flow**. 7. Once the workflow is created, a new dialog will appear showing the URL to be used for sending a message. ![](https://cdn.document360.io/253f6006-3994-42d0-98cd-fdc637f51791/Images/Documentation/Teams_Workflow_Template.gif) #### **Customize the flow:** At the top of the Home page, all the saved workflows are displayed. Click on the workflow you just created and click the **Edit** option at the top left corner. ![](https://cdn.document360.io/253f6006-3994-42d0-98cd-fdc637f51791/Images/Documentation/image-API8AETX.png) In the edit screen, two steps named "When a Teams webhook request is received" and "Send each adaptive card" are shown by default. **Step 1: Initialize Variable** 1. Click the **Plus** button between the two steps and select **Add an action.** 2. In the search bar, type **Initialize variable** and click the appropriate action. 3. Provide a Name for the variable, e.g., `PostMessageResponse` 4. Set the Type as **Object**. 5. Leave the Value field empty. ![](https://cdn.document360.io/253f6006-3994-42d0-98cd-fdc637f51791/Images/Documentation/Initialize_Variable.gif) **Step 2: Set Variable** 1. Click on the **Send each adaptive card** step. 2. Click **Add an action** within that step. 3. Search for **Set variable** and select the appropriate action. 4. In the **Name** field, choose the variable you previously created, i.e., `PostMessageResponse` 5. Click on the **Value** field and then click **Add dynamic content**. 6. In the Dynamic Content popup, select the **body** option under the **Post card in a chat or channel** section. 7. After creating the action, click on the three dots in the upper-right corner of the **Set Variable** action. 8. Select **Configure run after**. 9. Uncheck the `is successful` option and select the remaining three options. Then click **Done**. ![](https://cdn.document360.io/253f6006-3994-42d0-98cd-fdc637f51791/Images/Documentation/Set_Variable.gif) **Step 3: Return Response** 1. After the **Send each adaptive card** step, click **New Step** 2. Search for **Response** and select the appropriate action. 3. In the **Body** field, click **Add dynamic content**. 4. In the Dynamic Content popup, select the previously created variable, `PostMessageResponse`. 5. Click on the three dots in the upper-right corner of the **Response** step. 6. Select **Configure run after**. 7. Check all four options: `is successful`, `has failed`, `is skipped`, and `has timed out`. Click **Done**. 8. **Save** the workflow. **Note:** The Response action is part of the Premium Subscription. ![](https://cdn.document360.io/253f6006-3994-42d0-98cd-fdc637f51791/Images/Documentation/Response_Action.gif) Now the workflow is set up to post messages and return the correct response based on the status of the post. If you haven't already copied the Webhook URL, click on the first step in the workflow (When a Teams webhook request is received) and copy the **HTTP POST URL**. ![](https://cdn.document360.io/253f6006-3994-42d0-98cd-fdc637f51791/Images/Documentation/image-JFQBMO3Z.png) Provide this URL in the BizTalk360 Teams Notification Channel and configure it for Alarms, Automated Tasks, or Reports to receive timely notifications. ![](https://cdn.document360.io/253f6006-3994-42d0-98cd-fdc637f51791/Images/Documentation/image-WY2U00LF.png) > [!WARNING] > Important Notes: > > - Microsoft Teams Channels accept messages only up to 28KB. If the message exceeds this limit, BizTalk360 will send a fallback message by trimming some information and keeping only the essential details. > - Workflows cannot post messages to Private Channels. > - Messages can't be posted if the Workflow is turned off in Teams.