API destinations to Microsoft Teams channel

0

I am trying to send notification to Microsoft teams channel from AWS. I am using API destinations in eventbridge. On the teams side, I created an "incoming webhook" and I have that url. For connections there are three options, Basic (Username/Password), OAuth Client Credentials, API Key. Since I only have the webhook url, I put some dummy content for API keys (should I be putting valid here?). With this configuration, I am trying to test sending a dummy message to team and I am unsuccessful. what am I doing wrong? please help.

Marvin
gefragt vor 4 Monaten272 Aufrufe
2 Antworten
0

You should use the following architecture: Eventbridge rule -> lambda function -> teams

An AWS EventBridge Rule matches a specific set of AWS events and sends them to a target. The target is a Lambda function that sends the event to a Microsoft Teams Channel using an Incoming HTTP WebHook.

The lambda can execute this example of python code:

import pymsteams
myTeamsMessage = pymsteams.connectorcard("<Microsoft Webhook URL>")
myTeamsMessage.text("this is my text")
myTeamsMessage.send()
beantwortet vor 4 Monaten
profile picture
EXPERTE
überprüft vor einem Monat
0

This doesn't answer the question directly but have you considered using ChatBot which has teams integration built-in https://aws.amazon.com/blogs/aws/aws-chatbot-now-integrates-with-microsoft-teams/

profile pictureAWS
beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen