cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FelipeLeite
Helper I
Helper I

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

@FelipeLeite 

 

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
Super User
Super User

Hello @FelipeLeite 

 

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

@FelipeLeite 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!

 

 

Hi, @Jcook 

The JSON file is already stored in a SharePoint site.

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?

@FelipeLeite 

 

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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Top Solution Authors
Users online (3,701)