Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to create a webhook on a repository in Gitea. Webhooks are user-defined HTTP callbacks that trigger when certain events happen in the repository, such as pushes, pull requests, or releases. This node is useful for automating workflows by notifying external services or triggering CI/CD pipelines whenever repository events occur.

Practical examples include:

  • Notifying a chat service (Slack, Discord, etc.) when new commits are pushed.
  • Triggering deployment scripts after a successful merge.
  • Integrating with monitoring tools to track repository activity.

Properties

Name Meaning
Owner The owner of the repository where the webhook will be created.
Repo The name of the repository where the webhook will be created.
Active Whether the webhook should be active immediately after creation (true or false).
Authorization Header Optional authorization header value sent with webhook requests.
Branch Filter Optional filter to restrict webhook triggers to specific branches.
Config JSON object containing configuration options for the webhook. Required fields include content_type and url. Example: { "content_type": "json", "url": "https://example.com/webhook" }
Events JSON array specifying which repository events will trigger the webhook.
Type The type of webhook integration. Options: Dingtalk, Discord, Gitea, Gogs, Msteams, Slack, Telegram, Feishu, Wechatwork, Packagist.

Output

The node outputs JSON data representing the created webhook object returned from the Gitea API. This typically includes details such as the webhook ID, URL, configured events, active status, and other metadata.

If the webhook creation fails, the node will throw an error describing the issue.

Dependencies

  • Requires access to a Gitea instance with API enabled.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the Gitea API must be set in the credentials.
  • No additional external dependencies beyond the Gitea API.

Troubleshooting

  • Invalid credentials or insufficient permissions: Ensure the API token has rights to manage webhooks on the target repository.
  • Malformed JSON in Config or Events: The config and events properties expect valid JSON strings. Invalid JSON will cause parsing errors.
  • Repository not found: Verify the owner and repo names are correct and accessible by the authenticated user.
  • Unsupported webhook type: Confirm the type property matches one of the supported options.
  • Network issues: Check connectivity to the Gitea server and that the base URL is correctly configured.

Links and References

Discussion