Não perca: Inspire 2024, de 13 a 16 de maio de 2024, no The Venetian em Las Vegas! Inscreva-se agora mesmo.

 

Easily Send Messages Through Microsoft Teams Using Plans’ HTTP Task

Technology   |   Shrila Senthil   |   Dec 7, 2022

Plans offer a variety of features that allow our users to orchestrate data pipelines. One of the key elements within Plans is the ability to connect with external messaging applications so that you can automatically communicate information to other platforms whenever you’d like.

Alteryx Designer Cloud has a native integration with Slack, making it easy for you to deliver messages to accessible Slack channels. But have you ever wondered how you can do this with other platforms? We’ll walk you through it! After reading this article, you will be able to use our built-in HTTP Task to send messages through Microsoft Teams as well.

The Challenge: Let’s imagine you’ve been using Alteryx Designer Cloud to send summaries of your data to your sales department via Slack for a while now. You have recently switched to a different role, and your new team communicates via Microsoft Teams. You now need to send similar Plan updates to specific Teams channels.

Your first flow takes in data and transforms it into a clean and usable format. It removes duplicate values, calculates averages, identifies max and min points in the data, etc. If the flow runs successfully, it will update our general dashboard with these new values. If it fails, you want it to inform the Teams channel of data scientists of all the needed information from that Plan run so that they can understand and fix the problem.

The Solution: To use the HTTP Task to connect with Teams, you will need to first obtain the correct endpoint URL. Using this guide, you can see that this is the correct URL format:

  • POST https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages

From here, you can obtain your Team and Channel ID in 2 different ways. The first would be to go directly through the Microsoft Teams app, as explained here. The other option is to use Microsoft’s Graph Explorer – Where you will input the following links (using “GET”) and copy the correct ID from the Response Preview.

[Note: you need permission to access information from specific chats or channels – if you run into any permission errors, it means you don’t have adequate permissions for the Teams channel you’re using]

Your next step is to add headers, as explained in this guide. You can copy your access token from the Graph Explorer and input it as one of the header values: Bearer {access token}

Finally, you must add a body – this is the message that will be sent to your team. Fortunately, you can easily use metadata from the Plans to send them specific information from the run that can help them identify the cause of the problem.

Now that your configuration is saved, hit ‘Test’ in the Response tab and see the response. This ensures that your configuration is successful.

That’s it – Mission accomplished! You’ve now learned how to successfully integrate your Plans with Microsoft Teams using Alteryx Designer Cloud’s HTTP Task! Now, you can automatically have error reports sent to your team instead of having to manually send them this information.

Read more about Plans here: Plans – The Command Center for Orchestrating Data Pipelines

 

Tags