Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
Find a file
Iván Ovejero c857e42677
feat(core): Coordinate workflow activation in multiple main scenario in internal API (#7566)
Story: https://linear.app/n8n/issue/PAY-926

This PR coordinates workflow activation on instance startup and on
leadership change in multiple main scenario in the internal API. Part 3
on manual workflow activation and deactivation will be a separate PR.

### Part 1: Instance startup

In multi-main scenario, on starting an instance...
- [x] If the instance is the leader, it should add webhooks, triggers
and pollers.
- [x] If the instance is the follower, it should not add webhooks,
triggers or pollers.
- [x] Unit tests.

### Part 2: Leadership change 

In multi-main scenario, if the main instance leader dies…

- [x] The new main instance leader must activate all trigger- and
poller-based workflows, excluding webhook-based workflows.
- [x] The old main instance leader must deactivate all trigger- and
poller-based workflows, excluding webhook-based workflows.
- [x] Unit tests.

To test, start two instances and check behavior on startup and
leadership change:

```
EXECUTIONS_MODE=queue N8N_LEADER_SELECTION_ENABLED=true N8N_LICENSE_TENANT_ID=... N8N_LICENSE_ACTIVATION_KEY=... N8N_LOG_LEVEL=debug npm run start

EXECUTIONS_MODE=queue N8N_LEADER_SELECTION_ENABLED=true N8N_LICENSE_TENANT_ID=... N8N_LICENSE_ACTIVATION_KEY=... N8N_LOG_LEVEL=debug N8N_PORT=5679 npm run start
```
2023-11-07 13:48:48 +01:00
.github refactor: Change to pnpm 8.9 (no-changelog) 2023-11-02 13:17:23 +01:00
.vscode ci: Fix prettier auto-formatting (no-changelog) (#7063) 2023-09-01 13:29:31 +02:00
assets fix: Update app screenshot in README to match latest design (no-changelog) (#5314) 2023-02-01 16:50:52 +01:00
cypress fix(editor): Reset canvas zoom before workspace reset in node view (#7625) 2023-11-06 18:15:49 +01:00
docker docs: Mention UID in the docker examples (#7281) 2023-10-13 11:56:43 +01:00
packages feat(core): Coordinate workflow activation in multiple main scenario in internal API (#7566) 2023-11-07 13:48:48 +01:00
patches fix(core): Setup websocket keep-live messages (#6866) 2023-08-28 10:26:27 +02:00
scripts feat(editor): Handle pin data edge cases and unify validation (no-changelog) (#6685) 2023-11-02 10:43:02 +02:00
.dockerignore refactor(core): Refactor nodes loading (no-changelog) (#7283) 2023-10-09 16:09:23 +02:00
.editorconfig ci: Ensure that eslint runs on all frontend code (no-changelog) (#4602) 2022-11-15 18:20:54 +01:00
.git-blame-ignore-revs refactor: Add lintfix run to ignore revs (no-changelog) (#7540) 2023-10-27 14:58:49 +02:00
.gitattributes fix: Add .gitattributes to preserve line endings (no-changelog) (#6442) 2023-06-15 14:31:35 +01:00
.gitignore ci: Fix oclif manifest generation 2023-10-25 14:51:10 +02:00
.npmignore refactor: Phase out TSLint in editor-ui (no-changelog) (#4935) 2022-12-15 14:06:00 +01:00
.npmrc feat: Switch from npm to pnpm (#4429) 2022-11-09 17:32:05 +01:00
.prettierignore feat(n8n Form Trigger Node): New node (#7130) 2023-10-17 07:09:30 +03:00
.prettierrc.js 🎨 Set up linting and formatting (#2120) 2021-08-29 20:58:11 +02:00
CHANGELOG.md 🚀 Release 1.15.1 (#7592) 2023-11-02 14:52:11 +01:00
CODE_OF_CONDUCT.md refactor: Format root-level files (#3858) 2022-08-19 15:34:02 +02:00
CONTRIBUTING.md refactor: Change to pnpm 8.9 (no-changelog) 2023-11-02 13:17:23 +01:00
CONTRIBUTOR_LICENSE_AGREEMENT.md refactor: Format root-level files (#3858) 2022-08-19 15:34:02 +02:00
cypress.config.js feat(editor): Handle pin data edge cases and unify validation (no-changelog) (#6685) 2023-11-02 10:43:02 +02:00
jest.config.js ci: Refactor DB tests (no-changelog) (#7292) 2023-09-28 16:53:05 +02:00
LICENSE.md docs: scope Sustainable Use License to contents of the main branch (#4450) 2022-10-26 16:50:33 +02:00
LICENSE_EE.md docs(license): Introduce n8n Enterprise License (#3945) 2022-08-29 22:08:42 +02:00
package.json 🚀 Release 1.15.1 (#7592) 2023-11-02 14:52:11 +01:00
pnpm-lock.yaml feat(core): Rate limit forgot password endpoint (#7604) 2023-11-03 13:44:12 -04:00
pnpm-workspace.yaml feat(core): Replace client-oauth2 with an in-repo package (#6266) 2023-05-17 16:40:53 +02:00
README.md docs: Add information about LangChain/AI to the README 2023-10-04 08:33:04 +02:00
SECURITY.md Add SECURITY.md file 2021-09-28 14:32:16 -05:00
tsconfig.backend.json ci: Fix typescript incremental builds (no-changelog) (#7275) 2023-09-29 13:26:06 +02:00
tsconfig.build.json ci: Fix typescript incremental builds (no-changelog) (#7275) 2023-09-29 13:26:06 +02:00
tsconfig.json refactor: Consolidate tsconfig and eslintrc files (no-changelog) (#6816) 2023-08-01 17:32:43 +02:00
turbo.json feat(Loop Over Items (Split in Batches) Node): Automatically add a loop + rename (#7228) 2023-10-06 15:31:18 +02:00

n8n.io - Workflow Automation

n8n - Workflow automation tool

n8n is an extendable workflow automation tool. With a fair-code distribution model, n8n will always have visible source code, be available to self-host, and allow you to add your own custom functions, logic and apps. n8n's node-based approach makes it highly versatile, enabling you to connect anything to everything.

n8n.io - Screenshot

Demo

📺 A short video (< 5 min) that goes over key concepts of creating workflows in n8n.

Available integrations

n8n has 200+ different nodes to automate workflows. The list can be found on: https://n8n.io/integrations

Documentation

The official n8n documentation can be found on our documentation website

Additional information and example workflows on the n8n.io website

The release notes can be found here and the list of breaking changes here.

Usage

Start

You can try n8n without installing it using npx. You must have Node.js installed. From the terminal, run:

npx n8n

This command will download everything that is needed to start n8n. You can then access n8n and start building workflows by opening http://localhost:5678.

n8n cloud

Sign-up for an n8n cloud account.

While n8n cloud and n8n are the same in terms of features, n8n cloud provides certain conveniences such as:

  • Not having to set up and maintain your n8n instance
  • Managed OAuth for authentication
  • Easily upgrading to the newer n8n versions

Build with LangChain and AI in n8n (beta)

With n8n's LangChain nodes you can build AI-powered functionality within your workflows. The LangChain nodes are configurable, meaning you can choose your preferred agent, LLM, memory, and so on. Alongside the LangChain nodes, you can connect any n8n node as normal: this means you can integrate your LangChain logic with other data sources and services.

Learn more in the documentation.

Support

If you have problems or questions go to our forum, we will then try to help you asap:

https://community.n8n.io

Jobs

If you are interested in working for n8n and so shape the future of the project check out our job posts

What does n8n mean and how do you pronounce it?

Short answer: It means "nodemation" and it is pronounced as n-eight-n.

Long answer: "I get that question quite often (more often than I expected) so I decided it is probably best to answer it here. While looking for a good name for the project with a free domain I realized very quickly that all the good ones I could think of were already taken. So, in the end, I chose nodemation. 'node-' in the sense that it uses a Node-View and that it uses Node.js and '-mation' for 'automation' which is what the project is supposed to help with. However, I did not like how long the name was and I could not imagine writing something that long every time in the CLI. That is when I then ended up on 'n8n'." - Jan Oberhauser, Founder and CEO, n8n.io

Development setup

Have you found a bug 🐛 ? Or maybe you have a nice feature to contribute ? The CONTRIBUTING guide will help you get your development environment ready in minutes.

License

n8n is fair-code distributed under the Sustainable Use License and the n8n Enterprise License.

Proprietary licenses are available for enterprise customers. Get in touch

Additional information about the license model can be found in the docs.