TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node allows you to create a webhook in the Twenty API system. Webhooks are user-defined HTTP callbacks that get triggered by specific events, enabling real-time notifications and integrations between systems. By creating a webhook, you can have Twenty send event data to your specified target URL whenever certain operations occur.

Common scenarios for this node include:

  • Automating workflows by triggering actions in other applications when an event happens in Twenty.
  • Receiving real-time updates about changes or activities without polling the API.
  • Securing webhook payloads using a shared secret to verify authenticity.

For example, you might create a webhook to notify your internal system whenever a new user signs up or a project is updated, allowing immediate processing or logging of these events.

Properties

Name Meaning
Depth Determines how much related nested data to include in the response:
- 0: Only the primary webhook object.
- 1: Primary object plus directly related objects.
- 2: Primary object, its related objects, and their related objects.
Target Url The URL where the webhook payloads will be sent when triggered. This should be an endpoint on your server or service ready to receive and process webhook requests.
Description An optional text description for the webhook to help identify its purpose or usage.
Secret An optional secret string used to compute an HMAC signature for webhook payloads. This secret is shared between Twenty and your webhook consumer to authenticate incoming webhook requests and ensure they are from a trusted source.
Operations A JSON array defining which operations or events the webhook should listen for. This controls what triggers the webhook.

Output

The node outputs the created webhook object as JSON. This typically includes details such as the webhook ID, target URL, description, secret (if set), configured operations, and any related metadata depending on the depth level selected.

If the node supports binary data output, it is not indicated here; thus, the output is purely JSON representing the webhook resource.

Dependencies

  • Requires an API key credential for authenticating with the Twenty API.
  • Needs the base URL domain configured in credentials to direct API requests properly.
  • Depends on the Twenty API being accessible and operational.
  • No additional external services are required beyond the Twenty API.

Troubleshooting

  • Invalid Target URL: Ensure the target URL is reachable and correctly formatted (including protocol http:// or https://). Invalid URLs will cause webhook creation to fail.
  • Authentication Errors: Verify that the API key credential is valid and has sufficient permissions to create webhooks.
  • Malformed Operations JSON: The "Operations" property expects valid JSON. Incorrect formatting or invalid operation names may cause errors.
  • Secret Mismatch: If using the secret for HMAC verification, ensure both sides use the exact same secret string to avoid authentication failures on webhook delivery.
  • Depth Parameter Issues: Using unsupported depth values outside 0, 1, or 2 may result in unexpected responses or errors.

Links and References

Discussion