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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (2,209)