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

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

@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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (71,519)