cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mcmillan_Mac
Frequent Visitor

Flow not running

I am creating one flow to trigger an automated event when it matches the conditions. However, it is not working and throwing error.

 

Condition: 

triggerOutputs()?['attachments/content'] > Contains > Critical
 
Error: Unable to process template language expressions for action 'Condition' at line '1' and column '26820': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.
 
Not sure what am I doing wrong. Can someone please help? Below is the JSON i am trying to match the condition for.

{

  "@odata.type": "#microsoft.graph.chatMessage",

  "etag": "",

  "messageType": "message",

  "createdDateTime": "2020-12-28T13:49:26.041Z",

  "lastModifiedDateTime": "2020-12-28T13:49:26.041Z",

  "summary": "New incident has been opened",

  "importance": "normal",

  "locale": "en-us",

  "webUrl": "",

  "id": "",

  "from": {

    "application": {

      "id": "",

      "displayName": "",

      "applicationIdentityType": ""

    }

  },

  "body": {

    "contentType": "html",

    "content": "<>"

  },

  "channelIdentity": {

    "teamId": "",

    "channelId": ""

  },

"attachments": [

    {

      "id": "",

      "contentType": "application/vnd.microsoft.teams.card.o365connector",

      "content": "{\r\n  \"summary\": \"New incident has been opened\",\r\n  \"text\": \"\",\r\n  \"themeColor\": \"0076D7\",\r\n  \"sections\": [\r\n    {\r\n      \"text\": \"\",\r\n      \"facts\": [\r\n        {\r\n          \"name\": \"Incident\",\r\n          \"value\": \"<p></p>\"\r\n        },\r\n        {\r\n          \"name\": \"Caller\",\r\n          \"value\": \"<p>Event Management</p>\"\r\n        },\r\n        {\r\n          \"name\": \"Priority\",\r\n          \"value\": \"<p>1 - Critical</p>\"\r\n        }
4 REPLIES 4
v-litu-msft
Community Support
Community Support

Hi @Mcmillan_Mac,

 

You could have a try this expression:

triggerOutputs()?['attachments'][0]['content']

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Same issueAnnotation 2021-01-01 091804.jpg

v-litu-msft
Community Support
Community Support

Hi @Mcmillan_Mac,

 

Could you please tell me what's trigger are you using?

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Mcmillan_Mac
Frequent Visitor

triggerOutputs()?['attachments/content'] > Contains > Critical

 

This is the trigger condition.

Trigger is an alert in our alerting tool which sends adaptive card in teams channel.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,182)