cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to read a .json file and insert the data into a SharePoint list?

Hello 🙂

I want to create a flow that reads a .json file and inserts the data into a SharePoint list. Each data read in the .json file must be inserted in the respective column of the SharePoint list. My json follows this structure:

[
    {
        "date": "08/31/2020",
        "hour": 1,
        "production": 1,
        "machine": "Z22",
        "completeDate": "08/31/2020 01:00"
    },
    {
        "date": "08/31/2020",
        "hour": 4,
        "production": 1,
        "machine": "Z44",
        "completeDate": "08/31/2020 04:00"
    }
]


I created a Parse JSON that can capture my JSON schema correctly, but how do I make the flow read directly from the .json file? And how do I insert this data read into a SharePoint list?

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous 

 

You need to add the Parse JSON and then create an item in the List.

 

CFernandes_0-1599750908191.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

7 REPLIES 7
Jcook
MVP

Hello @Anonymous 

 

You will need a place for this JSON file to be stored. Where is this JSON coming from?


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





CFernandes
Super User
Super User

@Anonymous I assume you have the JSON file in a datasource consider SharePoint.

 

My solution:

 

Formula 1 - base64(outputs('Get_file_content_using_path')?['body'])

Fomula 2 -base64ToString(outputs('Compose'))

 

CFernandes_1-1599747407100.png

 

Note: Get File Content using Path - I have set Infer Content Type NO

 

CFernandes_3-1599747566910.png

 

Test - 

 

CFernandes_2-1599747504493.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

Anonymous
Not applicable

Hi, @Jcook 

The JSON file is already stored in a SharePoint site.

Anonymous
Not applicable

Thanks for the quick response, @CFernandes 

This example you created works very well! But how do I insert this data read from JSON into a SharePoint list?

@Anonymous 

 

You need to add the Parse JSON and then create an item in the List.

 

CFernandes_0-1599750908191.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

This was helpful. Thanks

apc_and_rod
Frequent Visitor

when my json is converted from base64tostring , all values are surround by \ \

 

[{\"id_user\": 1636, \

could you guys please help? 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,489)