Webhook Action

When ClearFeed triggers a workflow configured for the webhook action and sends an HTTP POST request to an external webhook, it includes a payload containing various information about the workflow and the associated request. The payload is sent in JSON format and includes the following fields:

  1. version: The version of the payload format. Currently set to '1.0'.

  2. workflow_delay: The delay, in minutes, before the workflow was triggered.

  3. workflow_name: The name of the workflow that was triggered.

  4. workflow_message_ts: The id of the message that triggered the workflow.

  5. workflow_message_text: The text of the message that triggered the workflow.

  6. workflow_message_url: The URL of the message that triggered the workflow.

  7. workflow_message_author_id: The ID of the author of the message that triggered the workflow.

  8. workflow_message_author_name: The name of the author of the message that triggered the workflow.

  9. request_id: The ID of the request associated with the workflow.

  10. request_state: The state of the request associated with the workflow.

  11. request_title: The title of the request associated with the workflow.

  12. request_priority: The priority of the request associated with the workflow.

  13. request_thread_ts: The ID of the thread where the request message was sent.

  14. request_thread_url: The URL of the thread where the request message was sent.

  15. request_channel_id: The ID of the channel where the request was received.

  16. request_channel_name: The name of the channel where the request was received.

  17. request_collection_id: The ID of the collection that contains the channel where the request was received.

  18. request_collection_name: The name of the collection that contains the channel where the request was received.

Example Payload:

{
  "version": "1.0",
  "workflow_delay": "15",
  "workflow_name": "Escalation Reminder",
  "workflow_message_ts": "1669086095.123456",
  "workflow_message_text": "This is the message that triggered the workflow.",
  "workflow_message_url": "https://clearfeed.slack.com/archives/C0ABCD123/p1669086095123456",
  "workflow_message_author_id": "U12345",
  "workflow_message_author_name": "John Doe",
  "request_id": 123,
  "request_state": "Open",
  "request_title": "Need assistance with XYZ",
  "request_priority": "high",
  "request_thread_ts": "1669086095.987654",
  "request_thread_url": "https://clearfeed.slack.com/archives/C0ABCD123/p1691040592308569?thread_ts=1669086095.987654",
  "request_channel_id": "C0ABCD123",
  "request_channel_name": "clearfeed_swiftcorp_solutions",
  "request_collection_id": 123,
  "request_collection_name": "Premium Customer Channels"
}

Webhook Headers

To verify the authenticity of the request source, ClearFeed adds the following headers to the HTTP POST request:

  1. X-Cf-Signature: A signature generated using a secret key known only to ClearFeed and the receiving server. You can use this signature to verify that the request has not been tampered with and originated from ClearFeed.

  2. X-Cf-Timestamp: The timestamp indicates the exact time the request was sent. You can use this timestamp along with the signature to validate the request's freshness and prevent replay attacks.

Validating Requests

To validate that webhook requests you receive originated from ClearFeed, read more details here.

Testing Webhook Payload

If you want to send a test payload, you can do this by executing a cURL command such as the one shown below:

curl --location 'https://www.example.com' \
--header 'Content-Type: application/json' \
--data '{
    "version": "1.0",
    "workflow_delay": "15",
    "workflow_name": "Escalation Reminder",
    "workflow_message_ts": "1669086095.123456",
    "workflow_message_text": "This is the message that triggered the workflow.",
    "workflow_message_url": "https://clearfeed.slack.com/archives/C0ABCD123/p1669086095123456",
    "workflow_message_author_id": "U12345",
    "workflow_message_author_name": "John Doe",
    "request_id": 123,
    "request_state": "Open",
    "request_title": "Need assistance with XYZ",
    "request_priority": "high",
    "request_thread_ts": "1669086095.987654",
    "request_thread_url": "https://clearfeed.slack.com/archives/C0ABCD123/p1691040592308569?thread_ts=1669086095.987654",
    "request_channel_id": "C0ABCD123",
    "request_channel_name": "clearfeed_swiftcorp_solutions",
    "request_collection_id": 123,
    "request_collection_name": "Premium Customer Channels"
}'

Note: To use Webhook action workflow along with Zapier, you can use the Zapier endpoint URL as the webhook URL. You would also need to verify the webhook action before the Zapier connection is established. You can use the above payload for configuring this.

Last updated