Skip to main content

Upon Receiving an HTTP Request

Cloud Development workflow supports triggering a workflow via HTTP requests initiated by mini-programs, Apps, or third-party services. It also supports returning data generated or computed in the workflow as an HTTP response, thus serving as an HTTP API Service.

Configuration Item Description​

Enabled​

Whether this trigger method is enabled. If disabled, the workflow cannot be triggered via HTTP requests.

Push URL​

The URL for receiving HTTP requests. Sending a request to this address using the POST method will trigger the workflow. This URL already includes the path from the configuration item below.

Path​

Specifies the Path part in the push request URL. It is randomly generated by default and can be manually modified. Supports multi-level paths, e.g., a/b/c.

Usage Example​

Trigger using the curl command​

You can use the curl command to send an HTTP request to trigger the workflow.

tip

Use the Push URL from the configuration item to replace <WebhookURL> in the example below.

Without Any Parameters​

curl -X POST <WebhookURL>

With Body Parameters​

curl -X POST <WebhookURL> -d '{ "key": "value" }' -H 'Content-Type:application/json'

With Header Parameters​

curl -X POST <WebhookURL> -H 'key1:value1'

Specifying HTTP Response Data​

By default, a workflow successfully triggered by an HTTP request returns fixed data upon completion:

{
"message": "flow executed successfully"
}

You can return specified response data by using the Respond to HTTP Request node. Follow these steps:

  1. In the right-hand operations panel Node List, drag the Respond to HTTP Request node into the canvas.
  2. Connect this node with other process nodes.
  3. Configure the node. Refer to the documentation