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

How to copy azure blob CSV file to SharePoint list

I have created this flow for the copy file to SharePoint but I don't have any clear idea for this expression so it's throwing an error.

krish11_0-1615937579325.png

krish11_1-1615937613344.png

For split I have used this formula:

split(decodeUriComponent(replace(replace(uriComponent(body('Get_blob_content')),'%0D',''),'%0A','#NEWLINE#')),'#NEWLINE#')

 

this is my CSV file format in Azure blob storage:

"list_id","list_name","list_description"
"63D5A5","abc","xyz"

"63D5A5","cshbdj","fjdf"
"3D5A5","kfskjbk","abdjsbc"

 

Anyone can support me with this, it would be helpful.

1 ACCEPTED SOLUTION

Accepted Solutions
krish11
Helper I
Helper I
5 REPLIES 5
Gopala_Krishna
Solution Sage
Solution Sage

@krish11 

You are getting the error as the UriComponent function expects it's parameter to be of type string. When you pass the body of blob content that would be in format of array. That's why you are facing the error. 

 

Please try to pass string value in the UriComponent function, or use any other function from the reference link shared.

 

For more information related to conversion functions, please check the link - Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

if the information shared helps you, please consider giving a thumbs up 👍 and mark solution as resolved

@Gopala_Krishna 

 

Thanks for your reply. I have converted that UriComponent function parameter to type string. Here's the expression :

split(decodeUriComponent(replace(replace(uriComponentToString(outputs('Get_blob_content')?['body']),'%0D',''),'%0A','#NEWLINE#')),'#NEWLINE#')

 

And flow ran successfully. But I didn't get any value in the SharePoint list. Can you give me an expression that I can use to convert CSV into Sharepoint List? I don't know much about expressions. I just started learning.

krish11
Helper I
Helper I
Anonymous
Not applicable

How to copy azure blob file to teams channel? The teams channel link should provide in the mail

@Anonymous 

What is your file format? And in which format you want file in Teams channel?

 

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,582)