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

Notifications

Announcements

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:
I have the same question (0)
  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard