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:
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...).