Closed danigirl329 closed 8 months ago
Hello @danigirl329 - Thanks for raising your query. We will look into it and let you know the updates.
Hello @danigirl329 - Could you please share the repro steps for how to create this sample generic webhook ?
Hello @Vikram-MSFT ! For creating a webhook for Github to Teams I did the following:
I created a Channel in Teams In the channel, i added an Incoming Webhook and copied the url it generated In github under the repository I went to Webhooks > Add I pasted the Teams URL into Payload URL and set it to "Just the push event" the Content Type is set to application/json Enable SSL Verification is true and Submitted (Add webhook)
Github sends a test ping to the webhook URL and it fails with the response 400 - Bad payload received by generic incoming webhook.
So what I did to test that it is working is I set up the url and headers in Postman and sent a simple payload like {"text":"Hello World"} and that works fine and I can see the text in the Channel.
I also want to mention that we use this github webhook to send to slack and other apps and it works fine so something on the teams side is rejecting the json.
Thanks!
Hello @danigirl329 we will investigate the issue and get back to you soon.
Hii @danigirl329 we are able to repro this issue, we will get back to you soon.
Hiii @danigirl329 We are also able to repro this issue, we will check internally and get back to you. Update : We raised a bug for this issue, we will keep you posted on the updates. Thank you
@Vikram-MSFT I am encountering the same exact bug as @danigirl329. Do we have any updates?
Hello @danigirl329 & Others, We got an update from engineering team that this isn't a bug.
Incoming webhooks take payloads only in MessageCard or adaptive card format. The payload emitted by the GitHub webhook is NOT in that format.
You can either: 1) Use the webhook provided by the GitHub app, or 2) Write a small service that takes the data sent by the GitHub webhook, transforms it into an adaptive card, then posts the result to the URL generated by the incoming webhook.
@ChetanSharma-msft Thanks for the quick response! Can you elaborate a bit more on option 1?
@ChetanSharma-msft It looks like this format used to be supported. Why was this support removed from Microsoft Teams?
And, why doesn't GitHub have an option for MessageCard / adaptive card format? GitHub is Microsoft now, after all.
Seeing the same issues and would ask for this functionality to be added. A fair and well made point from wells.
+1
Example of usage from article in June 2022: https://medium.com/sap-commerce-cloud/how-to-alerts-from-github-to-your-microsoft-teams-channel-8c476471a353
Hello @Everyone - This issue is not related to Teams app development related query. Could you please post your GitHub Webhook issue related query here: https://docs.github.com/en/webhooks https://github.com/orgs/community/discussions/categories/api-and-webhooks
Thanks for the update @ChetanSharma-msft .
Originally I was testing because the app for a channel "incoming webhooks" was failing with the github response. For anyone wondering, it looks like you can add a Github Connector and the cards do work. So I will close this.
Thanks
Hi danigirl329! This issue is closed in our system. We would like your feedback on your experience with our support team and Platform.
Best regards, Teams Platform
danigirl329 - Could you please rotate your webhook URL as it's shared in public forum? Anyone with access to the webhook can post message in the channel.
danigirl329 - Could you please rotate your webhook URL as it's shared in public forum? Anyone with access to the webhook can post message in the channel.
danigirl329 - Could you please rotate your webhook URL as it's shared in public forum? Anyone with access to the webhook can post message in the channel.
Hello,
I am trying to set up a generic webhook from github to a teams channel. I can POST using Postman with simple json and with sample json but github's POSTs are failing with 400: Bad payload received by generic incoming webhook.
This is happening on the setup ping and creating new issues, etc.
Test ping that is failing from github: