web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / From SharePoint folder...
Power Automate
Unanswered

From SharePoint folder to SQL database - HOW TO?

(0) ShareShare
ReportReport
Posted on by 180

Help! I've spent almost 9 hours on this and I am still not done, I have read the whole internet so far but I can't get my *** flow to work 😞

 

The furthest I came was that my flow ran successfully, but it inserted NULL values into my SQL DB. Here is my usecase:

In global: I am using PowerApps and a client want to batch upload multiple rows at once instead of filling in a form in the PowerApp for one invoice (row) at a time.

 

I looked for ways to upload a file into PowerApps, then get flow to push that to my SQL database, but I didn't find to many examples, therefore I thought "let me just create a SharePoint library" and then users can upload their file there, and done.

Now the trouble began, what I did was the following:

 

1. When a file is created in a folder

2. Get tables

3. Apply to each
3a. List rows present in a table
3b. Insert row (V2)

 

Here are my pictures:

Gjakova_1-1632336282367.png

Gjakova_3-1632336465389.png

Gjakova_4-1632336486603.png

I think the problem I am having is getting the output into my SQL DB.

 

When I insert: items('List_rows_present_in_a_table')?['ColumnName'] it gives me the following error:

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The workflow action 'Insert_row_(V2)' at line '1 and column '2478' references the action 'List_rows_present_in_a_table' of type 'OpenApiConnection': only the actions of type 'foreach' are allowed to be referenced by 'repeatItems' or 'items' functions.'.'.

 

When I insert: items('Apply_to_each')?['ColumnName'] it gives me the following error:

 

It only inserts a row at my Pk_Column, but all the other columns stay NULL, furtermore, it just enters 1 row instead of multiple rows (my Excel file consists of 25 rows)

 

Can somebody help me please?

 

If there is a better way to bulk upload, I'm all ears. And if there is also a working solution to upload the file first to Power Apps and then push it to SQL db (thus skipping SharePoint/OneDrive) I'm happy to hear that as well, but for now, I am struggling a lot with this...).

Categories:
  • PacoA0 Profile Picture
    3 on at

    Hi Gjakova,

    Did you find any solution to this issue?

    I'm trying to do document versioning control from a sharepoint library. I was using *.iqy files and an excel file with some formulas to extract information such as document code and version form the file, everything works fine until I update my conections and everything gets scrambled.

    So I am trying to extract some kind of document database (sql or access) from my sharepoint folder with power automate so I can get something similar to what the internet query file provides.

     

  • Gjakova Profile Picture
    180 on at

    Hi there, nope. I eventually tried another method through Power Apps itself and skipped the Power Automate part. Basically for my usecase I used an Excel file in OneDrive, which users then can enter and put their info in the file. The app then reads it and loops through every row. For my usecase it was good enough, so I left it at that.

     

    Hope you can find your solution!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard