-
Notifications
You must be signed in to change notification settings - Fork 17
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
O365 connectors within Teams will be deprecated #30
Comments
I tried creating a "workflow" as indicated in the message, and using the URL provided but it doesn't seem to work. |
I did the same and am getting a |
Same here. The integrated Workflow in Teams didn't worked for me. I created a Power Automate Flow with an HTTP Endpoint (requires Premium subscription) and then send the messages via the Microsoft Teams connector to Teams. One benefit of this solution is, you can also target individual users or group chats, in addition to channels. |
I have done some research, it looks like Microsoft has changed the format of the payload - So I think some changes will need to be made to the code. |
I have been doing some research on this, the new 'workflow' way is not very well documented. I have managed to get a JSON webhook to create an 'AdaptiveCard'. The tricky part is getting the workflow setup correctly. First head into teams and create a new workflow, start a blank workflow. For the trigger, you want to search for webhook and select the Microsoft Teams Webhook. Next add a step to the workflow, it should look like this so far: Now search for "Apply to each" and select it as an action. In the "Select an output" box you want to choose the dynamic content from the righthand side, select "Attachments". It should now look like this: Next add another action and find "Post card in chat or channel" and fill in the details for your required destination. (Make sure you choose the correct "Post as" option as flow bots cannot post into private channels). You should now have something like this: Now in the adaptive chat box you need to create an "expression" and in the expression you need to put the following "item().content". It should look like the following: Hit okay on the expression and it will put it into the adaptive card box, then save the workflow. Once saved you can click on the webhook trigger at the top and copy the webhook url. Now send a POST request to the webhook with the JSON below
If you format the JSON you will see that there is an I know this does not currently fix the issue with the package however it gives a good head start to someone wanting to create a PR. If I can get around to it, I will work on the PR myself. If anyone needs anymore info, please let me know. |
@jsandfordhughescoop awesome tutorial. I was able to build the workflow as you describe and get your test POST request to show the card in the Teams channel. I could not get the older MessageCard (that is built in the class Has anyone used this repo before? https://github.com/sebbmeyer/php-microsoft-teams-connector It has a class that builds the AdaptiveCard schema and also a way to send it to a Teams webhook endpoint. I like using the Laravel Notification system for things like this, but what would be the chances of a PR using |
Just a note that Message Cards are marked as Legacy in the Microsoft documentation https://learn.microsoft.com/en-us/outlook/actionable-messages/message-card-reference |
So any idea if the workflow is disabled on our organization? |
A quick google and it does not seem disabling workflows is an option in Azure / teams admin |
Thats interesting! Sorry nothing came up in a google search. As far as I am aware, teams are EOL all "connectors" so the only way going forward are workflows. Maybe chat to your admins and see what they can do? |
thanks @jsandfordhughescoop i will reach to them. |
@jglagrimas Your organisation looks like they have set up conditional access to the Power Automate Workflows - hence why you are seeing it as disabled by the orgainisation. |
Ok, so it seems that we've all been granted a reprieve by Microsoft from August 2024 until December 2025 (although we'll have to make a URL change in December 2024 to opt-in). But long-term, it certainly sounds like the Webhook to Workflow pathway is going to be the only option for sending notifications to Teams. And that will in turn probably require the Adaptive Card format. More info here: https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/ In terms of a way forwards for the Notification Channel driver approach (this package) we can take inspiration from a couple of packages that have leaned into the Workflow pattern (and Adaptive Cards): |
Hi, sorry for the late response 🙈 |
Hey,
since today Teams appends the following messages automatically to messages send via this package:
Are there any guides or tips for an migration?
The text was updated successfully, but these errors were encountered: