Forum Discussion
moturukalyan
Sep 28, 2020Copper Contributor
posting Incoming webhook to MS Teams using curl command
we are using azure devops pipeline and web hook notifications to slack.
For below notification I changed the webhook url to outlook. But not working it says `Bad payload received by generic incoming webhook`. How to customize payload for teams.
curl -H 'Content-Type: application/json' --data-urlencode 'payload={"username": "Application","text": "Application_IOS_EnterpriseBuild","attachments": [ { "color": "#F35A00", "fields": [ { "title": "Pipeline", "value": "'"$(Agent.JobName)"'", "short": true } ] }, { "color": "#F35A00", "fields": [ { "title": "commit_sha", "value": "'"$GIT_RELEASE_NOTES "'", "short": true } ] }, { "color": "#F35A00", "fields": [ { "title": "Status", "value": "'"Started"'", "short": true } ] } ]}' https://outlook.office.com/webhook/6ab53-e6a3-4b3e-ae06-a65cdaf3b31e/IncomingWebhook/ae2d458317eb4b20a3581fdd01aeecd3/e966e859-4ec9-497a-b1b8-5e6fadb19404(sample)
- Varaprasad-MSFTMicrosoft
- alnhkCopper Contributor
Were you able to achieve this issue ? We are unable to do, we are hitting "Bad payload Received by Generic incoming Webhook." Can you please share the sample full curl command with attachment payload. We are struggling to get this addressed - https://techcommunity.microsoft.com/t5/microsoft-teams/migrating-the-scripts-to-ms-teams/m-p/2620143#M98025