Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Trigger Power Automate Flow Through Business Central Action.

Posted on by 1,654

Hy Community,

I Need a "Action" in Business central  Page that can Directly Trigger the Power Automate Flow in Business central through AL Code.

NOTE: I Need Directly Trigger a "Action" there should not be a pop up of Run flow in Business Central.

Thank in Advance!!

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Trigger Power Automate Flow Through Business Central Action.

    You are missing the path in Client.Get()

        Client.Get('yourpath', Response);
        if (Response.IsSuccessStatusCode) then begin
            Content := Response.Content;
        end
        else
            Message('Response was negative %1, %2', Response.HttpStatusCode, Response.ReasonPhrase);
        Content.ReadAs(Result);
        Message(Result);

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Trigger Power Automate Flow Through Business Central Action.

    Can you tell if you're just trying to display an HTTP response as a text message? Could you also show me the variable declaration and where you provided the path in Client.Get()?

  • Suggested answer
    Inkey Solutions Profile Picture
    Inkey Solutions 1,654 on at
    RE: Trigger Power Automate Flow Through Business Central Action.

    pastedimage1683953132330v1.png

    I Have Put the  MyProcedure(); in trigger OnRun() I got these through Click the that action Button in Business Central.

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Trigger Power Automate Flow Through Business Central Action.

    I think you forgot to add your procedure to the OnRun() trigger of your codeunit INK_GetPostURL.. try adding your procedure in the OnRun() trigger, like so

    trigger OnRun()
    begin
        MyProcedure();
    end;

    Regards

  • Inkey Solutions Profile Picture
    Inkey Solutions 1,654 on at
    RE: Trigger Power Automate Flow Through Business Central Action.

    3733.Capture.PNG

    The Starting of the flow Is "HTTP" so and consist of "HTTP POST URL" link and so on the flow is Made.

    >>Can you Guide me that , I am Trying to make a  Procedure in a Codeunit that I call in the PageExtension ,To get the Power automate Flow Run Directly through the AL Code and I have mention the image below ,so just guide me that if there is a way through AL code we can Call an "HTTP" of Power Flow in the Action of Business Central.    

    pastedimage1683897460002v1.png7271.Screenshot-_2800_18_2900_.pngScreenshot-_2800_16_2900_.png

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Trigger Power Automate Flow Through Business Central Action.

    Hi,

    I had a similar requirement few days ago and found a helpful blog post by ZHU YUN https://yzhums.com/32418/. It explains how to manually add new Power Automate action in Business Central through AL code.

    I hope it helps you as well

    Regards

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,104 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans