web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Power Pages does not r...
Power Pages
Suggested Answer

Power Pages does not receive Power Automate response

(0) ShareShare
ReportReport
Posted on by 6
Power Automate returns response on UI but does not return value back into Power Pages.
 
When looked at Devtools -> Network -> No response shows there as well
 
 
 
 
 
Power Automate Response
 
 
 
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,847 Moderator on at
    Trying to understand this.
    You have some action in Power Pages calling an Automate flow and you are expecting to see the result in devtools?
    When Power Pages calls a flow it would be calling it on the server. The client would not see the response thus it would not appear in devtools. Power Pages would be the one interacting with the result. What functionality is the flow providing for Power Pages? 
     
  • Suggested answer
    Fubar Profile Picture
    8,463 Super User 2026 Season 1 on at
    If you are using something like the sample code link below, check if you may be getting something in the .failure  (your screenshot shows the call being canceled in the dev tools) the sample code doesn't capture anything in the failure 
     
     
    @ronaldwalcott from Power Pages you can make an Ajax call to trigger a Power Pages Flow, and when done should have a response if there is not another failure.
  • EI-20041432-0 Profile Picture
    6 on at
    Below is the ajax call that i am using
    document.getElementById("UpdateButton")?.addEventListener("click", function (event) {
        console.log("Is this working");
       
       
        var SAP_OPOR = crc81_sap_opor_name.value;
        var LineNum = crc81_linenum.value;
        var _url = "/_api/cloudflow; -- removed the full url
     
     
      var data = {};
            data["SAP_OPOR"] = SAP_OPOR;
            data["LineNum"] = LineNum;
    //debugger;
        var payload = {};
        payload.eventData = JSON.stringify(data);
        shell.ajaxSafePost({
                type: "POST",
                url: _url,
             //   contentType: "application/json",
                data: payload,
               // "origin": "*",
               //cogs : true,
            })
     
                  .then(response => {
          // Assuming the flow returns data that you want to display
          // Display the return value in an element, e.g., with class 'description'
           const result1 = JSON.parse(response);
               debugger;
                console.log(result1);
                alert("worked 1");
                localStorage.setItem("SupplierPowerAutomateOutput1",result1["varoutput"]);
      })
     
            .done(function (response) {
                const result = JSON.parse(response);
                debugger;
                console.log(result);
                alert("worked 2");
                localStorage.setItem("SupplierPowerAutomateOutput2",result["varoutput"]);
                onSuccess();
            })
           
            .fail(function () {
               alert("failed");
            });
    });
    });

    In failure, it does return to the .fail when i force an error on the workflow that is not caught
    In the existing case. The workflow return success, so i was expecting the ajax to either get into .then or .done which would return the response from power automate

    The workflow pushes data to SAP. And my outcome is to return that message as a text onto power pages. (for the moment its a fixed value to get it functioning first)
    But as i do not get the response in the result1["varoutput"], i am not able to return it onto the front end
     
  • Suggested answer
    Fubar Profile Picture
    8,463 Super User 2026 Season 1 on at
    Are you able to try using a HTTP Response instead of the Power Pages response and see what happens.
     
    Also, could try removing the .done and .fail and instead putting a .then(function(response){....}) and seeing if anything is passed to the function (could also try .complete )
     
  • EI-20041432-0 Profile Picture
    6 on at
    Tried that. But got the following error
     
    TypeError: shell.ajaxSafePost(...).then(...).complete is not a function
     
     
     

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!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 45

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 30 Most Valuable Professional

#3
Fubar Profile Picture

Fubar 18 Super User 2026 Season 1

Last 30 days Overall leaderboard