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

Community site session details

Session Id : sbtoR56K46subt8Nz2m7LS
Power Automate - Building Flows
Answered

Automatically create SQL table based on json results

Like (0) ShareShare
ReportReport
Posted on 27 Sep 2020 12:00:33 by 111

I need to create an SQL table automatically, based on the results I get from HTTP API call.

How do I do this? Especially so that data types for columns are created automatically based on the json results?

Thank you!

{
 "page_count": 1,
 "page_number": 1,
 "page_size": 30,
 "total_records": 1,
 "users": [
 {
 "id": "aaaaaaaaaaaaaaa",
 "first_name": "Mike",
 "last_name": "Mike",
 "email": "mike@mike.com",
 "type": 2,
 "pmi": 1111111,
 "timezone": "Asia/Jerusalem",
 "verified": 0,
 "dept": "",
 "created_at": "2020-04-07T16:02:18Z",
 "last_login_time": "2020-09-26T08:49:51Z",
 "last_client_version": "5.3.52640.0920(android)",
 "pic_url": "",
 "language": "",
 "phone_number": "+555 555555555",
 "status": "active"
 },
 {
 "id": "bbbbbbbbbbbb",
 "first_name": "Sam",
 "last_name": "Sam",
 "email": "sam@sam.com",
 "type": 2,
 "pmi": 2222222,
 "timezone": "Asia/Jerusalem",
 "verified": 0,
 "dept": "",
 "created_at": "2020-04-07T17:02:18Z",
 "last_login_time": "2020-09-25T08:49:51Z",
 "last_client_version": "5.3.52640.0920(android)",
 "pic_url": "",
 "language": "",
 "phone_number": "+555 77777777",
 "status": "active"
 }
 ]
}

 

  • Verified answer
    michaelshparber Profile Picture
    111 on 03 Oct 2020 at 10:03:59
    Re: Automatically create SQL table based on json results

    Ok, I think I found.

    This converter will do the job:

    https://blog.sqlizer.io/posts/convert-json-to-sql/

    Although it is one-time and manual, it really helps.

    Hope Power Automate creates "Create SQL table" action soon!

     

  • michaelshparber Profile Picture
    111 on 28 Sep 2020 at 19:39:03
    Re: Automatically create SQL table based on json results

    So how do you recommend me to approach this?

    I have an API call that returns 150 columns.

    I don't want to define one-by-one.

    I am sure, you guys deal with creating SQL tables somehow...

    Maybe a different tool?

    I need to create it once, then I will use the flow to populate it.

  • v-alzhan-msft Profile Picture
    on 28 Sep 2020 at 05:47:49
    Re: Automatically create SQL table based on json results

    Hi @michaelshparber ,

     

    Sorry for I'm afraid that your requirement couldn't be achieved in Microsoft flow currently, since the function to create table to sql server is not supported in Microsoft flow currently.

     

    Best Regards,

    Alice

     

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

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete