cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fraserdear
Advocate I
Advocate I

How to convert an Array of data delimited into sharepoint list?

Hi PowerAutomate Community, 

 

I am trying to take a data source thats in an unstructured format and put it into a sharepoint list. 

I have now got it into an array using the compose statements : 2021-06-23_18-26-58.jpg

 

But I now need to be able to create each row in the array into a sharepoint list entry where each row in the array represents different collumns which are delimited by the comma!  

 

I have tried all sorts of things but I cant see a way to get this data into a structured format to be able to reference each discrete element to be able to push into a list. 

 

Any ideas?  Its driving me a little mad!

1 ACCEPTED SOLUTION

Accepted Solutions
DamoBird365
Super User
Super User

HI @fraserdear 

 

This might help https://www.damobird365.com/how-to-parse-a-csv-to-json-array-flow/ 

 

You want to split on a return line to initially get the objects as lines.  Then you can split again using the delimiter as part of a select action and define key : value pairs at that point.  The above article shows you how to do this on CSV's from various sources and of various encodings.  If you already have the string of data in Power Automate, you might want to look at https://www.damobird365.com/parse-a-csv-to-json-array-quickly/ which is another example of the same thing but by using a return line in a compose to split the initial string.

 

Good luck!

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

 

 

View solution in original post

5 REPLIES 5
Hardesh15
Super User
Super User

@fraserdear  you can use Apply to each action and then for each item use split function with separator comma. This way you will extract each row element and then put into SharePoint list.

Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

@Hardesh

fraserdear
Advocate I
Advocate I

Thanks @Hardesh15.  I have created that before and but the Split item only gives me another array with no way to assign each item to the sharepoint list as when you 'create item' i dont know how to put each array item into each field.

@fraserdear You should use index value after split function. index value start from 0. Ex- Split()[0].

Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

@Hardesh

DamoBird365
Super User
Super User

HI @fraserdear 

 

This might help https://www.damobird365.com/how-to-parse-a-csv-to-json-array-flow/ 

 

You want to split on a return line to initially get the objects as lines.  Then you can split again using the delimiter as part of a select action and define key : value pairs at that point.  The above article shows you how to do this on CSV's from various sources and of various encodings.  If you already have the string of data in Power Automate, you might want to look at https://www.damobird365.com/parse-a-csv-to-json-array-quickly/ which is another example of the same thing but by using a return line in a compose to split the initial string.

 

Good luck!

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

 

 

Thanks @DamoBird365!  This didnt give me quite what i needed but one of your links at the end of the article did!

 

Power Automate: How to parse a CSV File to create a JSON array (tachytelic.net)

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,268)