Skip to main content
Microsoft 365 Connector RetirementWith the retirement of Office 365 connectors in Teams, the only supported approach of sending messages in Microsoft teams in through Microsoft Teams Workflows.The following page will cover how to configure FlexDeploy @since 9.0.0.1 to leverage Teams Workflows to send messages.

Adding a Workflow in Teams to receive a webhook message

  1. You will need to add a Workflow in Teams by clicking the three dot menu and selecting the Workflows application.
image-20241204-202544.png
  1. Once viewing the Workflows page, click the (blue star) New Flow button on the top right.
image-20241204-202750.png
  1. You can optionally select a template but for this walkthrough just click the (blue star) Create from blank button.
image-20241204-203050.png
  1. The first step should be When a Teams webhook request is received
image-20241204-203146.png
  1. Select Anyone for “Who can trigger the flow?” and click on the (blue star) New Step button.
image-20241204-203335.png
  1. The second and final step should be Post card in a chat or channel.
image-20241204-203506.png
  1. Specify which Team, Channel, or Group Chat you want to post the message to. Finally select Body as the Adaptive Card content. Body represents the entire input payload that will be sent to the webhook.
If you do not see Body as an available option, then try saving your workflow, closing it, and re-editing it.
image-20241204-204317.png
  1. Save your Workflow and re-open the first step so you can copy the webhook URL.
image-20241204-204713.png

Using the Webhook URL from the Teams Workflow

The Webhook URL copied from the Teams Workflow is what will be used when configuring Plugin Operations and using our MICROSOFTTEAMS groovy helper.

Posting Messages with MICROSOFTTEAMS helper

The following script creates and posts a message that leverages most of the card features supported by our MicrosoftTeamsMessageCard helper class.
The final result looks like the following: image-20241204-205527.png

Authoring Adaptive Cards

Both the MICROSOFTTEAMS helper and Plugin Operations support passing a json string which allows the full Adaptive Card schema to be leveraged. Microsoft provides a webpage to view the schema and a playground to create your own messages, which can be found below. https://adaptivecards.io/explorer/AdaptiveCard.html https://adaptivecards.io/designer/

Setting up Certificates

You may need to install the certificate for https://graph.microsoft.com/.default into your Java keystore. If this is the case, you will get an error about building a certificate path.