Agendor Trigger icon

Agendor Trigger

Handle Agendor webhooks

Overview

This node acts as a webhook trigger for Agendor events, allowing workflows in n8n to start automatically when specific changes or actions occur within an Agendor account. It listens for various event types such as creation, update, or deletion of activities, organizations, deals, and persons.

Common scenarios where this node is beneficial include:

  • Automatically processing new business opportunities (deals) as they are created or updated.
  • Syncing contact or organization data with other systems when they are created or modified.
  • Triggering notifications or follow-up tasks when deals are won or lost.
  • Logging or auditing changes in the CRM by capturing updates or deletions.

Practical example: When a new deal is created in Agendor, this node triggers a workflow that sends a notification email to the sales team and adds the deal information to a Google Sheet for tracking.

Properties

Name Meaning
Event The specific Agendor event that will trigger the webhook. Options include:
- Activity Created
- Organization Created
- Organization Updated
- Organization Deleted
- Deal Created
- Deal Updated
- Deal Deleted
- Deal Stage Updated
- Deal Won
- Deal Lost
- Person Created
- Person Updated
- Person Deleted
Debug Mode Boolean flag to enable or disable debug logging for webhook operations. Useful for troubleshooting.
Options Collection of optional settings:
- Webhook Description: Optional text description for the webhook.
- Timeout (seconds): Number specifying how long to wait for webhook requests before timing out (default 30 seconds).

Output

The node outputs JSON data representing the webhook payload received from Agendor. The structure includes:

  • event: The event type string (e.g., "on_deal_created").
  • data: The main payload object containing event-specific details. If no explicit data field exists, the entire webhook body is provided here.
  • timestamp: ISO 8601 timestamp string indicating when the webhook was received.
  • headers: An object containing key HTTP headers from the webhook request, including content-type, user-agent, and Agendor-specific headers like webhook ID and signature.
  • query: Any query parameters included in the webhook URL.

The node does not output binary data.

Example output JSON snippet:

{
  "event": "on_deal_created",
  "data": { /* event-specific data */ },
  "timestamp": "2024-06-01T12:00:00.000Z",
  "headers": {
    "content-type": "application/json",
    "user-agent": "AgendorWebhook/1.0",
    "x-agendor-webhook-id": "abc123",
    "x-agendor-signature": "signaturevalue"
  },
  "query": {}
}

Dependencies

  • Requires an API authentication token credential for Agendor to manage webhook subscriptions.
  • The node uses Agendor's REST API endpoints to create, check, and delete webhook subscriptions.
  • n8n must be accessible externally via a public URL so Agendor can send webhook requests.
  • No additional external libraries beyond those bundled with n8n are required.

Troubleshooting

  • Webhook URL Invalid or Inaccessible: Ensure the webhook URL generated by n8n is publicly reachable. If running n8n locally, use tunneling services or deploy on a public server.
  • API Authentication Failure: Verify the API token credential is valid and has permissions to manage webhooks.
  • Webhook Already Exists Error: This occurs if the same webhook URL and event combination is already registered in Agendor. Consider deleting existing webhook subscriptions or using a unique URL.
  • Timeouts: Adjust the timeout option if webhook requests take longer than expected.
  • Permission Errors (403): Check that the API token has sufficient rights to create and manage webhook subscriptions.
  • Debug Mode: Enable debug mode to get detailed console logs during webhook creation and checking processes, which helps identify issues.

Common error messages include:

  • "Invalid webhook URL" — fix by ensuring the URL is correct and accessible.
  • "Invalid event" — select a valid event from the options.
  • "API authentication failed" — verify API token correctness.
  • HTTP 400 Bad Request — often caused by invalid parameters or duplicate webhook registrations.
  • HTTP 401 Unauthorized — indicates authentication problems.
  • HTTP 403 Forbidden — permission issues with the API token.

Links and References

Discussion