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 / Write form data in Exc...
Power Automate
Unanswered

Write form data in Excel via HTTP request

(0) ShareShare
ReportReport
Posted on by 10

Hello experts,

 

I'm a beginner in Power Automate and Flow and also new in the community.

I guess for most of you this is a quick win, but I'm a bit lost.

Would be great to get some ideas how to solve my issue.

 

I have a Wordpress form. Following JSON will be send after clicking "submit":

 

 

{
 "$content-type": "application/x-www-form-urlencoded",
 "$content": "cG9zdF9GVzdYWpheD0w",
 "$formdata": [
 {
 "key": "post_id",
 "value": "001"
 },
 {
 "key": "post_text",
 "value": "testpage"
 },
 {
 "key": "timestamp",
 "value": "2023-09-14T21:55"
 },
 {
 "key": "firstname",
 "value": "Userfirstname"
 },
 {
 "key": "name",
 "value": "Username"
 },
 {
 "key": "e_mail",
 "value": "test@test.com"
 }
 ]
}

 

 

My goal is to insert the data into a new excel line in a table. The table has the structure of the key values pairs already. 

I'm using Flow.

In my flow I currently use a HTTP request, (I use the generated POST URL in my form) and I use the Excel action: add line to a table (sorry I use not the englisch version, so maybe it's a different name). I have tested a lot of different configurations but without success... 

Would love to get some ideas how I can solve that

 

Thanks so much, cheers!

#frank

 

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Hello,

     

    Sorry I am not following. You say that, that JSON will be sent after hitting submit. Do you mean it will be sent to the Flow and you want to Parse the JSON and write the Key/Value Pairs to the Excel table?

    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Frankisback Profile Picture
    10 on at

    Hi Michael,

     

    sorry for my bad description. But it is exactly like in your assumption.

    The output of my Wordpress form after clicking on submit is the shared JSON.

    But I'm not able (with my current knowledge) to parse that in FLOWS to get the key/value pairs out of it. You know later in my Excel file the key=column name. And I need just the values next to each other in one line...

     

    All the best,

    frank 

  • Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Hi 

     

    Assuming, in this case that the schema is the same format (even if there are will be more key/value pairs, the overall schema is the same).

     

    I created this sample Flow

    Step 1: a Trigger where I pass in the string text you have

    FLMike_0-1694905134751.png

     

    Step 2: I use Parse JSON to turn it into a JSON Object. Please Note here. I have leveraged the data you gave me as a Sample. If the format will change, you will have to deal with that.

    FLMike_1-1694905151122.png

     

    Step 3. I use a Select, to pull out the Key Value pairs from $formdata

    body('Parse_JSON')['$formdata']

    And Key and Value are just Dynamic values from the Parse JSON

    FLMike_6-1694905295466.png

     

    FLMike_2-1694905169435.png

     

     

     

    Step 4. I use a Compose to turn it into a simple JSON instance.

    FLMike_4-1694905183954.png

     

    And here are the actual steps (pre-run)

    FLMike_5-1694905212005.png

     

    Now all you need to do is write it to Excel

    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

  • Frankisback Profile Picture
    10 on at

    Hi Michael,

     

    so just for my understanding. In step 1 you use a "Manual Trigger".

    I guess this is the replacement for my "HTTP request trigger". (seee below)

    I see the code you inserted into the schema part is different to what I have mentioned in the post, right?

    There is a section with text and some attributes like title and x-ms-dynamically-added. ...

    Is it possible to get the complete code? I will copy that to my http request schema then.

     

    Bildschirmfoto 2023-09-17 um 12.02.51.png

     

     

    So currently I use the JSON in my first post in the http request, as schema (see screenshot) but I guess this is wrong.

    In case I get you Schema code, I'll insert that one and give it a try.

     

    Looking forward to get it solved soon.

    Thanks so much Michael! 

     

  • Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Hello,

     

    No, this is just a sample. The trigger was just how I got the data in. It's the stuff after that that is important.

     

    Are you making an HTTP request, in your Flow? If so, the output of THAT action is what you needed to share with me, which I am using in my actions. I used what you provided.

     

    Think of it this way. The Trigger doesn't matter at all zippo. It doesn't even matter what steps you take BEFORE you have whatever the final JSON output will be from those steps, but what is important is the output of those steps. Thats what I need.

     

    I am not building the whole flow. I am building a way to convert what you gave me into a usable format for what you want to do, write to excel.

     

    So, if you are making an HTTP request in your Flow, then you need to share with me the Output of that. If the Output of that was what you already gave me. Then you can leave your trigger however you like, but make sure the output looks like what you gave me. Then plugin the steps i gave you (minus the Trigger), after that and use the content you provided to me as the schema.

     

    Make sense?

    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Frankisback Profile Picture
    10 on at

    Hi Michael,

     

    so when I just use an empty http request action and I do a test, I should get as output the data which you need, right? So it's like that:

     

    Bildschirmfoto 2023-09-17 um 21.20.21.png

     

     

     

     

     

    When I test this it looks like that:

     

    Bildschirmfoto 2023-09-17 um 21.49.44.png

     

    The details I send you already in a private message.

    Thanks so much for getting me on track.

    Best, frank

  • Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Looks good to me. at least from what I see yeah

  • Frankisback Profile Picture
    10 on at

    @FLMike that's good!

    Ok next is the parse JSON part. 

    Is it possible that you send me (based on the info you got in pers. message) the content & schema part of the "parse json" action in a private message?

    Because for field content I have as "dynamic content" just TEXT, HEADER and PATHPARAMETER in case I did not fill any schema in my http request.... just to be sure I have it right afterwards...

     

    Bildschirmfoto 2023-09-17 um 23.09.16.png

     

    Would be so great.


    by the way, can I send you some donation in case you get it solved?

    The stuff is for a small non profit organization 🙏 

     

  • Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Hello,

     

    Earlier you said when you do it empty for the Trigger, you get this Body 

    FLMike_0-1694995576213.png

    That's what you want as the INPUT the Parse JSON



    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

     

  • Frankisback Profile Picture
    10 on at

    Hello @FLMike ,

     

    ok I did the changes in the "Parse JSON" action.

    Now I get an error (and I remember, that I got that in one of my first attempts as well)

     

    Bildschirmfoto 2023-09-18 um 20.40.28.png

    Seems that this type "x-www-form-urlencoded" cause some issues...

    Was this content type working for you in your example? Any idea how to fix that?

    Thanks so much, frank

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 639

#2
Valantis Profile Picture

Valantis 392

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard