Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation, User Create Hook, allows users to create webhook configurations for user-related events in an external system. It is designed to set up hooks that trigger on specific user events and send notifications or data payloads to a specified URL endpoint.

Common scenarios where this node is beneficial include:

  • Automating workflows when a new user is created or updated.
  • Integrating user event notifications with messaging platforms like Slack, Discord, or Microsoft Teams.
  • Triggering custom business logic or alerts based on user activity in an application.

For example, you could use this node to automatically notify a Slack channel whenever a new user is registered, or to synchronize user creation events with another system via a webhook.

Properties

Name Meaning
Active Boolean flag to activate or deactivate the webhook.
Authorization Header A string value to include an authorization header in the webhook request for authentication.
Branch Filter A string filter to limit webhook triggers to specific branches (useful in version control contexts).
Config JSON object containing required configuration options for the webhook, including content_type and url. This defines how and where the webhook sends data.
Events JSON array specifying which user events should 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 result of the webhook creation request. This typically includes details about the newly created webhook such as its ID, status, configured events, and target URL.

If the node supports binary data output (not indicated here), it would represent any binary response from the API, but this operation primarily deals with JSON payloads.

Dependencies

  • Requires an API key or token credential to authenticate requests to the external service managing the webhooks.
  • Depends on the external system's API supporting webhook creation for user events.
  • The node uses HTTP requests with JSON payloads; thus, proper network access and valid URLs are necessary.
  • No additional environment variables are explicitly required beyond standard API credentials.

Troubleshooting

  • Invalid Config JSON: If the Config property JSON is malformed or missing required fields (content_type, url), the webhook creation will fail. Ensure the JSON is correctly formatted and includes all required keys.
  • Authorization Errors: Missing or incorrect authorization headers can cause authentication failures. Verify the Authorization Header value and API credentials.
  • Unsupported Event Types: Providing invalid or unsupported event names in the Events array may lead to errors. Confirm that event names match those accepted by the external API.
  • Inactive Webhook: If the Active flag is false, the webhook might be created but not triggered. Set it to true to enable the webhook.
  • Network Issues: Failures connecting to the webhook URL or API endpoint can occur due to network restrictions or incorrect URLs. Validate connectivity and URL correctness.

Links and References

  • Refer to the external system’s API documentation for webhook creation and supported event types.
  • Consult n8n documentation on using JSON and HTTP request nodes for more advanced webhook handling.
  • For messaging platform integrations (Slack, Discord, etc.), see their official webhook setup guides.

Discussion