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 / Bulk Insert from Excel...
Power Automate
Answered

Bulk Insert from Excel to SQl

(0) ShareShare
ReportReport
Posted on by 4,214 Super User 2026 Season 2

Is there is anyway to bulk insert into database in Power Automate desktop, instead of looping, i will get data in table format, can i push bulk data into DB

 

@VJR 

  • VJR Profile Picture
    7,635 on at

    There is a BULK INSERT sql statement itself which you can make use of after loading the data into Excel.

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 2 on at

    Can you tell me in brief, so i hav a excel contain 1 lakh of data, so i will read eexcel as a db so the data was stored on exceldata table variable,

    how can i pass this table data directly database, how to insert.  

  • Verified answer
    VJR Profile Picture
    7,635 on at

    No need to read excel as Db.

    If you already have the data in Excel then set up Sql connection and use the Execute sql statement with the BULK Insert command. The command itself uses the Excel file parameter. 

     

    Below are some examples for csv. 

    You may not need all the parameters. So search for the actual syntax and see which parameters you will need.

     

    BULK INSERT Employees
    FROM 'D:\data\employees.csv'
    WITH (
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n',
    FIRSTROW = 2
    );

     

     

    BULK INSERT Sales
    FROM 'C:\temp\1500000 Sales Records.csv'
    WITH (FIRSTROW = 2,
     FIELDTERMINATOR = ',',
     ROWTERMINATOR='\n',
     BATCHSIZE=250000,
     MAXERRORS=2);
     

     

     

     

     

  • Abhilash_Swain Profile Picture
    901 on at

    Hi @VJR ,

    I am downloading the excels/CSV file from a drop box and storing it in one drive. The query is not working for server files . Have you tried that?

    I am trying to push a JSON data. Any idea how to achive?

     

  • VJR Profile Picture
    7,635 on at

    Hi @Abhilash_Swain 

     

    Haven't tried that, but 

    i. Can you share what path of OneDrive are you using

    i.i. Hopefully the OneDrive is fully synced when the file is used

    ii. What is the error you are seeing when you mention "query is not working"

    iii. And what exactly you meant by "pushing json data" when it is used for csv data

     

  • Abhilash_Swain Profile Picture
    901 on at

    Hi @VJR ,
    I am using an Azure SQL server.
    My csv and Json file is in onedrive .

     

    One drive link:- (Ex:- https://my.xxx.com/personal/abhilash_swain_xxx_com/_layouts/15/download.aspx?UniqueId=d079e37524c640f3bac299f7ccd88b40&e=4h8518)

    Local Link:- "C:\Users\Abhilash.Swain\Downloads\test.json"

  • VJR Profile Picture
    7,635 on at

    Hi @Abhilash_Swain 

    Just did a high level research and they all say using the OPENROWSET(BULK) function.

    Import JSON documents - SQL Server | Microsoft Learn

    How to Import JSON Data into SQL Server? - GeeksforGeeks

    Could you explore some more on that. If its works for you then yours will be the first answer on the forum for importing a json into database :).

     

  • Jojie Profile Picture
    6 on at

    I know that this is an old thread, but I came up to this problem right now.

     

    Can anyone guide me how to use the filepath from SharePoint excel file rather than the Local file path? 

     

    Thanks! 

  • Thanura09 Profile Picture
    192 on at

    you can get the file id by using graph explorer, take the file id and and use it as the file

    https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0

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
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 211 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 190

Last 30 days Overall leaderboard