Custom API Calls

It's also quite common to want to send data to a third party API (perhaps even your own) at some point in a workflow execution. We've build a Custom API Block to handle just that. To add a Custom API Block, simple add it at any point in your workflow as seen below.

Custom API Block is found under UtilitiesCustom API Block is found under Utilities

Custom API Block is found under Utilities

You can easily configure the Custom API block authentication (we support basic auth, header auth, and no auth), the request method (i.e. GET, POST, PUT, DELETE, etc), and any header or body parameters you want sent out. Of course, you can use any variable data exposed in previous blocks by using the variable selector.

Configure the Custom API Block method, authentication, etcConfigure the Custom API Block method, authentication, etc

Configure the Custom API Block method, authentication, etc

Embedded X-Headers

If you're sending data from an event (such as Shopify) your own API, we've found it useful to be able to identify which workflow and user the incoming request is coming from. To alleviate that problem, whenever an outgoing API call is sent via the Custom API Block, we attach the following headers:

ParameterDescription
X-Alloy-WorkflowIdRepresents the workflowId of the workflow where this request origionated from
X-Alloy-UserIdRepresents the current userId the workflow is being invoked for
X-Alloy-BlockNameRepresents the starting event block that triggered the workflow
X-Alloy-BlockTypeRepresents the starting event block type (i.e. Shopify) that triggered the workflow
X-Alloy-ExecutionUuidRepresents the unique identifier for the current execution. Useful if you want to rerun an execution after the fact

Did this page help you?