From 45a8b40dfefe9f2686246179207f0e29d82c8c85 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 2 Sep 2026 08:28:41 +0200 Subject: [PATCH 1/7] Add n8n plugins to plugins list --- plugins/index.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/plugins/index.md b/plugins/index.md index 1e184671e3..721e8d55c0 100644 --- a/plugins/index.md +++ b/plugins/index.md @@ -533,3 +533,57 @@ Available for: [![Node.js](/logos/nodejs.svg){style="height:2.5em; display:inline; margin:0 0.2em;"}](https://github.com/cap-js/ai) [![Java](/logos/java.svg){style="height:3em; display:inline; margin:0 0.2em;"}](https://github.com/cap-java/cds-ai) + +## n8n + +The n8n plugin enables triggering [n8n](https://n8n.io) workflow automation from CAP applications. Workflows can be triggered declaratively via annotations or programmatically through the n8n service. + +Annotations: + +```cds +annotate AdminService.Books with @n8n.process.start: { + on: 'CREATE', + path: 'book-created' +}; +``` + +Programmatically in Node.js: + +```js +this.after('CREATE', 'Books', async (books) => { + const n8n = await cds.connect.to('n8n') + for (const book of books) { + await n8n.trigger({ path: 'book-created', payload: { ID: book.ID} }) + } +}) +``` + +Programmatically in Java: + +```java +@Autowired +private N8nService n8nService; + +@After(event = CqnService.EVENT_CREATE, entity = "AdminService.Books") +public void afterCreateBook(List books) { + books.forEach(book -> { + Map payload = new HashMap<>(); + payload.put("ID", book.getId()); + n8nService.trigger("book-created", payload); + }); +} +``` + +Features: + +- Annotation-driven triggers on CREATE, UPDATE, DELETE, and custom events +- Programmatic API for direct workflow management +- Reliable delivery via CAP persistent outbox with retry logic +- Console mode for local development — no n8n instance needed +- BTP destinations and Cloud Foundry service bindings (Node.js) +- API key and webhook authentication (Basic, Header, Bearer) + +Available for: + +[![Node.js](/logos/nodejs.svg 'Link to the plugins repository.'){style="height:2.5em; display:inline; margin:0 0.2em;"}](https://github.com/cap-js/n8n#readme) +[![Java](/logos/java.svg 'Link to the plugins repository.'){style="height:3em; display:inline; margin:0 0.2em;"}](https://github.com/cap-java/cds-feature-n8n#readme) From ff893ef3c3163512f1d38a3d4c0470978d49c581 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 2 Sep 2026 16:34:54 +0200 Subject: [PATCH 2/7] Update plugins/index.md Co-authored-by: Stefan Rudi <54106627+stefanrudi@users.noreply.github.com> --- plugins/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/index.md b/plugins/index.md index 721e8d55c0..08dc9871c8 100644 --- a/plugins/index.md +++ b/plugins/index.md @@ -579,7 +579,7 @@ Features: - Annotation-driven triggers on CREATE, UPDATE, DELETE, and custom events - Programmatic API for direct workflow management - Reliable delivery via CAP persistent outbox with retry logic -- Console mode for local development — no n8n instance needed +- Console mode for local development - BTP destinations and Cloud Foundry service bindings (Node.js) - API key and webhook authentication (Basic, Header, Bearer) From 1f6c8ec668d108605063c2e1a64316b8d4d2fc8d Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 2 Sep 2026 16:35:41 +0200 Subject: [PATCH 3/7] Update plugins/index.md Co-authored-by: Maximilian Eckert --- plugins/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/index.md b/plugins/index.md index 08dc9871c8..d64c82d240 100644 --- a/plugins/index.md +++ b/plugins/index.md @@ -536,7 +536,7 @@ Available for: ## n8n -The n8n plugin enables triggering [n8n](https://n8n.io) workflow automation from CAP applications. Workflows can be triggered declaratively via annotations or programmatically through the n8n service. +The n8n plugin enables [n8n](https://n8n.io) workflow triggering and automation from CAP applications. Workflows can be triggered declaratively via annotations or programmatically through the n8n service. Annotations: From 1b5358c376f10ba4e04e62c4465c21f50164fec5 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 2 Sep 2026 16:35:55 +0200 Subject: [PATCH 4/7] Update plugins/index.md Co-authored-by: Stefan Rudi <54106627+stefanrudi@users.noreply.github.com> --- plugins/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/index.md b/plugins/index.md index d64c82d240..9f5c7e7d9a 100644 --- a/plugins/index.md +++ b/plugins/index.md @@ -580,7 +580,6 @@ Features: - Programmatic API for direct workflow management - Reliable delivery via CAP persistent outbox with retry logic - Console mode for local development -- BTP destinations and Cloud Foundry service bindings (Node.js) - API key and webhook authentication (Basic, Header, Bearer) Available for: From f242733fe50eb5be3784004d56a4b907e073fa5e Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 2 Sep 2026 16:38:14 +0200 Subject: [PATCH 5/7] Add READ and Fiori events --- plugins/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/index.md b/plugins/index.md index 9f5c7e7d9a..424a37eb88 100644 --- a/plugins/index.md +++ b/plugins/index.md @@ -576,7 +576,7 @@ public void afterCreateBook(List books) { Features: -- Annotation-driven triggers on CREATE, UPDATE, DELETE, and custom events +- Annotation-driven triggers on CREATE, READ, UPDATE, DELETE, Fiori events and custom events - Programmatic API for direct workflow management - Reliable delivery via CAP persistent outbox with retry logic - Console mode for local development From ef152fd8a82fde9bf3c3340953d7e9b60cbfe2f6 Mon Sep 17 00:00:00 2001 From: Lisa Julia Nebel Date: Wed, 2 Sep 2026 16:40:15 +0200 Subject: [PATCH 6/7] Use code group for n8n Node.js and Java code --- plugins/index.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/index.md b/plugins/index.md index 424a37eb88..d04c680eb4 100644 --- a/plugins/index.md +++ b/plugins/index.md @@ -547,9 +547,11 @@ annotate AdminService.Books with @n8n.process.start: { }; ``` -Programmatically in Node.js: +Programmatically: -```js +::: code-group + +```js [Node.js] this.after('CREATE', 'Books', async (books) => { const n8n = await cds.connect.to('n8n') for (const book of books) { @@ -558,9 +560,7 @@ this.after('CREATE', 'Books', async (books) => { }) ``` -Programmatically in Java: - -```java +```java [Java] @Autowired private N8nService n8nService; @@ -574,6 +574,8 @@ public void afterCreateBook(List books) { } ``` +::: + Features: - Annotation-driven triggers on CREATE, READ, UPDATE, DELETE, Fiori events and custom events From a9a783cdd92fc8ac9c5c36a87546fc9c02672c19 Mon Sep 17 00:00:00 2001 From: Stefan Rudi Date: Wed, 2 Sep 2026 17:16:46 +0200 Subject: [PATCH 7/7] docs: add n8n to plugin menu --- plugins/_menu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/_menu.md b/plugins/_menu.md index bba0f5a24b..aa62b99084 100644 --- a/plugins/_menu.md +++ b/plugins/_menu.md @@ -17,3 +17,4 @@ # [Process Automation](index#sap-build-process-automation) # [Data Inspector](index#data-inspector) # [AI](index#ai) +# [n8n](index#n8n)