Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows users to create a webhook for an organization. It is designed to configure and register hooks that listen to specific events within the organization, enabling automated workflows triggered by those events. Typical use cases include integrating with messaging platforms (like Slack or Discord) to send notifications when certain organizational changes occur, or triggering CI/CD pipelines upon repository updates.

For example, you could set up a webhook that notifies a Slack channel whenever a new branch is created in the organization's repositories, or trigger a deployment process when a push event happens.

Properties

Name Meaning
Org The name of the organization for which the webhook is being created.
Active Boolean flag indicating whether the webhook should be active immediately after creation.
Authorization Header A string value to be sent as an authorization header with the webhook requests.
Branch Filter A string filter to limit webhook triggers to specific branches.
Config JSON object containing configuration options for the webhook. Required fields include content_type and url.
Events JSON array specifying which events will trigger the webhook.
Type The type of webhook integration to create. Options include: Dingtalk, Discord, Gitea, Gogs, Msteams, Slack, Telegram, Feishu, Wechatwork, Packagist.

Output

The node outputs JSON data representing the response from the webhook creation API call. This typically includes details about the newly created webhook such as its ID, status, configured events, and other metadata confirming successful registration.

No binary data output is indicated.

Dependencies

  • Requires an API key or authentication token to access the organization's API endpoint.
  • The base URL for the API is expected to be provided via credentials or environment configuration.
  • The node depends on the external service's API to create and manage webhooks.

Troubleshooting

  • Invalid or missing required fields: Ensure that mandatory properties like Org, Config (with content_type and url), and Type are correctly set.
  • Authorization errors: Verify that the authorization header or API credentials are valid and have sufficient permissions to create webhooks.
  • Malformed JSON in Config or Events: Since these fields expect JSON input, ensure the JSON syntax is correct to avoid parsing errors.
  • Unsupported webhook type: Confirm that the selected webhook Type is supported by the target API.
  • Network issues: Check connectivity to the API endpoint and that the base URL is correctly configured.

Links and References

  • Refer to the documentation of the target organization's API for webhook creation specifics.
  • Review webhook best practices for the chosen integration platform (e.g., Slack, Discord).
  • JSON formatting guides to ensure proper input for Config and Events fields.

Discussion