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 😉

 

 

View solution in original post

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

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,920)