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 / SQL Server Execute Sto...
Power Automate
Answered

SQL Server Execute Stored Procedure V2 error

(0) ShareShare
ReportReport
Posted on by

Hello, 

 

I am just getting started using Power Automate and Power Apps (so real NEWBIE) and I am trying to use the SQL Server Execute Stored Procedure (V2) using a very simple SP (insert a new row in a table). After I select the server, database and stored procedure I get an error message : 'body" is required (see image below). What am I doing wrong?

 

I know my on premise gateway connection is working because I tested it with a SQL Server Insert row and that was working.

 

Any help/guidance would be much appreviated.

 

Thanks!

SQL_ESP_error.png

 

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hello @Dom32 

    Which type of authentication do you use to connect to SQL Server? Maybe it's something with the connection. Could you provide more detailed information?

    Ferran

  • DR-01081351-0 Profile Picture
    on at

    Hi Ferran

     

    the connection is using SQL authentication. I was able to get the Execute Stored Procedure V2 working using a Power Automate button. 

     

    I just find it strange that it is not working with a Power Apps (even though they have a template for it). I would like to be able to trigger the SP within a Power App form.

     

    thanks!

  • fchopo Profile Picture
    8,003 Moderator on at

    Hello @Dom32 

    Really weird. Have you tested it with another SP just in case there's something with it? There's an excellent video on how to call SP from PowerApps here: https://powerusers.microsoft.com/t5/Webinars-and-Video-Gallery/Calling-Stored-Procedures-from-within-PowerApps/m-p/161897

    Hope it helps!

    Ferran

  • DR-01081351-0 Profile Picture
    on at

    Hello group

     

    well, I added a variable as input in my stored procedure to update one of the field and everything started working as expected. I guess I should have pay more attention to the "requirements" 🙂

     

    Initially I was trying to execute the SP without a variable.

     

    Sorry for your time, love this Power Automate stuff.

     

    D

     

     
  • dvtkiet Profile Picture
    6 on at

    I have the same problem, and my stored procedure doesn't need any input parameter (it creates a table from different tables.
    The stored procedure executes well in SQL; but when I call the stored procedure using Execute Stored Procedure V2, I get the error "Body is required."
    Thank you in advance for your help.

  • Verified answer
    DR-01081351-0 Profile Picture
    on at

    Hi dvtkiet

     

    I think the stored procedured requires at least one "INPUT" per the online documentation. I added an input to my stored procedured and I was able to use it with a button no problem.

     

    https://docs.microsoft.com/en-us/connectors/sql/#execute-stored-procedure-(v2)

     

    Hope it works for you.

     

    Cheers

     

    sql_SPv2.png

  • dvtkiet Profile Picture
    6 on at

    Hi @Dom32, It works. Thank you so much for your help and the documentation.

  • Zap174 Profile Picture
    167 on at

    Hi @dvtkiet 

    How did you add an input to your stored procedure? Could I see an example?

  • DR-01081351-0 Profile Picture
    on at

    This is how I added my INPUT to my stored procedures

    Dom32_0-1655907027900.png

    then in Powerautomate, the INPUT will be listed

    Dom32_1-1655907110933.png

     

  • Zap174 Profile Picture
    167 on at

    Thank you so much!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard