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 Apps / Error: Invalid number ...
Power Apps
Answered

Error: Invalid number of arguments. Received 1, expected 0 when trying to trigger automate flow from app

(0) ShareShare
ReportReport
Posted on by 588

I have a Power Automate which is meant to be triggered by clicking a button in my app. I keep getting an error however which is stopping it from working as it appears to not be able to pick up the 'ThisItem.ID'

 

powerappautomate error.png

The weirdest bit is that I have a previous version on which it was working fine. I can't use this previous version as the live as there have been other fixes made elsewhere in the app which will be a huge pain to have to do again, so I'm just trying to add this icon to the live version now when I get this error. 

 

Screenshot below of the working one on a previous unpublished version of the app so you can see that there is no difference between the two, except that I renamed the automate flow between the two.

powerappautomate working.png

Appreciate any help you might be able to give!

Categories:
  • BCLS776 Profile Picture
    8,994 Moderator on at

    It is behaving as though the flow to which you connect needs no arguments. Two things to try:

    1. Check your flow and verify the number of arguments it is expecting
    2. If #1 checks out, disconnect and reconnect the flow to your app to force Power Apps to renew the connection

     

  • misc Profile Picture
    588 on at

    Thanks for coming back to me. I've checked my flow and it definitely only needs one (Get Item). I imagine if that was the issue then the previous version wouldn't work either but it does (I can restore to that version and still get it to run and succeed, if I revert to the 'live' version straight after I get this error again).

     

    I have tried renaming the flow, removing it from the data connections, reconnecting it and still no luck. 

     

    powerappautomate error2.png

  • BCLS776 Profile Picture
    8,994 Moderator on at

    That's starting to sound like a Microsoft Support Ticket kind of problem

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @misc 

     

    At times, it is possible when you save the flow and create an input parameter, it creates a reference but is not saved in the flow anywhere. To fix this, you can update the expression as:

     

    FlowName.Run(ThisItem.ID, "")

     

    Adding an empty input resolves the issue and since the second input is not used anywhere, it just bypasses it. 

     

    Note: Please make sure that you are keeping the order right, if you are using parameter 2, then the expression will be FlowName.Run("",ThisItem.ID)

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • misc Profile Picture
    588 on at

    I just tried that and it changes the error to: 'Invalid number of arguments: received 2, expected 0'

     

    I have input a support ticket as @BCLS776 suggested so hopefully they will be able to come back to me with a solution.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @misc 

     

    If it is saying expected 0, then there is no need to pass anything. The expression will be FlowName.Run()

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • misc Profile Picture
    588 on at

    I did try that - and although it ran on the app side I got this error on the Flow:

    Unable to process template language expressions in action 'Get_item' inputs at line '1' and column '50392': 'The template language expression 'triggerBody()['Getitem_Id']' cannot be evaluated because property 'Getitem_Id' cannot be selected. 

     

    This also doesn't explain why it works with ThisItem.ID on a previous version of the app but not the current one.

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @misc 

     

    Thanks for sharing more details. The issue here is even though you are passing a value from the app but there is no parameter created on the flow. You need to follow below steps.

     

    1) Open the flow and remove the dynamic content from the Get Item Action. Select "Ask in PowerApps" in the dynamic content.

    2) Save your flow and remove it from the app.

    3) Add the flow again, this time it should accept one parameter, it is still not accepting then you need to repeat step 1-2.

    4) Once it is having a parameter, then you can pass FlowName.Run(ThisItem.ID)

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • misc Profile Picture
    588 on at

    Thank you so much! That fixed it! 

  • DQ2 Profile Picture
    2 on at

    hey yash ,

    I am trying to reemove dynamic content but curreently it show only body . i didnt find "ask in powerapps".Can you help me . I am getting same error in power apps while trying to run flow 

    Capture.PNG

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 Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard