Twenty Trigger icon

Twenty Trigger

Handle webhook events emitted by Twenty

Overview

This node acts as a webhook trigger for events emitted by the Twenty platform. It listens for incoming webhook POST requests and processes events such as creation or updates of persons, companies, and notes. It verifies the authenticity of incoming requests using a shared secret and signature validation. This node is useful for automating workflows that need to respond to specific events from Twenty, such as updating CRM records or triggering notifications when a person or company is created or updated.

Use Case Examples

  1. Trigger a workflow when a new person is created in Twenty to automatically add them to a mailing list.
  2. Start a process when a company is updated to sync data with another system.
  3. Receive all webhook events from Twenty to log or analyze activity.

Properties

Name Meaning
Events Select which Twenty events to listen for. If left empty, the node will receive all webhook events.
Shared Secret A secret string configured in Twenty to verify incoming webhook requests. Incoming requests must include a matching signature header to be accepted.

Output

JSON

  • eventName - The name of the event received from Twenty.
  • headers
    • signature - The webhook signature header from the incoming request.
    • timestamp - The webhook timestamp header from the incoming request.
    • nonce - The webhook nonce header from the incoming request.
  • ``
    • *
      * `` - All other data included in the webhook payload from Twenty.

Dependencies

  • Uses Node.js crypto module for HMAC SHA256 signature verification.

Troubleshooting

  • If the webhook signature headers are missing, the node responds with a 401 Unauthorized error. Ensure the Twenty webhook is configured to send the required headers.
  • If the signature verification fails, the node responds with a 403 Forbidden error. Verify that the shared secret matches the one configured in Twenty and that the request body is not altered.
  • If no events are selected, the node will accept all events. If specific events are selected but the incoming event does not match, the node will ignore the event and not trigger the workflow.

Discussion