Webhooks

Ergon receives and processes webhook events from external providers and routes them to configured triggers.

Overview

Webhooks are primarily used by the Channels service to receive inbound messages and delivery-lifecycle callbacks from the email provider. When a webhook is received, Ergon records the activity and emits a platform event (such as channels.email.received) that the central Automations service can react to.

Webhook endpoints are called by external providers, not by your application. You define what happens when an event arrives by creating rules in the Automations service.

Event Type Catalog

Every action across the platform emits a structured event. These events power the Event Streams API, real-time WebSocket feeds, and internal processing pipelines. Browse the complete event and automation-trigger catalog for every payload shape and compatible predicate, or download the machine-readable JSON. The table below highlights common event types.

IAM

Event TypeDescription
iam.company.createdA new organization was created
iam.member.invitedA member was invited to an organization
iam.member.joinedA member accepted an invitation
iam.member.removedA member was removed from an organization
iam.role.createdA custom role was created
iam.role.updatedA role was updated
iam.role.deletedA role was deleted
iam.role.assignedA role was assigned to a principal
iam.role.unassignedA role was unassigned from a principal
iam.permission.grantedA permission grant was created
iam.permission.revokedA permission grant was revoked
iam.api_key.createdAn API key was created
iam.api_key.updatedAn API key was updated
iam.api_key.deletedAn API key was deleted
iam.agent.createdA service agent was created
iam.agent.updatedA service agent was updated
iam.agent.deletedA service agent was deleted
iam.agent.access_grantedAccess was granted to a service agent
iam.agent.access_revokedAccess was revoked from a service agent
iam.company_service.enabledA service was enabled for an organization
iam.company_service.disabledA service was disabled for an organization
iam.service_access.grantedService access was granted to a principal
iam.service_access.revokedService access was revoked
iam.grant.deletedAn org-level grant was deleted
iam.connection_request.createdA connection request was raised
iam.connection_request.approvedA connection request was approved
iam.connection_request.rejectedA connection request was rejected
iam.connection_request.withdrawnA connection request was withdrawn

Workflows

Event TypeDescription
workflows.workflow.createdA workflow was created
workflows.workflow.updatedA workflow was updated
workflows.workflow.deletedA workflow was deleted
workflows.phase.createdA phase was created
workflows.phase.updatedA phase was updated
workflows.phase.deletedA phase was deleted
workflows.phase.reorderedPhases were reordered
workflows.field.createdA field was created
workflows.field.updatedA field was updated
workflows.field.deletedA field was deleted
workflows.items.createdAn item was created
workflows.items.updatedAn item was updated
workflows.items.routedAn item was routed to another phase
workflows.items.deletedAn item was deleted
workflows.items.claimedAn item was claimed by a user
workflows.items.assignedAn item was assigned
workflows.items.group_assignedAn item was assigned to a group
workflows.items.releasedAn item was released from assignment
workflows.items.auto_assignedAn item was auto-assigned
workflows.items.auto_releasedAn item was auto-released after timeout
workflows.items.timeoutAn item timed out
workflows.items.routing_failedRouting an item failed
workflows.items.visibility_restoredItem visibility was restored
workflows.items.field.updatedAn item field value was updated
workflows.items.comment.addedA comment was added to an item
workflows.items.comment.deletedA comment was deleted
workflows.items.attachment.uploadedAn attachment was uploaded
workflows.items.attachment.deletedAn attachment was removed
workflows.items.form.submittedA form submission was received
workflows.route.createdA phase route was created
workflows.route.updatedA phase route was updated
workflows.route.deletedA phase route was deleted
workflows.access.grant.createdWorkflow access was granted
workflows.access.grant.deletedWorkflow access was revoked

Channels

Event TypeDescription
channels.message.dispatchedAn outbound email was sent
channels.email.receivedAn inbound email was received
channels.email.deliveredAn email was delivered
channels.email.bouncedAn email bounced
channels.email.failedEmail delivery failed
channels.email.complainedA spam complaint was received
channels.email.delivery_delayedEmail delivery was delayed
channels.email.openedAn email was opened
channels.email.clickedA link in an email was clicked

Agent Hub & Conversations

Event TypeDescription
conversations.conversation.createdA conversation was created
conversations.message.addedA message was added to a conversation
conversations.message.sentA message was sent in a conversation
agents.message.sentAn assistant response was sent
agents.run.startedAn agent run started (carries run_id)
agents.run.completedAn agent run completed (resolves agent_run wait key)
agents.run.failedAn agent run raised before producing a final reply
agents.tool.executedA tool was executed during a run

Worksheets

Event TypeDescription
worksheets.folder.createdA folder was created
worksheets.folder.updatedA folder was updated
worksheets.folder.deletedA folder was deleted
worksheets.worksheet.createdA worksheet was created
worksheets.worksheet.updatedA worksheet was updated
worksheets.worksheet.deletedA worksheet was deleted
worksheets.column.createdA column was created
worksheets.column.updatedA column was updated
worksheets.column.deletedA column was deleted
worksheets.column.formula_changedA column formula was updated
worksheets.rows.createdA row was created
worksheets.rows.updatedA row was updated
worksheets.rows.deletedA row was deleted
worksheets.rows.bulk_createdRows were created in bulk
worksheets.rows.bulk_updatedRows were updated in bulk
worksheets.rows.bulk_deletedRows were deleted in bulk
worksheets.rows.attachment.uploadedA row attachment was uploaded
worksheets.rows.attachment.deletedA row attachment was removed
worksheets.access.grant.createdWorksheet access was granted
worksheets.access.grant.deletedWorksheet access was revoked

Buckets

Event TypeDescription
buckets.bucket.createdA bucket was created
buckets.bucket.updatedA bucket was updated
buckets.bucket.deletedA bucket was deleted
buckets.folder.createdA folder was created
buckets.folder.updatedA folder was updated
buckets.folder.deletedA folder was deleted
buckets.files.ingestedA file was uploaded and ingested
buckets.files.updatedA file was updated
buckets.files.deletedA file was deleted
buckets.files.processFile processing was queued
buckets.files.processedFile processing completed
buckets.files.failedFile processing failed
buckets.access.grant.createdBucket access was granted
buckets.access.grant.deletedBucket access was revoked

Event Envelope

Every platform event follows a standard envelope structure. The payload field contains event-type-specific data.

{
  "id": "e1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "event_type": "workflows.items.created",
  "source": "workflows",
  "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
  "actor_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "actor_type": "member",
  "correlation_id": "f9e8d7c6-b5a4-3210-fedc-ba9876543210",
  "timestamp": "2026-04-14T10:30:00Z",
  "payload": {
    "workflow_id": "550e8400-e29b-41d4-a716-446655440000",
    "item_id": "660e8400-e29b-41d4-a716-446655440000",
    "phase_id": "770e8400-e29b-41d4-a716-446655440000",
    "title": "New customer request"
  }
}
FieldTypeDescription
idUUIDUnique event identifier
event_typestringEvent type slug from the catalog above
sourcestringService that emitted the event
company_idUUIDOrganization the event belongs to
actor_idUUID | nullPrincipal that triggered the event
actor_typestring | nullPrincipal type: member, api_key, agent, or service
correlation_idUUID | nullLinks related events into a trace
timestampISO 8601When the event occurred
payloadobjectEvent-type-specific data

Use the Event Streams API to browse events, query aggregated metrics, and explore correlated traces. Real-time streaming is available via WebSocket.

Email Inbound Webhook

The email inbound webhook receives events from Resend when emails arrive at configured addresses. The webhook URL is registered automatically when you create a channel config and verify the domain.

PropertyValue
EndpointPOST /api/v1/channels/webhooks/email
ProviderResend
AuthenticationWebhook signature verification (automatic)
Content-Typeapplication/json

Example inbound email payload from Resend:

{
  "type": "email.received",
  "data": {
    "from": "[email protected]",
    "to": ["[email protected]"],
    "subject": "Help with my order",
    "text": "I need help with order #12345...",
    "html": "<p>I need help with order #12345...</p>",
    "headers": {
      "message-id": "<[email protected]>",
      "in-reply-to": "<[email protected]>"
    }
  }
}

Trigger Actions

Reacting to inbound events is handled by the central Automations service rather than by the webhook endpoint itself. You author rules that match a trigger event (for example channels.email.received) and run one or more actions. Common actions include:

  • Invoke an AI agent with the received message as input.
  • Create or route a workflow item from the message.
  • Send an outbound email or an outbound webhook.

Because reactions live in Automations, loop protection and conditions are configured there too — see the Automations service for rule authoring, conditions, and recursion safeguards.

Security

Webhook endpoints implement the following security measures:

  • Provider signature verification (webhook signing)
  • Address matching — only emails to configured addresses are processed
  • Recursion safeguards in the Automations service to prevent runaway loops
  • Rate limiting on the webhook endpoint