Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Webhook → Create Multiple

AI-generated

Overview

This node operation allows users to create multiple webhooks in a batch by providing an array of webhook objects. Each webhook object must include the required fields: `name`, `actions`, `collections`, and `url`. This operation is useful for automating the setup of multiple webhooks at once, such as when integrating with external services that require event notifications for various collections and actions.

Use Case Examples

  1. Creating multiple webhooks to notify different URLs for create, update, and delete actions on specific collections.
  2. Batch creation of webhooks to streamline integration setup in a Directus project.

Properties

Name Meaning
Data (JSON) An array of partial webhook objects to be created. Each object must include `name`, `actions`, `collections`, and `url` fields.

Output

JSON

  • id - The unique identifier of the created webhook.
  • name - The name of the created webhook.
  • actions - The list of actions that trigger the webhook (e.g., create, update, delete).
  • collections - The collections associated with the webhook.
  • url - The URL to which the webhook sends requests.

Dependencies

  • Requires API authentication to the Directus system to create webhooks.

Troubleshooting

  • Ensure the JSON data array is correctly formatted and includes all required fields (`name`, `actions`, `collections`, `url`).
  • Check API credentials and permissions to confirm the node can create webhooks in the Directus instance.
  • Common errors may include validation errors if required fields are missing or malformed, or authorization errors if the API token lacks necessary permissions.

Links

Discussion