web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / I cannot get some data...
Power Automate
Answered

I cannot get some data from parse JSON

(0) ShareShare
ReportReport
Posted on by 31

My flow can run successfully but I cannot get the data I want. Please see my input/schema/out put  below.

###CONTENT###

{
  "destination": "Uabf2dd5f07ac83e44534bd71336eb2b8",
  "events": [
    {
      "type": "message",
      "message": {
        "type": "text",
        "id": "17553718278498",
        "text": "I wanna get this message."
      },
      "webhookEventId": "01GQZ3162RHHGMJQD575QZ2X0J",
      "deliveryContext": {
        "isRedelivery": false
      },
      "timestamp": 1675006875644,
      "source": {
        "type": "user",
        "userId": "Ucbabb2f3d5bed169768667082781cbcb"
      },
      "replyToken": "1075c45a080a4b1a8bd989939459ebeb",
      "mode": "active"
    }
  ]
}
 
###Schema###
{
  "type": "object",
  "properties": {
    "destination": {
      "text": "string",
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "webhookEventId": {
            "type": "string"
          },
          "deliveryContext": {
            "type": "object",
            "properties": {
              "isRedelivery": {
                "type": "boolean"
              }
            }
          },
          "timestamp": {
            "type": "integer"
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            }
          },
          "replyToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "mode": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "webhookEventId",
          "deliveryContext",
          "timestamp",
          "source",
          "message"
        ]
      }
    }
  }
}
 
###OUTPUT BODY###
{
  "destination": "Uabf2dd5f07ac83e44534bd71336eb2b8",
  "events": [
    {
      "type": "message",
      "message": {
        "type": "text",
        "id": "17553718278498",
        "text": "I wanna get this message."
      },
      "webhookEventId": "01GQZ3162RHHGMJQD575QZ2X0J",
      "deliveryContext": {
        "isRedelivery": false
      },
      "timestamp": 1675006875644,
      "source": {
        "type": "user",
        "userId": "Ucbabb2f3d5bed169768667082781cbcb"
      },
      "replyToken": "1075c45a080a4b1a8bd989939459ebeb",
      "mode": "active"
    }
  ]
}

 

 

I would like to create an item with the underline text above, but PowerAutomate already displayed "text" as a dynamic content but my list is created without this portion. Please help me.

Screenshot 2023-01-29 225251.png
Categories:
  • Verified answer
    AliB365 Profile Picture
    91 on at

    Hi @Maijija117 

     

    Event is an array.  You have 1 object, which can access using either first() or ?[0].   If the data you have supplied is in a compose, you can write an expression as follows:

     

    first(outputs('Compose')?['events'])?['message/text']
     

    If you've got any more questions please let me know.  I hope this helps.

     

    Ali B

  • Maijija117 Profile Picture
    31 on at

    It works like a charm! Thanks so much. 

    first(body('Parse_JSON')?['events'])?['message/text']

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard