MsgCore icon

MsgCore

Universal messaging gateway - send messages across multiple platforms

Overview

This node operation allows you to create a new webhook for event notifications within a specified project. Webhooks are HTTP callbacks that notify your application when certain events occur, enabling real-time integration and automation. This is useful in scenarios where you want to receive immediate updates about messaging events such as message receipt, sending status, button clicks, or reactions on messages.

For example, you can use this node to set up a webhook that triggers whenever a new message is received or a reaction is added, allowing your workflow to process these events instantly, such as logging them, triggering alerts, or updating databases.

Properties

Name Meaning
name Friendly name for the webhook — a descriptive identifier for easy reference.
url Target URL for webhook delivery — the endpoint where event notifications will be sent.
events Events to subscribe to (comma-separated) — specify which events should trigger the webhook. Options include:
- message.received
- message.sent
- message.failed
- button.clicked
- reaction.added
- reaction.removed
secret Custom webhook secret (optional) — a secret token used to secure webhook payloads; if not provided, it will be auto-generated.
project Project identifier to operate on — specifies the project context for the webhook creation.

Output

The output of this node operation is the JSON response from the API after creating the webhook. This typically includes details about the newly created webhook such as its ID, name, subscribed events, target URL, secret, status, and possibly metadata related to delivery statistics.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests.
  • The node sends a POST request to the API endpoint /api/v1/projects/{project}/webhooks with the webhook configuration.
  • The project parameter must correspond to an existing project in the system.

Troubleshooting

  • Invalid URL: If the target URL is malformed or unreachable, webhook creation may fail. Ensure the URL is valid and accessible.
  • Missing required fields: The name, url, events, and project fields are mandatory. Omitting any will cause errors.
  • Authentication errors: Ensure the API key credential is correctly set up and has permissions to create webhooks in the specified project.
  • Event subscription errors: The events string must contain valid event names separated by commas without typos.
  • Secret handling: If providing a custom secret, ensure it meets any length or format requirements imposed by the API.

Common error messages might include:

  • "Unauthorized" or "Authentication failed" — check API credentials.
  • "Invalid input" or "Missing required parameters" — verify all required properties are set.
  • "Project not found" — confirm the project identifier is correct.

Links and References

Discussion