cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ivan_Iakovlev
New Member

The trigger call "when an HTTP request is received" works twice.

In SharePoint, there is a form on which there is a button to call the flow. In a random order, this trigger is triggered twice.
It is impossible to track this problem from Power Automate, since the calls occur simultaneously, I get the same Body.

This button JS code bellow:

 

 

doRequest(this.decisionFlowHTTPRequestUrl, body)

 

export const doRequest = async (url: string, body: string, customOptions?: any) => {
  const options = {
    method: 'POST',
    ...customOptions,
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json;charset=utf-8',
      'Cache-control': 'no-cache',
      Pragma: 'no-cache',
      Expires: '0',
      dataType: 'json',
      ...customOptions?.headers,
    },
    body: body,
  };
  console.log({ url: url, body: JSON.parse(body), options: options });
  return fetch(url, options)
    .then((r) => r.json())
    .then((r) => {
      console.log(r);
      return r.message ? r : r.error;
    })
    .catch((err) => {
      console.log(err);
      return err;
    });
};

 

1 REPLY 1
Shapuiz
New Member

Same problem

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,972)