Add document webhook events

Add a resource-oriented set of webhook events for the document
lifecycle. Each event carries the document plus only the sub-resource
it concerns (version, signature or approval).

Events:
- document.created / updated / archived / unarchived / deleted
- document.version.created / updated / published / rejected / deleted
- document.version.signature.requested / signed / cancelled
- document.version.approval.requested / approved / rejected / voided

Wires the new types through the migration, Go enum, GraphQL schema,
CLI, n8n nodes and the console webhooks settings UI.

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
Sacha Al Himdani
2026-06-29 20:42:50 +02:00
parent 4cdf8b7913
commit 1df4af4556
11 changed files with 944 additions and 91 deletions

View File

@@ -15,6 +15,24 @@
import type { INodePropertyOptions } from 'n8n-workflow';
export const WEBHOOK_EVENT_OPTIONS: INodePropertyOptions[] = [
{ name: 'Document Archived', value: 'DOCUMENT_ARCHIVED' },
{ name: 'Document Created', value: 'DOCUMENT_CREATED' },
{ name: 'Document Deleted', value: 'DOCUMENT_DELETED' },
{ name: 'Document Unarchived', value: 'DOCUMENT_UNARCHIVED' },
{ name: 'Document Updated', value: 'DOCUMENT_UPDATED' },
{ name: 'Document Version Approval Quorum Approved', value: 'DOCUMENT_VERSION_APPROVAL_QUORUM_APPROVED' },
{ name: 'Document Version Approval Quorum Rejected', value: 'DOCUMENT_VERSION_APPROVAL_QUORUM_REJECTED' },
{ name: 'Document Version Approval Quorum Requested', value: 'DOCUMENT_VERSION_APPROVAL_QUORUM_REQUESTED' },
{ name: 'Document Version Approval Quorum Updated', value: 'DOCUMENT_VERSION_APPROVAL_QUORUM_UPDATED' },
{ name: 'Document Version Approval Quorum Voided', value: 'DOCUMENT_VERSION_APPROVAL_QUORUM_VOIDED' },
{ name: 'Document Version Created', value: 'DOCUMENT_VERSION_CREATED' },
{ name: 'Document Version Deleted', value: 'DOCUMENT_VERSION_DELETED' },
{ name: 'Document Version Published', value: 'DOCUMENT_VERSION_PUBLISHED' },
{ name: 'Document Version Rejected', value: 'DOCUMENT_VERSION_REJECTED' },
{ name: 'Document Version Signature Cancelled', value: 'DOCUMENT_VERSION_SIGNATURE_CANCELLED' },
{ name: 'Document Version Signature Requested', value: 'DOCUMENT_VERSION_SIGNATURE_REQUESTED' },
{ name: 'Document Version Signature Signed', value: 'DOCUMENT_VERSION_SIGNATURE_SIGNED' },
{ name: 'Document Version Updated', value: 'DOCUMENT_VERSION_UPDATED' },
{ name: 'Obligation Created', value: 'OBLIGATION_CREATED' },
{ name: 'Obligation Deleted', value: 'OBLIGATION_DELETED' },
{ name: 'Obligation Updated', value: 'OBLIGATION_UPDATED' },