Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows updating an existing user webhook in a Gitea instance via its API. It is useful for managing webhooks that trigger on user-related events, enabling automation or integration with other systems when specific user actions occur. For example, you might update a webhook to change which events it listens to, modify its active status, or adjust authorization headers for security.

Properties

Name Meaning
Id The unique identifier of the webhook to update (required).
Active Whether the webhook is active (true) or inactive (false).
Authorization Header A string value to set the authorization header sent with webhook requests.
Branch Filter A string filter to restrict webhook triggers to specific branches.
Config JSON object containing additional configuration settings for the webhook.
Events JSON array specifying which user events should trigger the webhook.

Output

The node outputs the response from the Gitea API after attempting to update the webhook. This typically includes the updated webhook details in JSON format. The output does not include binary data.

Dependencies

  • Requires access to a Gitea instance with API enabled.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The node uses the Gitea REST API endpoint /api/v1 as base URL.

Troubleshooting

  • Invalid Id: If the provided webhook ID does not exist, the API will return an error indicating the webhook was not found. Verify the ID before running.
  • Authorization Errors: Missing or incorrect API credentials will cause authentication failures. Ensure the API key/token is valid and has sufficient permissions.
  • Malformed JSON: The Config and Events properties expect valid JSON strings. Invalid JSON will cause parsing errors. Use proper JSON formatting.
  • Inactive Webhook: Setting Active to false disables the webhook; ensure this is intended.
  • Branch Filter Misconfiguration: Incorrect branch names or patterns may prevent the webhook from triggering as expected.

Links and References

Discussion