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
posta 4 mesi fa273 visualizzazioni
2 Risposte
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()
con risposta 4 mesi fa
profile picture
ESPERTO
verificato un mese fa
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
con risposta 4 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande