One of our users reported problems building a flow using the "Post a feed notification" action. They are using the "When a file is created" (SharePoint) trigger and then simply had the "Post a feed notification" action. In that action, they are hard-coding the "Recipient" and "Notification text" fields. The problem is that in most of the runs, that action failed with this output:
{
"error":
{ "code": 400,
"source": "flow-apim-msmanaged-na-northcentralus-01.azure-apim.net",
"clientRequestId": "0fdce0e5-c0b6-47b1-b6cf-278b086d0318",
"message": "The response is not in a JSON format.",
"innerError": "Cannot read server response."
}
}
I created a copy of that flow, changing the Recipient to me and the Team and Channel to one that I own. My copy consistently fails as well, but with a different error:
{
"error":
{ "code": 500,
"message": "Environment id is unexpectedly null or empty",
"source": "flow-apim-msmanaged-na-centralus-01.azure-apim.net",
"path": "choose[6]\\when[1]",
"policyId": "",
"clientRequestId": "400a7d50-b30d-4323-9da4-df67dd08357d"
}
}
Microsoft's documentation on this action is (to be generous) a bit lacking: https://docs.microsoft.com/en-us/connectors/teams/#post-a-feed-notification
I also found this blog post (https://mymetaverseday.com/2021/12/08/notification/), but it really just shows that the action exists and "how to use it".
Is anyone successfully using this action? If so, what does it actually do? From the name and the brief description, it seems like it's supposed to generate a notification in the Activity feed of the designated Recipient. Since those notifications are generally connected to actual content (e.g.: a post in a team, reaction to a chat message, etc.), I'm confused as to the benefit of just popping a message into the activity feed.
Solved! Go to Solution.
This worked for me when I put the user's email through the "Get user profile (V2)" action and got the dynamic content of "Id" and placed that into the Teams Recipient field.
If you are having trouble with the "The response is not in a JSON format" error. Read this:
https://powerusers.microsoft.com/t5/Building-Flows/Solution-How-to-use-the-MS-Teams-Post-a-Feed-Noti...
Responding to this because I have the same issue. Action seems to have some pretty straight forward properties, but for whatever reason it isnt working for me either.
This worked for me when I put the user's email through the "Get user profile (V2)" action and got the dynamic content of "Id" and placed that into the Teams Recipient field.
Good catch! I guess it does ask for the "user id", so that kind of makes sense. However, in other Teams actions, "Recipient" accepts an email address (see below). It seems the Teams team needs to collaborate a bit better. 😉
I have opened a support ticket with Microsoft on this issue. After I responded above about getting it working using the User ID, I discovered it was only working when sending a notification to myself.
This action seems very flakey and the call I had with Microsoft on the issue they provided the level of support of someone who has been in Power Automate only 1 or 2 times. Having me try blatantly wrong things, me knowing they were never going to work. They then had me send an export of my flow and said they would get back to me...
Looks like, for now, we are resorting to posting a channel message in order to send team members a notification..
So, did you try turning it off and on again? 😆
If you are having trouble with the "The response is not in a JSON format" error. Read this:
https://powerusers.microsoft.com/t5/Building-Flows/Solution-How-to-use-the-MS-Teams-Post-a-Feed-Noti...
This function doesn't work for me either. Get this error "Environment id is null or empty".
I am utterly and absolutely SHOCKED that Microsoft would roll this action out without complete documentation regarding pre-requisites and usage. 😆
thanks. solved it for me aswell
Same problem here, nor really working for me. Not with ID; nor Email ,
User | Count |
---|---|
27 | |
14 | |
12 | |
10 | |
9 |
User | Count |
---|---|
51 | |
29 | |
28 | |
24 | |
22 |