Skip to main content

Minimal Flow integration with APIEase

This setup starts in APIEase and triggers a Shopify Flow workflow. To start in Shopify Flow and run a saved APIEase request instead, follow Run a saved request from Shopify Flow.

  1. Create and save a Flow request in APIEase. Add any Flow parameters your workflow needs.
  2. In Shopify Flow, create a workflow using the APIEase Flow Trigger.
  3. Add a Condition matching the trigger's requestId to the saved Flow request's ID. This trigger field contains the request ID, not its handle. You can find the ID in the request's edit-page URL.
  4. Add your workflow steps. The trigger's flowParameters is JSON text containing the inputs and an executionId generated by APIEase.
  5. To return a result to the waiting APIEase request, add the APIEase Flow Action. Its required Flow Parameters field must contain JSON preserving that executionId. You can pass through the trigger's flowParameters variable, or parse it in Run code, add result fields, and serialize it again. Do not replace it with an empty object or invent an execution ID.
  6. Turn on the workflow. Run the saved Flow request from APIEase, from one of its configured triggers, or by chaining to its handle as Next Request from another request.

For example, a Run code step that receives the trigger's flowParameters can return a JSON string for the action:

export default function main(input) {
const parameters = JSON.parse(input.flowParameters);
parameters.result = "complete";
return {message: JSON.stringify(parameters)};
}

Select that step's message output as the action's Flow Parameters value. Configure the Run code input to include the trigger's flowParameters.

APIEase normally waits for a callback containing the matching executionId, subject to its Flow response wait limit (25 seconds by default). Without that callback it can time out; completion of an unrelated action does not resolve the request. An immediate-response configuration returns before workflow completion.

To also run a subsequent saved APIEase request, add its handle as requestId inside the returned JSON while preserving executionId. APIEase resolves the originating execution first, then invokes that saved request. The trigger's top-level requestId identifies the originating Flow request; a requestId inside the action JSON selects a request to run.