-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Unable to use MS Teams Workflow webhook url in Channels #942
Comments
@sharathganga as a workaround you can select |
@Hailong-am It still fails to send a test message when I use Slack Channel type but this time with a different error:
|
@sharathganga can you share an example request for new webhook? i need this to check whether the schema has changed. |
@opensearch-project/admin please transfer this to notification repo |
Hi, |
Unfortunately the issue here is that the suggested migration path for moving away from the "Incoming Webhook" Office 365 Connector is to use a Power Automate Workflow with the "When a Teams webhook request is received" as the trigger, however this does not support the same basic JSON schema that the original connector supported and instead will only accept Adaptive Card data instead. It is possible to temporarily work around this issue by using the OpenSearch "Custom webhook" notification channel type instead. This will allow you to define any webhook URL you want, and then within the actual monitor action you can format the message to include the correct JSON. For example something like this:
Obviously replacing the Mustache template variables for whatever is appropriate for your situation. |
It's possible to configure the Teams workflow(PowerAutomate) webhooks any way you want. You don't have to adopt the default adaptive-card schema. I've managed to get the custom webhook to trigger with the OpenSearch action message defined with a Mustache expression as:
But having trouble accessing the JSON attributes that have dotted names ie.: ["k8s.event.reason"]. Is there a syntax to escape those, so that they are parseable and get rendered in the message |
What is the bug?
Microsoft is deprecating the Office 365 connectors for Teams and we need to utilize the Workflows webhook URL to post messages to Teams channels. I've generated a webhook URL but am unable to use it in OpenSearch.
Refer: https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/
How can one reproduce the bug?
Method 1:
Error:
[status_exception] Wrong Microsoft Teams url. Should contain "webhook.office.com"
Method 2:
Error:
[status_exception] {"event_status_list": [{"config_id":"666cK5EB6cKDPdC7sDsE","config_type":"webhook","config_name":"temp-MS Teams Workflow Test","email_recipient_status":[],"delivery_status":{"status_code":"500","status_text":"Failed to send webhook message Failed: {\"error\":{\"code\":\"InvalidRequestContent\",\"message\":\"The request content is not valid and could not be deserialized: 'Unexpected character encountered while parsing value: T. Path '', line 0, position 0.'.\"}}"}}]}
What is your host/environment?
AWS OpenSearch 2.11
The text was updated successfully, but these errors were encountered: