cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
huseyinazizcan
Frequent Visitor

CSV data comes in (using "One Drive - Get File Content") as a string instead of array/table

Hi,

 

I currently have a flow where I'm trying to do the following:

 

1. Get a list of files within a OneDrive folder

2. For each file:

    a. Get the file contents

3. For each line, create a Dynamics 365 record.

 

I am able to do all of the above but struggle with point 2.a.

 

Here is a screenshot of my flow:

 

image

 

The "Get file content" block brings the file back as a string. Here is how this looks (sample data):

image

 

My question is, is there anyway to take the above output to an actual table so that columns and rows can be referenced?

I want to be able to create a Dynamics 365 record for each line and populate the record with the contents of the CSV's lines.

 

So it should go from

 

"Field A, Field B, Field C \n\r

Value 1, Value 2, Value 3 \n \r

Value 3, Value 4, Value 5"

 

To this:

 

 

Field A

Field B

Field C

Value 1

Value 2

Value 3

Value 4

Value 5

Vaue 6

  

 Thanks in advance.

 

3 REPLIES 3
v-yuazh-msft
Community Support
Community Support

Hi @huseyinazizcan,

 

Do you want to get all file's content and the file1 content would be saved in the Field A in the first line of CSV table,

the file2 content would be saved in the Field B in the first line of CSV table,

the file3 content would be saved in the Field C in the first line of CSV table,

the file4 content would be saved in the Field A in the second line of CSV table,and so on?

 

If I understand you correctly,I afraid that there is no any way to achieve your needs in microsoft flow currently.

 

 

Best regards,

Alice

Hi @v-yuazh-msft,

 

Thanks for your reply (and apologies for my late reply).

 

That's not quite what I'm trying to do but thanks for your reply anyway.

 

I actually managed to do this via an azure function.

 

This topic can now be closed.

 

Thank you again.

You can use Parse CSV action from Plumsail Documents connector. It allows you to convert CSV into an array and variables for each column. Please read this article demonstrating how it works.

 

Just put your file into the action and you will be able to iterate through array of records with all the values.

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.

Top Solution Authors
Users online (2,192)