Forum Academy Marketplace Showcase Pricing Features

External API triggers twice: a bug or I'm doing something wrong?

Hey there!

Recently, I realised that my API is being executed two times upon each trigger in the workflow. Can’t understand if it’s a bug or feature. This is what I do:

  1. Designer: Group Prompt with a type of content of my API, data to display is left empty.
  2. Workflow: Trigger “Display data” in the Group with data to display specified. (e.g. API - Prompt)
  3. Workflow: Trigger “Create new thing” where I pass a parameter of the response received in the Group. (e.g. Group Prompt’s Prompt’s items’ parameter).
  4. Workflow: Trigger “Go to page” with a unique id of the newly created thing (i.e. it goes to the same page with the “replace history” flag).

Looks simple, but below is what actually happens:

  1. A new thing is created with the param received in mget package (e.g. debug shows like it’s been created even before I reach the step of creating a thing - even just before finishing the Display data trigger)
  2. Renders the page with the ID and shows the param received in “doapicallfromserver” package which is different from that has been created in the thing (i.e. that means it’s another query - as each time I receive a unique value from the API)
  3. Then, when the browser receives “mget” package the page is refreshed with the param in it.

I’m confused… can anyone help me understand what’s going please?

1 Like

Running into a similar issue. We are using an API we built ourselves in Google Cloud functions.
We are using it to run an API workflow on a list (it’s not the list API but rather the API called to generate the list itself, meaning it should only get called once to generate the initial list), but it gets called twice, sometimes at the exact same time, and sometimes 1-2 seconds apart.

I am having the same issue with different APIs. The workflow has an action which runs the api to post information to a website and after it successfully posts the information to the site I get an error stating “We are already processing same request, please try again after few mins”. It does not affect my information but it just n o look good to end user.

We actually just noticed that we needed to change the ‘Use as’ field of the API in the API Connector to ‘Action’ instead of ‘Data’ so that we can just run the action at the beginning of the workflow and then reference it once instead of plugging the same api in as a data source in multiple fields on one action. Maybe the same can be done for others to fix their issues.