Hooks
Allow incoming web requests to trigger your workflows.
Last updated
Allow incoming web requests to trigger your workflows.
Last updated
Hooks allow you to start workflows from external systems, even if those systems don't have a Shopify Flow integration themselves. This lets you leverage the capabilities of Shopify Flow to apply logic and take action directly, rather than having to rely on an external third party workflow tool like as Zapier or Tray.
When you install Trickle, a unique hook URL for your store is generated. You can then send HTTP requests from anywhere to that URL, and a Scheduled trigger ready trigger will fire, allowing you to begin a workflow inside Flow.
You can find your store's unique Hook URL at the bottom of the application's home page once you've installed the application.
Hook URLs have the structure https://app.tricklexp.com/hooks/:hook_token/:trigger_name
, where :hook_token
is unique to your store and :trigger_name
is a required name for the trigger (this is passed as Trigger name
in the Scheduled trigger ready trigger and lets you differentiate between different incoming hooks).
You can send any kind of HTTP request (GET
, POST
, PATCH
etc) to your Hook URL. In addition to the required token and trigger name elements in the path of the URL, you can include some optional parameters, either in the query string or as a JSON object in the request body.
If you provide a body in your request, it will be available in the "Scheduled trigger with custom data ready" trigger at the scheduled time.
If you don't provide any body in your request (eg, if it's a GET
request), then the custom data trigger will still fire, but with the name of the trigger in the custom data field. (This is to ensure that at least one "Scheduled trigger ready" trigger fires from a hook request, even if there's no data besides the trigger name.)
If your request body is provided as a JSON object with customer_id
, order_id
, or product_id
keys, those values will be treated the same as if they had been provided in query parameters.
This example would fire a "Scheduled trigger with order ready" trigger as soon as the request was made, with a Trigger name value of order_ready
and the data for order 2080379863089
available in the workflow.
Parameter | Description |
---|---|
trigger_schedule
When you would like the corresponding trigger to fire. Supports the same syntax as documented for the Schedule trigger action. If you omit this parameter, the trigger will fire right away.
customer_id
If you provide a customer ID here, customer data will be available in the "Scheduled trigger with customer ready" trigger at the scheduled time.
order_id
If you provide an order ID here, customer data will be available in the "Scheduled trigger with order ready" trigger at the scheduled time.
product_id
If you provide a product ID here, customer data will be available in the "Scheduled trigger with product ready" trigger at the scheduled time.