I built a flow that emails posts in a specific Teams chat (not a channel). It works, but it's triggering on every chat conversation I'm in, filling the audit log with junk entries every time I get ANY chat message.
When I add the conversationID as a trigger condition the flow never runs. I don't believe the syntax for the conversationID is wrong. Here's the trigger (with a placeholder for the actual conversationID):
@equals(triggerOutputs()?['body/conversationID'], 'PLACEHOLDERcoversationID@thread.v2')
I've been using https://www.spguides.com/power-automate-trigger-conditions/ as a guide for writing this trigger and it doesn't seem I've done anything wrong. My only other other thought is that my organization might be inadvertently blocking the trigger condition with some security setting.
I tested other simpler triggers and they also fail.
Here's an example of a response. I made sure my trigger condition matches the conversationID from the desired chat as displayed in this response.
{
"headers": {
"Expect": "100-continue",
"Host": "xxxx.xxxx.xxxx.azure.com",
"X-Forwarded-For": "XX.XX.XX.XXX",
"Content-Length": "1098",
"Content-Type": "application/json"
},
"body": {
"value": [
{
"subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"changeType": "created",
"clientState": "secretClientValue",
"subscriptionExpirationDateTime": "2023-10-19T16:26:40.9326058+00:00",
"resource": "chats('PLACEHOLDERconversationID@thread.v2')/messages('1697732435167')",
"resourceData": {
"id": "1697732435167",
"@odata.type": "#Microsoft.Graph.chatMessage",
"@odata.id": "chats('PLACEHOLDERconversationID@thread.v2')/messages('1697732435167')"
},
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"conversationId": "PLACEHOLDERconversationID@thread.v2",
"messageId": "1697732435167",
"linkToMessage": "https://teams.microsoft.com/l/message/PLACEHOLDERconversationID@thread.v2/1697732435167?tenantId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&context=%7B%22contextType%22:%22chat%22%7D"
}
]
}
}