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 / Trigger Flow from JSON...
Power Automate
Answered

Trigger Flow from JSON Payload with Key Value Pairs

(0) ShareShare
ReportReport
Posted on by 29

Hi all,

 

I have been trying to connect to JSON webhook payloads from an external tool to append records to a SharePoint list. The issue I am facing is my JSON payload comes in a List style, whereby each data point has a key (the name of the field) and a value (the variable) pairing. These will always be consistently named for all outputs to this Flow, however, I cannot figure out how to access the values as dynamic content under the name of the key.

 

Can someone help me with setting this up so I can use the keys as dynamic content? I am new to webhooks in the Microsoft world. A test sample of the JSON payload is below:

 

{
 "$content-type": "application/x-www-form-urlencoded; charset=UTF-8",
 "$content": "XYZ123xyz321",
 "$formdata": [
 {
 "key": "Alpha_ID",
 "value": "12345"
 },
 {
 "key": "Beta_ID",
 "value": "263014"
 },
 {
 "key": "Gamma",
 "value": "XYZ II"
 },
 {
 "key": "Country",
 "value": "United States"
 },
 {
 "key": "Delta_ID",
 "value": "2630168"
 },
 {
 "key": "Epsilon_Name",
 "value": "Test's Company"
 },
 {
 "key": "Email",
 "value": "test@gmail.com"
 },
 {
 "key": "Zeta",
 "value": "Test Co."
 },
 {
 "key": "Eta_ID",
 "value": "12345"
 },
 {
 "key": "Theta_Name",
 "value": "XYZ"
 },
 {
 "key": "State",
 "value": "California"
 }
 ]
}

 

It is important  to note that:

  • The key-value pairing will not change for this webhook, so I want to be able to use each element
  • The format in the sample reflects the format of these fields, and these will not change (but may be null in some cases where not all data is available)

 

My Flow looks as follows:

AthenaPM_0-1615548764574.png

 

Any and all help will be greatly appreciated!

Categories:
I have the same question (0)
  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @AthenaPM 

     

    For the purpose of this, I've stuck your json into an array like so :

    DamoBird365_0-1615625228602.png

     

    Then I have used a compose to obtain the $formdata element of the array and finally the parse action.  The easiest way to get a sample payload for the Parse JSON is to run the flow with the schema set to {} and then grab the history output from the earlier compose.

     

    DamoBird365_1-1615625306881.png

    This then allows me to select the key and value items as dynamic content. 

     

    DamoBird365_2-1615625659824.png

     

    You could then use a filter if you are looking for a specific key.

    DamoBird365_1-1615625911264.png

     

    DamoBird365_0-1615625900516.png

     

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @AthenaPM 

     

    How are you getting on?  If you need more help then please let me know.

     

    If my post has helped, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Thank you @AthenaPM 

     

    You were my 100th solution!

     

    DamoBird365_0-1615968421827.png

    😀😀😀😀😀😀😀😀😀😀😀😀

  • AthenaPM Profile Picture
    29 on at

    Hi @DamoBird365 ,

     

    Thanks for the help on this. I haven't had a chance to fully get back into this particular project due to higher priorities elsewhere. I did quickly test this out and it seems to work, and I thought I had accepted the solution earlier this week but the Power Community website is always super buggy when I am on it.

     

    I kind of wish there was a slightly simpler way to turn it into variables (in one connector), however, if it has to be this way, it will be.

     

    Thanks mate,

    Max

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @AthenaPM 

     

    I assumed that these keys would vary and your example was theoritical but if they are always in the same position in the array, you could use the expression:

    variables('123')?['$formdata']?[0]?['value'] = 12345
    variables('123')?['$formdata']?[1]?['value']
    variables('123')?['$formdata']?[N]?['value']
    etc
    Where N is the position, starting from 0.
     
    Damien

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard