Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows creating a webhook (hook) in an administrative context for a supported service. It is designed to configure and register webhooks that notify external systems about specific events occurring within the service. This is useful for integrating with messaging platforms, CI/CD pipelines, or other automation tools that need to react to changes or activities.

Common scenarios include:

  • Automatically sending notifications to Slack, Discord, or Microsoft Teams when certain repository events happen.
  • Triggering custom workflows when code branches are updated or new commits are pushed.
  • Integrating with chatbots or alerting systems like Telegram, Feishu, or Wechatwork to keep teams informed.

Practical example:

  • A DevOps team wants to receive real-time alerts in their Slack channel whenever a new pull request is created or merged. Using this node, they can create a Slack webhook configured to listen to those events and send messages accordingly.

Properties

Name Meaning
Active Boolean flag indicating whether the webhook should be active immediately after creation.
Authorization Header Optional string to set a custom authorization header sent with webhook requests.
Branch Filter String filter to restrict webhook triggers to specific branches only.
Config JSON object containing required webhook configuration options, including content_type and url.
Events JSON array specifying which events will trigger the webhook.
Type The type of webhook integration to create. Options: Dingtalk, Discord, Gitea, Gogs, Msteams, Slack, Telegram, Feishu, Wechatwork, Packagist.

Output

The node outputs JSON data representing the created webhook object as returned by the API. This typically includes details such as the webhook ID, URL, event subscriptions, status (active/inactive), and any metadata related to the webhook configuration.

If the webhook creation fails, the output will contain error information describing the failure.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential or equivalent authentication token to authorize requests to the target service's admin API.
  • The node expects the service base URL and credentials to be configured properly in n8n.
  • The webhook types correspond to various third-party services; ensure the target service supports the selected webhook type.

Troubleshooting

  • Invalid Config JSON: If the config property JSON is malformed or missing required fields (content_type, url), the API will reject the request. Ensure valid JSON and required keys are provided.
  • Authorization Errors: Missing or incorrect API credentials will cause authentication failures. Verify that the API key or token is correctly set up.
  • Unsupported Event Types: Providing invalid or unsupported event names in the events array may result in errors. Confirm event names match the service's API specification.
  • Inactive Webhook: If the webhook is created but not active, check the Active boolean property and set it to true if immediate activation is desired.
  • Branch Filter Misconfiguration: Incorrect branch filter strings might prevent the webhook from triggering. Validate the filter syntax according to the service documentation.

Links and References

  • Refer to the official API documentation of the target service for detailed webhook configuration options and supported event types.
  • Consult n8n community forums or documentation for examples on using webhook nodes with popular integrations like Slack, Discord, or Microsoft Teams.

Discussion