merge main

This commit is contained in:
Deborah Barnard 2024-04-22 08:44:10 +01:00
commit 32a019df1d
123 changed files with 2474 additions and 1433 deletions

View File

@ -46,7 +46,9 @@
{% endblock %}
{% block announce %}
There's currently an issue with emails from n8n. This affects workflow sharing. It should be resolved soon, and a workaround is available. Refer to <a href="https://community.n8n.io/t/n8n-sharing-and-inviting-users-performance-issues/44687/1" target="_blank">the forum thread</a> for details.
{% endblock %}
{% block container %}

View File

@ -0,0 +1,56 @@
<!--
Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<!-- Actions -->
{% if page.edit_url %}
<!-- Edit button -->
{% if "content.action.edit" in features %}
<a
href="{{ page.edit_url }}"
title="{{ lang.t('action.edit') }}"
class="md-content__button md-icon"
target="_blank"
>
{% set icon = config.theme.icon.edit or "material/file-edit-outline" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</a>
{% endif %}
<!-- View button -->
{% if "content.action.view" in features %}
{% if "/blob/" in page.edit_url %}
{% set part = "blob" %}
{% else %}
{% set part = "edit" %}
{% endif %}
<a
href="{{ page.edit_url | replace(part, 'raw') }}"
title="{{ lang.t('action.view') }}"
class="md-content__button md-icon"
target="_blank"
>
{% set icon = config.theme.icon.view or "material/file-eye-outline" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</a>
{% endif %}
{% endif %}

View File

@ -0,0 +1,8 @@
To pin data in a node:
1. Run the node to load data.
2. In the **OUTPUT** view, select **Pin data** <span class="inline-image">![Pin data icon](/_images/data/data-pinning/data-pinning-button.png){.off-glb}</span>. When data pinning is active, the button changes to show this <span class="inline-image">![Active pin data icon](/_images/data/data-pinning/data-pinning-button-active.png){.off-glb}</span>.
/// note | Nodes that output binary data
You can't pin data if the output data includes binary data.
///

View File

@ -2,7 +2,7 @@
2. Give the workflow a name, for example `Error Handler`.
3. Select **Save**.
4. In the workflow where you want to use this error workflow:
1. Select **Options** <span class="inline-image">![Options menu icon](/_images/common-icons/three-dot-options-menu.png)</span> > **Settings**.
1. Select **Options** <span class="inline-image">![Options menu icon](/_images/common-icons/three-dot-options-menu.png){.off-glb}</span> > **Settings**.
2. In **Error workflow**, select the workflow you just created. For example, if you used the name Error Handler, select **Error handler**.
3. Select **Save**.
Now, when this workflow errors, the related error workflow runs.

View File

@ -2,7 +2,7 @@
1. Create a new workflow.
1. **Optional**: configure which workflows can call the sub-workflow:
1. Select the **Options** <span class="inline-image">![Options menu](/_images/common-icons/three-dot-options-menu.png)</span> menu > **Settings**. n8n opens the **Workflow settings** modal.
1. Select the **Options** <span class="inline-image">![Options menu](/_images/common-icons/three-dot-options-menu.png){.off-glb}</span> menu > **Settings**. n8n opens the **Workflow settings** modal.
1. Change the **This workflow can be called by** setting. Refer to [Workflow settings](/workflows/settings/) for more information on configuring your workflows.
1. Add the **Execute Workflow Trigger** node.
1. Add other nodes as needed to build your sub-workflow functionality.

View File

@ -2,5 +2,5 @@
The node relies on the timezone setting. n8n uses either:
1. The workflow timezone, if set. Refer to [Workflow settings](/workflows/settings/) for more information.
2. The n8n instance timezone, if the workflow timezone isn't set. The default is `America/New York` for self-hosted instances. n8n Cloud tries to detect the instance owner's timezone when they sign up, falling back to GMT as the default. Self-hosted users can change the instance setting using [Environment variables](/hosting/configuration/environment-variables/#timezone-and-localization). Cloud admins can change the instance timezone in the [Admin dashboard](/manage-cloud/set-cloud-timezone/).
2. The n8n instance timezone, if the workflow timezone isn't set. The default is `America/New York` for self-hosted instances. n8n Cloud tries to detect the instance owner's timezone when they sign up, falling back to GMT as the default. Self-hosted users can change the instance setting using [Environment variables](/hosting/configuration/environment-variables/timezone-localization). Cloud admins can change the instance timezone in the [Admin dashboard](/manage-cloud/set-cloud-timezone/).
///

View File

@ -4,5 +4,5 @@ When you add a node to a workflow, n8n displays a list of available operations.
There are two types of operation:
* Triggers start a workflow in response to specific events or conditions in your services. When you select a Trigger, n8n adds a trigger node to your workflow, with the Trigger operation you chose pre-selected. When you search for a node in n8n, Trigger operations have a bolt icon <span class="inline-image">![Trigger icon](/_images/common-icons/trigger.png)</span>.
* Triggers start a workflow in response to specific events or conditions in your services. When you select a Trigger, n8n adds a trigger node to your workflow, with the Trigger operation you chose pre-selected. When you search for a node in n8n, Trigger operations have a bolt icon <span class="inline-image">![Trigger icon](/_images/common-icons/trigger.png){.off-glb}</span>.
* Actions are operations that represent specific tasks or actions within a workflow, allowing you to manipulate data, perform operations on external systems, and trigger events in other systems as part of your workflows. When you select an Action, n8n adds a node to your workflow, with the Action operation you chose pre-selected.

View File

@ -1,43 +0,0 @@
/_snippets/node-icon-square/core-nodes/compression.html
/_snippets/node-icon-square/core-nodes/cron.html
/_snippets/node-icon-square/core-nodes/crypto.html
/_snippets/node-icon-square/core-nodes/date-and-time.html
/_snippets/node-icon-square/core-nodes/edit-image.html
/_snippets/node-icon-square/core-nodes/error-trigger.html
/_snippets/node-icon-square/core-nodes/execute-command.html
/_snippets/node-icon-square/core-nodes/execute-workflow.html
/_snippets/node-icon-square/core-nodes/function-item.html
/_snippets/node-icon-square/core-nodes/function.html
/_snippets/node-icon-square/core-nodes/git.html
/_snippets/node-icon-square/core-nodes/html-extract.html
/_snippets/node-icon-square/core-nodes/http-request.html
/_snippets/node-icon-square/core-nodes/icalendar.html
/_snippets/node-icon-square/core-nodes/if.html
/_snippets/node-icon-square/core-nodes/imap-email.html
/_snippets/node-icon-square/core-nodes/interval.html
/_snippets/node-icon-square/core-nodes/item-lists.html
/_snippets/node-icon-square/core-nodes/local-file-trigger.html
/_snippets/node-icon-square/core-nodes/merge.html
/_snippets/node-icon-square/core-nodes/move-binary-data.html
/_snippets/node-icon-square/core-nodes/n8n-trigger.html
/_snippets/node-icon-square/core-nodes/no-operation-do-nothing.html
/_snippets/node-icon-square/core-nodes/read-binary-file.html
/_snippets/node-icon-square/core-nodes/read-binary-files.html
/_snippets/node-icon-square/core-nodes/read-pdf.html
/_snippets/node-icon-square/core-nodes/rename-keys.html
/_snippets/node-icon-square/core-nodes/respond-to-webhook.html
/_snippets/node-icon-square/core-nodes/rss-read.html
/_snippets/node-icon-square/core-nodes/send-email.html
/_snippets/node-icon-square/core-nodes/set.html
/_snippets/node-icon-square/core-nodes/split-in-batches.html
/_snippets/node-icon-square/core-nodes/spreadsheet-file.html
/_snippets/node-icon-square/core-nodes/sse-trigger.html
/_snippets/node-icon-square/core-nodes/ssh.html
/_snippets/node-icon-square/core-nodes/start.html
/_snippets/node-icon-square/core-nodes/stop-and-error.html
/_snippets/node-icon-square/core-nodes/switch.html
/_snippets/node-icon-square/core-nodes/wait.html
/_snippets/node-icon-square/core-nodes/webhook.html
/_snippets/node-icon-square/core-nodes/workflow-trigger.html
/_snippets/node-icon-square/core-nodes/write-binary-file.html
/_snippets/node-icon-square/core-nodes/xml.html

View File

@ -0,0 +1,3 @@
/// note | File-based configuration
You can add `_FILE` to individual variables to provide their configuration in a separate file. Refer to [Keeping sensitive data in separate files](/hosting/configuration/configuration-methods/#keeping-sensitive-data-in-separate-files) for more details.
///

View File

@ -1,6 +1,6 @@
/// note | Latest and Next versions
n8n releases a new minor version most weeks. The `latest` version is for production use. `next` is the most recent release. You should treat `next` as a beta: it may be unstable. To report issues, use the [forum](https://community.n8n.io/c/questions/12){:target=_blank .external-link}.
Current `latest`: 1.34.2
Current `next`: 1.36.1
Current `latest`: 1.37.3
Current `next`: 1.38.1
///

View File

@ -1,6 +1,6 @@
To push work to Git:
1. Select **Push** <span class="inline-image">![Push icon](/_images/source-control-environments/push-icon.png)</span> in the main menu.
1. Select **Push** <span class="inline-image">![Push icon](/_images/source-control-environments/push-icon.png){.off-glb}</span> in the main menu.
--8<-- "_snippets/source-control/push-pull-menu-state.md"

View File

@ -20,4 +20,4 @@ To learn about the data structure, try out n8n's API endpoints:
[https://api.n8n.io/templates/workflows](https://api.n8n.io/templates/workflows){:target=_blank .external-link}
[https://api.n8n.io/health](https://api.n8n.io/health){:target=_blank .external-link}
You can also [contact us](mailto:support@n8n.io) for more support.
You can also [contact us](mailto:help@n8n.io) for more support.

@ -1 +1 @@
Subproject commit 9e8c3d99dadb89624b67c0f9f28389d14dd7cbdd
Subproject commit eb9419a059dba91a71097c038f1a4028cbcaf1a9

View File

@ -0,0 +1,54 @@
# Feature tests
Use this section to quickly check all docs site features are working when upgrading the theme.
For theme upgrade instructions, refer to Notion.
## Snippets
You should see an info box about the embed license:
--8<-- "_snippets/embed-license.md"
## Admonitions
/// note | This is a note
This is some note contents.
///
/// info | This is an info box
This is some info contents.
///
/// warning | This is a warning
This is some warning contents.
///
??? Details "This is an expanding details box"
This is some expanding details contents.
## Images
### Inline images
Inline images like this should **not** expand on click: <span class="inline-image">![Add node icon](/_images/try-it-out/add-node-small.png){.off-glb}</span>
If it expands on click, first check that the `off-glb` class has been applied. Refer to [MkDocs GLightbox | Disable by image](https://blueswen.github.io/mkdocs-glightbox/disable/image/){:target=_blank .external-link} for more information.
### Other images
Other images like this should expand on click:
![Screenshot of completed quickstart workflow](/_images/try-it-out/quickstart/very-quick-quickstart-workflow.png)
## Links
[This link should open in a new tab](https://example.com/){:target=_blank .external-link}
[This link should open in the same tab](/try-it-out/quickstart/)
## Instant previews
[This link should show a preview of the quickstart on hover](/try-it-out/quickstart/){ data-preview }
[This link should NOT show a preview on hover](/try-it-out/quickstart/)

View File

@ -20,7 +20,7 @@
--color-text-base: #58585F;
--color-text-dark: #555555;
--color-background-base: #f2f4f8;
--color-background-dark: #101330;
--color-background-dark: #40425E;
--color-background-darker: hsl( 240, 4.2%, 14% );
--color-background-light: #f2f4f8;
--color-foreground-base: #dbdfe7;
@ -175,6 +175,15 @@
.md-typeset table:not([class]) {
font-size: 0.75rem
}
/* display tables at full width */
.md-typeset__table {
width: 100%;
}
.md-typeset__table table:not([class]) {
display: table
}
/* img borders */
@ -192,6 +201,10 @@
border: 0;
}
.md-content__button > svg {
border: 0;
}
/* remove lightbox controls so users can't slideshow */
.gnext, .gprev {
display: none !important;
@ -233,7 +246,7 @@
}
.n8n-top-nav-list {
border-bottom: 1px solid hsl(170, 69%, 35%, 0.5);
border-bottom: 1px solid #707183;
}
/* ensure headings don't disappear below top nav after adding extra top nav */
@ -261,6 +274,8 @@
.md-feedback__inner {
width: 80%;
.md-header__source {
display:none;
}
/* dark mode */

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -1,10 +1,8 @@
## Using the example
To load the template into your n8n instance:
1. [Download the workflow JSON file](/_workflows/advanced-ai/examples/[[ page.meta.workflowFile ]]){:target=_blank .external-link}.
1. [Download the workflow JSON file](/_workflows/[[ page.meta.workflowFile ]]){:target=_blank .external-link}.
1. Open a new workflow in your n8n instance.
1. Copy in the JSON, or select **Workflow menu** <span class="inline-image">![Workflow menu icon](/_images/common-icons/three-dots-horizontal.png)</span> > **Import from file...**.
1. Copy in the JSON, or select **Workflow menu** <span class="inline-image">![Workflow menu icon](/_images/common-icons/three-dots-horizontal.png){.off-glb}</span> > **Import from file...**.
The example workflows use Sticky Notes to guide you:

View File

@ -1,3 +1,5 @@
/integrations/builtin/credentials/google/googlepalm/ /integrations/builtin/credentials/google/googleai/
/n8n-nodes-langchain.openaiassistant.md/ /n8n-nodes-langchain.openai/
/n8n-nodes-base.openai/ /n8n-nodes-langchain.openai/
/contributing/ /help-community/contributing/

View File

@ -0,0 +1,148 @@
{
"name": "Dynamic credentials using expressions",
"nodes": [
{
"parameters": {
"path": "da4071f2-7550-4dae-aa48-8bced4291643",
"formTitle": "Test dynamic credentials",
"formDescription": "This form is for testing an n8n workflow that demonstrates setting credentials with expressions.",
"formFields": {
"values": [
{
"fieldLabel": "Enter your NASA API key",
"requiredField": true
}
]
},
"responseMode": "responseNode"
},
"id": "cc6f2b1e-0ed0-4d22-8a44-d7223ba283b4",
"name": "n8n Form Trigger",
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2,
"position": [
560,
520
],
"webhookId": "da4071f2-7550-4dae-aa48-8bced4291643"
},
{
"parameters": {
"additionalFields": {}
},
"id": "ef336bae-3d4f-419c-ab5c-b9f0de89f170",
"name": "NASA",
"type": "n8n-nodes-base.nasa",
"typeVersion": 1,
"position": [
900,
520
],
"credentials": {
"nasaApi": {
"id": "QDDBOZOD6k3ijL5t",
"name": "NASA account"
}
}
},
{
"parameters": {
"respondWith": "redirect",
"redirectURL": "={{ $json.url }}",
"options": {}
},
"id": "143bcdb6-aca0-4dd8-9204-9777271cd230",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1220,
520
]
},
{
"parameters": {
"content": "This workflow shows how to set credentials dynamically using expressions.\n\n\nFirst, set up your NASA credential: \n\n1. Create a new NASA credential.\n1. Hover over **API Key**.\n1. Toggle **Expression** on.\n1. In the **API Key** field, enter `{{ $json[\"Enter your NASA API key\"] }}`.\n\n\nThen, test the workflow:\n\n1. Get an [API key from NASA](https://api.nasa.gov/)\n2. Select **Test workflow**\n3. Enter your key using the form.\n4. The workflow runs and sends you to the NASA picture of the day.\n\n\nFor more information on expressions, refer to [n8n documentation | Expressions](https://docs.n8n.io/code/expressions/).",
"height": 564,
"width": 322,
"color": 4
},
"id": "0a0dee23-fa16-4f09-b5e0-856f47fb53d0",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
120,
140
]
},
{
"parameters": {
"content": "User submits an API key using the form",
"height": 319
},
"id": "dd766e32-334d-4e46-9daa-7800b134a3a5",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
500,
380
]
},
{
"parameters": {
"content": "The workflow passes the key to the NASA node. You can reference the value using the expression `$json[\"Enter your NASA API key\"]`. This is also available to the node credential. ",
"height": 319,
"color": 5
},
"id": "3d8f02e6-e029-41dc-89ad-0f5cffe09348",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
820,
380
]
},
{
"parameters": {
"content": "The Respond to Webhook node controls the form response (in this example, redirecting the user to an image)",
"height": 319
},
"id": "096eb6ab-c276-4687-9dc0-50e16a8f709a",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
1140,
380
]
}
],
"pinData": {},
"connections": {
"n8n Form Trigger": {
"main": [
[
{
"node": "NASA",
"type": "main",
"index": 0
}
]
]
},
"NASA": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@ -2,7 +2,7 @@
contentType: overview
title: Call an API to fetch data
description: Use the n8n workflow tool to load data from an API using the HTTP Request node into your AI workflow.
workflowFile: let_your_ai_call_an_api.json
workflowFile: advanced-ai/examples/let_your_ai_call_an_api.json
---
# Call an API to fetch data
@ -11,7 +11,7 @@ Use n8n to bring data from any API to your AI. This workflow uses the [Chat Trig
<figure markdown>
!["Screenshot of the two workflows in this example"](/_images/advanced-ai/examples/call-api-from-chat.png)
<figcaption markdown>[Download the example workflow](/_workflows/advanced-ai/examples/[[ page.meta.workflowFile ]])</figcaption>
<figcaption markdown>[Download the example workflow](/_workflows/[[ page.meta.workflowFile ]])</figcaption>
</figure>
## Key features
@ -23,4 +23,6 @@ This workflow uses:
* [Custom n8n Workflow Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/): plug in n8n workflows as custom tools. In AI, a tool is an interface the AI can use to interact with the world (in this case, the data provided by your workflow). It allows the AI model to access information beyond its built-in dataset.
* A [Basic LLM Chain](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/) with an [Auto-fixing Output Parser](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.outputparserautofixing/) and [Structured Output Parser](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.outputparserstructured/) to read the user's query and set parameters for the API call based on the user input.
[[% include "_includes/advanced-ai/examples-color-key.html" %]]
## Using the example
[[% include "_includes/examples-color-key.html" %]]

View File

@ -2,7 +2,7 @@
contentType: howto
title: Chat with a Google Sheet using AI
description: Use the n8n workflow tool to load data from Google Sheets into your AI workflow.
workflowFile: chat_with_google_sheets_docs_version.json
workflowFile: advanced-ai/examples/chat_with_google_sheets_docs_version.json
---
# Chat with a Google Sheet using AI
@ -11,7 +11,7 @@ Use n8n to bring your own data to AI. This workflow uses the [Chat Trigger](/int
<figure markdown>
!["Screenshot of the two workflows in this example"](/_images/advanced-ai/examples/chat-with-google-sheets.png)
<figcaption markdown>[Download the example workflow](/_workflows/advanced-ai/examples/[[ page.meta.workflowFile ]])</figcaption>
<figcaption markdown>[Download the example workflow](/_workflows/[[ page.meta.workflowFile ]])</figcaption>
</figure>
## Key features
@ -22,4 +22,7 @@ This workflow uses:
* [Agent](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/): the key piece of the AI workflow. The Agent interacts with other components of the workflow and makes decisions about what tools to use.
* [Custom n8n Workflow Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/): plug in n8n workflows as custom tools. In AI, a tool is an interface the AI can use to interact with the world (in this case, the data provided by your workflow). It allows the AI model to access information beyond its built-in dataset.
[[% include "_includes/advanced-ai/examples-color-key.html" %]]
## Using the example
[[% include "_includes/examples-color-key.html" %]]

View File

@ -2,7 +2,7 @@
contentType: overview
title: Set a human fallback for AI workflows
description: Have a workflow that triggers a human answer when the AI can't help.
workflowFile: ask_a_human.json
workflowFile: advanced-ai/examples/ask_a_human.json
---
# Have a human fallback for AI workflows
@ -13,7 +13,7 @@ This workflow uses the [Chat Trigger](/integrations/builtin/core-nodes/n8n-nodes
<figure markdown>
!["Screenshot of the two workflows in this example"](/_images/advanced-ai/examples/ask-a-human.png)
<figcaption markdown>[Download the example workflow](/_workflows/advanced-ai/examples/[[ page.meta.workflowFile ]])</figcaption>
<figcaption markdown>[Download the example workflow](/_workflows/[[ page.meta.workflowFile ]])</figcaption>
</figure>
## Key features
@ -24,4 +24,6 @@ This workflow uses:
* [Agent](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/): the key piece of the AI workflow. The Agent interacts with other components of the workflow and makes decisions about what tools to use.
* [Custom n8n Workflow Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/): plug in n8n workflows as custom tools. In AI, a tool is an interface the AI can use to interact with the world (in this case, the data provided by your workflow). It allows the AI model to access information beyond its built-in dataset.
[[% include "_includes/advanced-ai/examples-color-key.html" %]]
## Using the example
[[% include "_includes/examples-color-key.html" %]]

View File

@ -43,7 +43,7 @@ An agent takes an input, such as a user query, then uses a collection of tools t
??? Details "Cluster nodes: root and sub-nodes"
--8<-- "_snippets/integrations/builtin/cluster-nodes/cluster-nodes-summary.md"
1. Select the **Add node** <span class="inline-image">![Add node icon](/_images/try-it-out/add-node-small.png)</span> connector. n8n opens the nodes panel.
1. Select the **Add node** <span class="inline-image">![Add node icon](/_images/try-it-out/add-node-small.png){.off-glb}</span> connector. n8n opens the nodes panel.
1. Search for **Agent**. n8n shows a list of nodes that match the search.
1. Select **AI Agent**. n8n adds the node to the canvas and opens it.
1. Close the node details view to return to the canvas.

View File

@ -0,0 +1,30 @@
---
contentType: howto
title: Use LangSmith with n8n
description: How to enable LangSmith for your self-hosted n8n instance.
---
# Use LangSmith with n8n
[LangSmith](https://www.langchain.com/langsmith){:target=_blank .external-link} is a developer platform created by the LangChain team. You can connect your n8n instance to LangSmith to record and monitor runs in n8n, just as you can in a LangChain application.
/// info | Feature availability
Self-hosted n8n only.
///
## Connect your n8n instance to LangSmith
1. [Log in to LangSmith](https://smith.langchain.com/settings){:target=_blank .external-link} and get your API key.
1. Set the LangSmith environment variables:
| Variable | Value |
| -------- | ----- |
| LANGCHAIN_ENDPOINT | `"https://api.smith.langchain.com"` |
| LANGCHAIN_TRACING_V2 | `true` |
| LANGCHAIN_API_KEY | Set this to your API key |
Set the variables so that they're available globally in the environment where you host your n8n instance. You can do this in the same way as the rest of your general configuration. These aren't n8n environment variables, so don't try to set them using the [n8n configuration file](/hosting/configuration/configuration-methods/#set-environment-variables-using-a-file).
1. Restart n8n.
For information on using LangSmith, refer to [LangSmith's documentation](https://docs.smith.langchain.com/){:target=_blank .external-link}.

View File

@ -56,6 +56,8 @@ Note that these variables can return different time formats when cast as a strin
# For example "Today's date is 1646834498755"
```
n8n provides built-in convenience functions to support data transformation in expressions for dates. Refer to [Data transformation functions | Dates](/code/builtin/data-transformation-functions/dates/) for more information.
## Date and time behavior in n8n
Be aware of the following:

View File

@ -34,7 +34,7 @@ To use an expression to set a parameter value:
1. Hover over the parameter where you want to use an expression.
2. Select **Expressions** in the **Fixed/Expression** toggle.
3. Write your expression in the parameter, or select **Open expression editor** <span class="inline-image">![Open expressions editor icon](/_images/common-icons/open-expression-editor.png)</span> to open the expressions editor. If you use the expressions editor, you can browse the available data in the **Variable selector**. All expressions have the format `{{ your expression here }}`.
3. Write your expression in the parameter, or select **Open expression editor** <span class="inline-image">![Open expressions editor icon](/_images/common-icons/open-expression-editor.png){.off-glb}</span> to open the expressions editor. If you use the expressions editor, you can browse the available data in the **Variable selector**. All expressions have the format `{{ your expression here }}`.
### Example: Get data from webhook body

View File

@ -6,6 +6,10 @@ contentType: overview
Welcome to the **n8n Course Level 1**!
/// warning | Issues with course sign-up
There's currently an issue with emails from n8n, including course sign-up. This should be resolved soon. Follow [the forum thread](https://community.n8n.io/t/n8n-sharing-and-inviting-users-performance-issues/44687/1){:target=_blank .external-link} for updates.
///
## Is this course right for me?
This course introduces you to the fundamental concepts within n8n and develops your low-code automation expertise.

View File

@ -10,7 +10,7 @@ To accomplish this task, you have to create an Error workflow that monitors the
2. To the Error Trigger node, connect a Discord node and configure the fields:<br/>
* Webhook URL: The URL that you received in the email from n8n when you signed up for this course.
* Text: The workflow `{workflow name}` failed, with the error message: `{execution error message}`. Last node executed: `{name of the last executed node}`. Check this workflow execution here: `{execution URL}`.
* Text: The workflow `{workflow name}` failed, with the error message: `{execution error message}`. Last node executed: `{name of the last executed node}`. Check this workflow execution here: `{execution URL}` My Unique ID: `{your ID from the course signup email}`
Note that you need to replace the text in curly brackets `{}` with expressions that take the respective information from the Error Trigger node.<br/>

View File

@ -6,6 +6,10 @@ contentType: overview
Welcome to the **n8n Course Level 2**!
/// warning | Issues with course sign-up
There's currently an issue with emails from n8n, including course sign-up. This should be resolved soon. Follow [the forum thread](https://community.n8n.io/t/n8n-sharing-and-inviting-users-performance-issues/44687/1){:target=_blank .external-link} for updates.
///
## Is this course right for me?
This course is for you if you:

View File

@ -1,6 +1,7 @@
---
description: Creating and editing credentials.
contentType: howto
workflowFile: credentials/dynamic_credentials_using_expressions.json
---
# Create and edit credentials
@ -17,3 +18,23 @@ When you save a credential, n8n tests it to confirm it works.
/// note | Credentials naming
n8n names new credentials "*node name* account" by default. You can rename the credentials by clicking on the name, similarly to renaming nodes. It's good practice to give them names that identify the app or service, type, and purpose of the credential. A naming convention makes it easier to keep track of and identify your credentials.
///
## Expressions in credentials
You can use expressions to set credentials dynamically as your workflow runs:
1. In your workflow, find the data path containing the credential. This varies depending on the exact parameter names in your data. Make sure that the data containing the credential is available in the workflow when you get to the node that needs it.
1. When creating your credential, hover over the field where you want to use an expression.
1. Toggle **Expression** on.
1. Enter your expression.
### Example workflow
<figure markdown>
!["Screenshot of the two workflows in this example"](/_images/credentials/dynamic-creds-example-workflow.png)
<figcaption markdown>[Download the example workflow](/_workflows/[[ page.meta.workflowFile ]])</figcaption>
</figure>
#### Using the example
[[% include "_includes/examples-color-key.html" %]]

View File

@ -30,5 +30,5 @@ To unshare a credential:
1. Open the left menu and select **Credentials**. n8n shows a list of your credentials.
2. Select the credential you want to share. n8n opens the credential modal.
3. Select **Sharing**.
4. Select **Options** <span class="inline-image">![Options menu icon](/_images/common-icons/three-dot-options-menu.png)</span> on the user you want to remove.
4. Select **Options** <span class="inline-image">![Options menu icon](/_images/common-icons/three-dot-options-menu.png){.off-glb}</span> on the user you want to remove.
5. Select **Remove**.

View File

@ -48,8 +48,8 @@ You can use the [Code node](/code/code-node/) to manipulate binary data in your
## Configure binary data mode when self-hosting
You can configure how your self-hosted n8n instance handles binary data using the [Binary data environment variables](/hosting/configuration/environment-variables/#binary-data). This includes tasks such as setting the storage path and choosing how to store binary data.
You can configure how your self-hosted n8n instance handles binary data using the [Binary data environment variables](/hosting/configuration/environment-variables/binary-data). This includes tasks such as setting the storage path and choosing how to store binary data.
Your configuration affects how well n8n scales: [Scaling | Binary data filesystem mode](/hosting/scaling/binary-data/).
Reading and writing binary files can have security implications. If you want to disable reading and writing binary data, use the `NODES_EXCLUDE` environment variable. Refer to [Environment variables | Nodes](https://docs.n8n.io/hosting/configuration/environment-variables/#nodes) for more information.
Reading and writing binary files can have security implications. If you want to disable reading and writing binary data, use the `NODES_EXCLUDE` environment variable. Refer to [Environment variables | Nodes](/hosting/configuration/environment-variables/nodes/) for more information.

View File

@ -15,7 +15,7 @@ To edit output data:
1. Run the node to load data.
2. In the **OUTPUT** view, select **JSON** to switch to JSON view.
3. Select **Edit** <span class="inline-image">![Edit data icon](/_images/data/data-pinning/edit-data.png)</span>.
3. Select **Edit** <span class="inline-image">![Edit data icon](/_images/data/data-pinning/edit-data.png){.off-glb}</span>.
4. Edit your data.
5. Select **Save**. n8n saves your data changes and pins your data.
@ -26,14 +26,14 @@ You can copy data from nodes in previous workflow executions:
1. Open the left menu.
2. Select **Executions**.
3. Browse the workflow executions list to find the one with the data you want to copy.
4. Select **Open Past Execution** <span class="inline-image">![Open past execution icon](/_images/data/data-pinning/open-execution.png)</span>.
4. Select **Open Past Execution** <span class="inline-image">![Open past execution icon](/_images/data/data-pinning/open-execution.png){.off-glb}</span>.
5. Double click the node whose data you want to copy.
6. If it's table layout, select **JSON** to switch to JSON view.
7. There are two ways to copy the JSON:
1. Select the JSON you want by highlighting it, like selecting text. Then use `ctrl` + `c` to copy it.
2. Select the JSON you want to copy by clicking on a parameter. Then:
1. Hover over the JSON. n8n displays the **Copy** <span class="inline-image">![Copy data icon](/_images/data/data-pinning/copy-data.png)</span> button.
2. Select **Copy** <span class="inline-image">![Copy data icon](/_images/data/data-pinning/copy-data.png)</span>.
1. Hover over the JSON. n8n displays the **Copy** <span class="inline-image">![Copy data icon](/_images/data/data-pinning/copy-data.png){.off-glb}</span> button.
2. Select **Copy** <span class="inline-image">![Copy data icon](/_images/data/data-pinning/copy-data.png){.off-glb}</span>.
3. You can choose what to copy:
* **Copy Item Path** and **Copy Parameter Path** gives you expressions that access parts of the JSON.
* **Copy Value**: copies the entire selected JSON.
@ -45,6 +45,6 @@ You can copy data from nodes in previous workflow executions:
9. Open the node where you want to use the copied data.
10. If there is no data, run the node to load data.
11. In the **OUTPUT** view, select **JSON** to switch to JSON view.
12. Select **Edit** <span class="inline-image">![Edit data icon](/_images/data/data-pinning/edit-data.png)</span>.
12. Select **Edit** <span class="inline-image">![Edit data icon](/_images/data/data-pinning/edit-data.png){.off-glb}</span>.
15. Paste in the data from the previous execution.
16. Select **Save**. n8n saves your data changes and pins your data.

View File

@ -12,7 +12,7 @@ Search and filter data in the node **INPUT** and **OUTPUT** panels. Use this to
To search:
1. In a node, select **Search** <span class="inline-image">![Search icon](/_images/common-icons/search.png)</span> in the **INPUT** or **OUTPUT** panel.
1. In a node, select **Search** <span class="inline-image">![Search icon](/_images/common-icons/search.png){.off-glb}</span> in the **INPUT** or **OUTPUT** panel.
1. Enter your search term.
n8n filters as you type your search, displaying the objects or rows containing the term.

37
docs/data/data-mocking.md Normal file
View File

@ -0,0 +1,37 @@
---
title: Data mocking
description: Ways to mock data in your n8n workflow.
contentType: howto
---
# Data mocking
Data mocking is simulating or faking data. It's useful when developing a workflow. By mocking data, you can:
- Avoid making repeated calls to your data source. This saves time and costs.
- Work with a small, predictable dataset during initial development.
- Avoid the risk of overwriting live data: in the early stages of building your workflow, you don't need to connect your real data source.
## Mocking with real data using data pinning
Using [data pinning](/data/data-pinning/), you load real data into your workflow, then pin it in the output panel of a node. Using this approach you have realistic data, with only one call to your data source. You can [edit pinned data](/data/data-editing/).
Use this approach when you need to configure your workflow to handle the exact data structure and parameters provided by your data source.
--8<-- "_snippets/data/how-to-pin-data.md"
## Generate custom data using the Code or Edit Fields nodes
You can create a custom dataset in your workflow using either the [Code node](/integrations/builtin/core-nodes/n8n-nodes-base.code/) or the [Edit Fields (Set) node](/integrations/builtin/core-nodes/n8n-nodes-base.set/).
In the Code node, you can create any data set you want, and return it as the node output. In the Edit Fields node, select **Add fields** to add your custom data.
The Edit Fields node is a good choice for small tests. To create more complex datasets, use the Code node.
## Output a sample data set from the Customer Datastore node
The Customer Datastore node provides a fake dataset to work with. Add and execute the node to explore the data.
Use this approach if you need some test data when exploring n8n, and you don't have a real use-case to work with.

View File

@ -4,7 +4,7 @@ contentType: howto
# Data pinning
n8n allows you to 'pin' data during workflow development. Data pinning means saving the output data of a node, and using the saved data instead of fetching fresh data in future workflow executions.
You can 'pin' data during workflow development. Data pinning means saving the output data of a node, and using the saved data instead of fetching fresh data in future workflow executions.
You can use this when working with data from external sources, to avoid having to repeatedly use the external system. This can save time and resources:
@ -19,18 +19,11 @@ Data pinning isn't available for production workflow executions. It's a feature
## Pin data
To pin data in a node:
1. Run the node to load data.
2. In the **OUTPUT** view, select **Pin data** <span class="inline-image">![Pin data icon](/_images/data/data-pinning/data-pinning-button.png)</span>. When data pinning is active, the button changes to show this <span class="inline-image">![Active pin data icon](/_images/data/data-pinning/data-pinning-button-active.png)</span>.
/// note | Nodes that output binary data
You can't pin data if the output data includes binary data.
///
--8<-- "_snippets/data/how-to-pin-data.md"
## Unpin data
When data pinning is active, the button changes to show this <span class="inline-image">![Active pin data icon](/_images/data/data-pinning/data-pinning-button-active.png)</span>. To unpin data and fetch fresh data on the next execution, select the active **Pin data** <span class="inline-image">![Active pin data icon](/_images/data/data-pinning/data-pinning-button-active.png)</span> icon.
When data pinning is active, the button changes to show this <span class="inline-image">![Active pin data icon](/_images/data/data-pinning/data-pinning-button-active.png){.off-glb}</span>. To unpin data and fetch fresh data on the next execution, select the active **Pin data** <span class="inline-image">![Active pin data icon](/_images/data/data-pinning/data-pinning-button-active.png){.off-glb}</span> icon.

View File

@ -27,12 +27,6 @@ Execute a saved workflow by its ID:
n8n execute --id <ID>
```
Execute a workflow from a workflow file:
```bash
n8n execute --file <WORKFLOW_FILE>
```
## Change the active status of a workflow
You can change the active status of a workflow using the CLI.

View File

@ -15,4 +15,4 @@ You can configure the Base URL that the front end uses to connect to the back en
```bash
export VUE_APP_URL_BASE_API=https://n8n.example.com/
```
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#deployment) for more information on this variable.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/deployment/) for more information on this variable.

View File

@ -14,4 +14,4 @@ You can define more folders with an environment variable:
```bash
export N8N_CUSTOM_EXTENSIONS="/home/jim/n8n/custom-nodes;/data/n8n/nodes"
```
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#nodes) for more information on this variable.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/nodes/) for more information on this variable.

View File

@ -12,9 +12,9 @@ they get saved to the database. If the key isn't yet in the settings file,
you can set it using an environment variable, so that n8n
uses your custom key instead of generating a new one.
In [queue mode](https://docs.n8n.io/hosting/scaling/queue-mode/), you must specify the encryption key environment variable for all workers.
In [queue mode](/hosting/scaling/queue-mode/), you must specify the encryption key environment variable for all workers.
```bash
export N8N_ENCRYPTION_KEY=<SOME RANDOM STRING>
```
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#deployment) for more information on this variable.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/deployment/) for more information on this variable.

View File

@ -19,4 +19,4 @@ You can also set maximum execution time (in seconds) for each workflow individua
```bash
export EXECUTIONS_TIMEOUT_MAX=7200
```
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#executions) for more information on these variables.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/executions/) for more information on these variables.

View File

@ -10,4 +10,4 @@ This section contains examples for how to configure n8n to solve particular use
[[% import "_macros/section-toc.html" as sectionToc %]]
[[ sectionToc.sectionToc(page) ]]
[[ sectionToc.sectionToc(page) ]]

View File

@ -6,11 +6,9 @@ contentType: howto
# Isolate n8n
By default, a self-hosted n8n instance sends data to n8n's servers. This allows n8n to send users notifications about available updates, allows access to workflow templates, and provides n8n with diagnostic information.
By default, a self-hosted n8n instance sends data to n8n's servers. It notifies users about available updates, workflow templates, and diagnostics.
If you need to prevent your n8n instance from connecting with n8n's servers, use environment variables to turn off the settings that cause your instance to connect with n8n's servers.
Turn off diagnostics, notifications, and workflow templates:
To prevent your n8n instance from connecting to n8n's servers, set these environment variables to false:
```
N8N_DIAGNOSTICS_ENABLED=false
@ -26,4 +24,4 @@ N8N_DIAGNOSTICS_CONFIG_FRONTEND=
N8N_DIAGNOSTICS_CONFIG_BACKEND=
```
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#deployment) for more information on these variables.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/deployment/) for more information on these variables.

View File

@ -24,4 +24,4 @@ export NODE_FUNCTION_ALLOW_BUILTIN=crypto,fs
# Allow usage of external npm modules.
export NODE_FUNCTION_ALLOW_EXTERNAL=moment,lodash
```
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#nodes) for more information on these variables.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/nodes/) for more information on these variables.

View File

@ -9,7 +9,7 @@ contentType: howto
/// note | Experimental
Prometheus metrics are an experimental feature.
///
To collect and expose metrics, n8n uses the [prom-client](https://www.npmjs.com/package/prom-client) library.
To collect and expose metrics, n8n uses the [prom-client](https://www.npmjs.com/package/prom-client){:target="_blank" .external-link} library.
The `/metrics` endpoint is disabled by default, but it's possible to enable it using the `N8N_METRICS` environment variable.
@ -17,4 +17,4 @@ The `/metrics` endpoint is disabled by default, but it's possible to enable it u
export N8N_METRICS=true
```
Refer to the respective [Environment Variables](/hosting/configuration/environment-variables/#endpoints) (`N8N_METRICS_INCLUDE_*`) for configuring which metrics and labels should get exposed.
Refer to the respective [Environment Variables](/hosting/configuration/environment-variables/endpoints/) (`N8N_METRICS_INCLUDE_*`) for configuring which metrics and labels should get exposed.

View File

@ -12,6 +12,6 @@ The default timezone is America/New_York. For instance, the Schedule node uses i
export GENERIC_TIMEZONE=Europe/Berlin
```
You can find the name of your timezone [here](https://momentjs.com/timezone/).
You can find the name of your timezone [here](https://momentjs.com/timezone/){:target="_blank" .external-link}.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#timezone-and-localization) for more information on this variable.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/timezone-localization/) for more information on this variable.

View File

@ -12,4 +12,4 @@ the ID of the tunnel (if used) in the subfolder `.n8n` of the user who started n
```bash
export N8N_USER_FOLDER=/home/jim/n8n
```
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#deployment) for more information on this variable.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/deployment/) for more information on this variable.

View File

@ -11,4 +11,4 @@ n8n creates the webhook URL by combining `N8N_PROTOCOL`, `N8N_HOST` and `N8N_POR
```bash
export WEBHOOK_URL=https://n8n.example.com/
```
Refer to [Environment variables reference](/hosting/configuration/environment-variables/#endpoints) for more information on this variable.
Refer to [Environment variables reference](/hosting/configuration/environment-variables/endpoints/) for more information on this variable.

View File

@ -98,19 +98,23 @@ n8n:
### Keeping sensitive data in separate files
You can append `_FILE` to some individual environment variables to provide their configuration in a separate file, enabling you to avoid passing sensitive details using environment variables. n8n loads the data from the file with the given name, making it possible to load data from Docker-Secrets and Kubernetes-Secrets.
You can append `_FILE` to individual environment variables to provide their configuration in a separate file, enabling you to avoid passing sensitive details using environment variables. n8n loads the data from the file with the given name, making it possible to load data from [Docker-Secrets](https://docs.docker.com/engine/swarm/secrets/){:target=_blank .external-link} and [Kubernetes-Secrets](https://kubernetes.io/docs/concepts/configuration/secret/){:target=_blank .external-link}.
The following environment variables support file input:
Refer to [Environment variables](/hosting/configuration/environment-variables/) for details on each variable.
- `CREDENTIALS_OVERWRITE_DATA_FILE`
- `DB_TYPE_FILE`
- `DB_POSTGRESDB_DATABASE_FILE`
- `DB_POSTGRESDB_HOST_FILE`
- `DB_POSTGRESDB_PASSWORD_FILE`
- `DB_POSTGRESDB_PORT_FILE`
- `DB_POSTGRESDB_SSL_CA_FILE`
- `DB_POSTGRESDB_SSL_CERT_FILE`
- `DB_POSTGRESDB_SSL_KEY_FILE`
- `DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED_FILE`
- `DB_POSTGRESDB_USER_FILE`
- `DB_POSTGRESDB_SCHEMA_FILE`
While most environment variables can use the `_FILE` suffix, it's more beneficial for sensitive data such as credentials and database configuration. Here are some examples:
```yaml
CREDENTIALS_OVERWRITE_DATA_FILE=/path/to/credentials_data
DB_TYPE_FILE=/path/to/db_type
DB_POSTGRESDB_DATABASE_FILE=/path/to/database_name
DB_POSTGRESDB_HOST_FILE=/path/to/database_host
DB_POSTGRESDB_PORT_FILE=/path/to/database_port
DB_POSTGRESDB_USER_FILE=/path/to/database_user
DB_POSTGRESDB_PASSWORD_FILE=/path/to/database_password
DB_POSTGRESDB_SCHEMA_FILE=/path/to/database_schema
DB_POSTGRESDB_SSL_CA_FILE=/path/to/ssl_ca
DB_POSTGRESDB_SSL_CERT_FILE=/path/to/ssl_cert
DB_POSTGRESDB_SSL_KEY_FILE=/path/to/ssl_key
DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED_FILE=/path/to/ssl_reject_unauth
```

View File

@ -1,293 +0,0 @@
---
description: Configuration environment variables for self-hosted n8n.
contentType: reference
tags:
- environment variables
hide:
- tags
---
# Configuration environment variables
/// note | File-based configuration
You can provide a [configuration file](/hosting/configuration/configuration-methods/) for n8n. You can also append `_FILE` to certain variables to provide their configuration in a separate file. Variables that support this have the "/`_FILE`" option listed below.
///
## Credentials
Enabling overwrites for credentials allows you to set default values for credentials which get automatically populated. The user can't see or change these credentials. The format is `{ CREDENTIAL_NAME: { PARAMETER: VALUE }}`.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `CREDENTIALS_OVERWRITE_DATA`<br>/`_FILE` | * | - | Overwrites for credentials. |
| `CREDENTIALS_OVERWRITE_ENDPOINT` | String | - | The API endpoint to fetch credentials. |
| `CREDENTIALS_DEFAULT_NAME` | String | `My credentials` | The default name for credentials. |
## Database
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `DB_TYPE`<br>/`_FILE` | Enum string:<br> `sqlite`, `postgresdb` | `sqlite` | The database to use. |
| `DB_TABLE_PREFIX` | * | - | Prefix to use for table names. |
### PostgreSQL
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `DB_POSTGRESDB_DATABASE`<br>/`_FILE` | String | `n8n` | The name of the PostgreSQL database. Default value is `n8n`. |
| `DB_POSTGRESDB_HOST`<br>/`_FILE` | String | `localhost` | The PostgreSQL host. Default value is `localhost`. |
| `DB_POSTGRESDB_PORT`<br>/`_FILE` | Number | `5432` | The PostgreSQL port. Default value is `5432`. |
| `DB_POSTGRESDB_USER`<br>/`_FILE` | String | `root` | The PostgreSQL user. Default value is `root`. |
| `DB_POSTGRESDB_PASSWORD`<br>/`_FILE` | String | - | The PostgreSQL password. |
| `DB_POSTGRESDB_SCHEMA`<br>/`_FILE` | String | `public` | The PostgreSQL schema. Default value is `public`. |
| `DB_POSTGRESDB_SSL_CA`<br>/`_FILE` | String | - | The PostgreSQL SSL certificate authority. |
| `DB_POSTGRESDB_SSL_CERT`<br>/`_FILE` | String | - | The PostgreSQL SSL certificate. |
| `DB_POSTGRESDB_SSL_KEY`<br>/`_FILE` | String | - | The PostgreSQL SSL key. |
| `DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED`<br>/`_FILE` | Boolean | `true` | If n8n should reject unauthorized SSL connections (true) or not (false). |
### SQLite
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `DB_SQLITE_VACUUM_ON_STARTUP` | Boolean | `false` | Runs [VACUUM](https://www.sqlite.org/lang_vacuum.html){:target="_blank" .external-link} operation on startup to rebuild the database. Reduces file size and optimizes indexes. This is a long running blocking operation and increases start-up time. |
## Deployment
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_EDITOR_BASE_URL` | String | - | Public URL where users can access the editor. Also used for emails sent from n8n. |
| `N8N_CONFIG_FILES` | String | - | Use to provide the path to any JSON [configuration file](/hosting/configuration/configuration-methods/). |
| `N8N_DISABLE_UI` | Boolean | `false` | Disable the UI (true) or not (false). |
| `N8N_TEMPLATES_ENABLED` | Boolean | `true` | Enable workflow templates (true) or disable (false). |
| `N8N_TEMPLATES_HOST` | String | `https://api.n8n.io` | Change this if creating your own workflow template library. Note that to use your own workflow templates library, your API must provide the same endpoints and response structure as n8n's. Refer to [Workflow templates](/workflows/templates/) for more information. |
| `N8N_ENCRYPTION_KEY` | String | Random key generated by n8n | Provide a custom key used to encrypt credentials in the n8n database. By default n8n generates a random key on first launch. |
| `N8N_USER_FOLDER` | String | `user-folder` | Provide the path where n8n will create the `.n8n` folder. This directory stores user-specific data, such as database file and encryption key. |
| `N8N_PATH` | String | `/` | The path n8n deploys to. |
| `N8N_HOST` | String | `localhost` | Host name n8n runs on. |
| `N8N_PORT` | Number | `5678` | The HTTP port n8n runs on. |
| `N8N_LISTEN_ADDRESS` | String | `0.0.0.0` | The IP address n8n should listen on. |
| `N8N_PROTOCOL` | Enum string: `http`, `https` | `http` | The protocol used to reach n8n. |
| `N8N_SSL_KEY` | String | - | The SSL key for HTTPS protocol. |
| `N8N_SSL_CERT` | String | - | The SSL certificate for HTTPS protocol. |
| `N8N_PERSONALIZATION_ENABLED` | Boolean | `true` | Whether to ask users personalisation questions and then customise n8n accordingly. |
| `N8N_VERSION_NOTIFICATIONS_ENABLED` | Boolean | `true` | When enabled, n8n sends notifications of new versions and security updates. |
| `N8N_VERSION_NOTIFICATIONS_ENDPOINT` | String | `https://api.n8n.io/versions/` | The endpoint to retrieve where version information. |
| `N8N_VERSION_NOTIFICATIONS_INFO_URL` | String | `https://docs.n8n.io/getting-started/installation/updating.html` | The URL displayed in the New Versions panel for additional information. |
| `N8N_DIAGNOSTICS_ENABLED` | Boolean | `true` | Whether to share selected, anonymous [telemetry](/privacy-security/privacy/) with n8n |
| `N8N_DIAGNOSTICS_CONFIG_FRONTEND` | String | `1zPn9bgWPzlQc0p8Gj1uiK6DOTn;https://telemetry.n8n.io` | Telemetry configuration for the frontend. |
| `N8N_DIAGNOSTICS_CONFIG_BACKEND` | String | `1zPn7YoGC3ZXE9zLeTKLuQCB4F6;https://telemetry.n8n.io/v1/batch` | Telemetry configuration for the backend. |
| `N8N_PUSH_BACKEND` | String | `websocket` | Choose whether the n8n backend uses server-sent events (`sse`) or WebSockets (`websocket`) to send changes to the UI. |
| `VUE_APP_URL_BASE_API` | String | `http://localhost:5678/` | Used when building the `n8n-editor-ui` package manually to set how the frontend can reach the backend API. |
| `N8N_HIRING_BANNER_ENABLED` | Boolean | `true` | Whether to show the n8n hiring banner in the console (true) or not (false). |
| `N8N_PUBLIC_API_SWAGGERUI_DISABLED` | Boolean | `false` | Whether the Swagger UI (API playground) is disabled (true) or not (false). |
| `N8N_PUBLIC_API_DISABLED` | Boolean | `false` | Whether to disable the public API (false) or not (true). |
| `N8N_PUBLIC_API_ENDPOINT` | String | `api` | Path for the public API endpoints. |
| `N8N_GRACEFUL_SHUTDOWN_TIMEOUT` | Number | `30` | How long should the n8n process wait (in seconds) for components to shut down before exiting the process. |
## Binary data
By default, n8n uses memory to store binary data. Enterprise users can choose to use an external service instead. Refer to [External storage](/hosting/scaling/external-storage/) for more information on using external storage for binary data.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_AVAILABLE_BINARY_DATA_MODES` | String | `filesystem` | A comma separated list of available binary data modes. |
| `N8N_BINARY_DATA_STORAGE_PATH` | String | `N8N_USE_FOLDER/binaryData` | The path where n8n stores binary data. |
| `N8N_DEFAULT_BINARY_DATA_MODE` | String | `default` | The default binary data mode. `default` keeps binary data in memory. Set to `filesystem` to use the filesystem, or `s3` to AWS S3. |
## User management SMTP, and two-factor authentication
Refer to [User management](/hosting/configuration/user-management-self-hosted/) for more information on setting up user management and emails.
<!-- vale off -->
| Variable | Type | Default | Description |
| :------- | :--- | :------ | :---------- |
| `N8N_EMAIL_MODE` | String | `smtp` | Enable emails. |
| `N8N_SMTP_HOST` | String | - | _your_SMTP_server_name_ |
| `N8N_SMTP_PORT` | Number | - | _your_SMTP_server_port_ |
| `N8N_SMTP_USER` | String | - | _your_SMTP_username_ |
| `N8N_SMTP_PASS` | String | - | _your_SMTP_password_ |
| `N8N_SMTP_OAUTH_SERVICE_CLIENT` | String | - | If using 2LO with a service account this is your client ID |
| `N8N_SMTP_OAUTH_PRIVATE_KEY` | String | - | If using 2LO with a service account this is your private key |
| `N8N_SMTP_SENDER` | String | - | Sender email address. You can optionally include the sender name. Example with name: _N8N `<contact@n8n.com>`_ |
| `N8N_SMTP_SSL` | Boolean | `true` | Whether to use SSL for SMTP (true) or not (false). |
| `N8N_UM_EMAIL_TEMPLATES_INVITE` | String | - | Full path to your HTML email template. This overrides the default template for invite emails. |
| `N8N_UM_EMAIL_TEMPLATES_PWRESET` | String | - | Full path to your HTML email template. This overrides the default template for password reset emails. |
| `N8N_UM_EMAIL_TEMPLATES_WORKFLOW_SHARED` | String | - | Overrides the default HTML template for notifying users that a workflow was shared. Provide the full path to the template. |
| `N8N_UM_EMAIL_TEMPLATES_CREDENTIALS_SHARED` | String | - | Overrides the default HTML template for notifying users that a credential was shared. Provide the full path to the template. |
| `N8N_USER_MANAGEMENT_JWT_SECRET` | String | - | Set a specific JWT secret. By default, n8n generates one on start. |
| `N8N_USER_MANAGEMENT_JWT_DURATION_HOURS` | Number | 168 | Set an expiration date for the JWTs in hours. |
| `N8N_USER_MANAGEMENT_JWT_REFRESH_TIMEOUT_HOURS` | Number | 0 | How many hours before the JWT expires to automatically refresh it. 0 means 25% of `N8N_USER_MANAGEMENT_JWT_DURATION_HOURS`. -1 means it will never refresh, which forces users to log in again after the period defined in `N8N_USER_MANAGEMENT_JWT_DURATION_HOURS`. |
| `N8N_MFA_ENABLED` | Boolean | `true` | Whether to enable two-factor authentication (true) or disable (false). n8n ignores this if existing users have 2FA enabled. |
<!-- vale on -->
## Endpoints
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_PAYLOAD_SIZE_MAX` | Number | `16` | The maximum payload size in MB. |
| `N8N_METRICS` | Boolean | `false` | Whether to enable the `/metrics` endpoint. |
| `N8N_METRICS_PREFIX` | String | `n8n_` | Optional prefix for n8n specific metrics names. |
| `N8N_METRICS_INCLUDE_DEFAULT_METRICS` | Boolean | `true` | Whether to expose default system and node.js metrics. |
| `N8N_METRICS_INCLUDE_CACHE_METRICS` | Boolean | false | Whether to include metrics (true) for cache hits and misses, or not include them (false). |
| `N8N_METRICS_INCLUDE_MESSAGE_EVENT_BUS_METRICS` | Boolean | `false` | Whether to include metrics (true) for events, or not include them (false). |
| `N8N_METRICS_INCLUDE_WORKFLOW_ID_LABEL` | Boolean | `false` | Whether to include a label for the workflow ID on workflow metrics. |
| `N8N_METRICS_INCLUDE_NODE_TYPE_LABEL` | Boolean | `false` | Whether to include a label for the node type on node metrics. |
| `N8N_METRICS_INCLUDE_CREDENTIAL_TYPE_LABEL` | Boolean | `false` | Whether to include a label for the credential type on credential metrics. |
| `N8N_METRICS_INCLUDE_API_ENDPOINTS` | Boolean | `false` | Whether to expose metrics for API endpoints. |
| `N8N_METRICS_INCLUDE_API_PATH_LABEL` | Boolean | `false` | Whether to include a label for the path of API invocations. |
| `N8N_METRICS_INCLUDE_API_METHOD_LABEL` | Boolean | `false` | Whether to include a label for the HTTP method (GET, POST, ...) of API invocations. |
| `N8N_METRICS_INCLUDE_API_STATUS_CODE_LABEL` | Boolean | `false` | Whether to include a label for the HTTP status code (200, 404, ...) of API invocations. |
| `N8N_ENDPOINT_REST` | String | `rest` | The path used for REST endpoint. |
| `N8N_ENDPOINT_WEBHOOK` | String | `webhook` | The path used for webhook endpoint. |
| `N8N_ENDPOINT_WEBHOOK_TEST` | String | `webhook-test` | The path used for test-webhook endpoint. |
| `N8N_ENDPOINT_WEBHOOK_WAIT` | String | `webhook-waiting` | The path used for waiting-webhook endpoint. |
| `WEBHOOK_URL` | String | - | Used to manually provide the Webhook URL when running n8n behind a reverse proxy. See [here](/hosting/configuration/configuration-examples/webhook-url) for more details. |
| `N8N_DISABLE_PRODUCTION_MAIN_PROCESS` | Boolean | `false` | Disable production webhooks from main process. This helps ensure no HTTP traffic load to main process when using webhook-specific processes. |
## External hooks
| Variable | Type | Description |
| :------- | :---- | :---------- |
| `EXTERNAL_HOOK_FILES` | String | Files containing external hooks. Provide multiple files as a colon-separated list ("`:`"). |
## Executions
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `EXECUTIONS_MODE` | Enum string: `regular`, `queue` | `regular` | Whether executions should run directly or using queue.<br><br>Refer to [Queue mode](/hosting/scaling/queue-mode/) for more details. |
| `EXECUTIONS_TIMEOUT` | Number | `-1` | Sets a default timeout (in seconds) to all workflows after which n8n stops their execution. Users can override this for individual workflows up to the duration set in `EXECUTIONS_TIMEOUT_MAX`. Set `EXECUTIONS_TIMEOUT` to `-1` to disable. |
| `EXECUTIONS_TIMEOUT_MAX` | Number | `3600` | The maximum execution time (in seconds) that users can set for an individual workflow. |
| `EXECUTIONS_DATA_SAVE_ON_ERROR` | Enum string: `all`, `none` | `all` | Whether n8n saves execution data on error. |
| `EXECUTIONS_DATA_SAVE_ON_SUCCESS` | Enum string: `all`, `none` | `all` | Whether n8n saves execution data on success. |
| `EXECUTIONS_DATA_SAVE_ON_PROGRESS` | Boolean | `false` | Whether to save progress for each node executed (true) or not (false). |
| `EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS` | Boolean | `true` | Whether to save data of executions when started manually. |
| `EXECUTIONS_DATA_PRUNE` | Boolean | `true` | Whether to delete data of past executions on a rolling basis. |
| `EXECUTIONS_DATA_MAX_AGE` | Number | `336` | The execution age (in hours) before it's deleted. |
| `EXECUTIONS_DATA_PRUNE_MAX_COUNT` | Number | `10000` | Maximum number of executions to keep in the database. 0 = no limit |
| `EXECUTIONS_DATA_HARD_DELETE_BUFFER` | Number | `1` | How old (hours) the finished execution data has to be to get hard-deleted. By default, this buffer excludes recent executions as the user may need them while building a workflow. |
| `EXECUTIONS_DATA_PRUNE_HARD_DELETE_INTERVAL` | Number | `15` | How often (minutes) execution data should be hard-deleted. |
| `EXECUTIONS_DATA_PRUNE_SOFT_DELETE_INTERVAL` | Number | `60` | How often (minutes) execution data should be soft-deleted. |
## Logs
### n8n logs
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_LOG_LEVEL` | Enum string: `info`, `warn`, `error`, `verbose`, `debug` | `info` | Log output level. |
| `N8N_LOG_OUTPUT` | Enum string: `console`, `file` | `console` | Where to output logs. Provide multiple values as a comma-seperated list. |
| `N8N_LOG_FILE_COUNT_MAX` | Number | `100` | Max number of log files to keep. |
| `N8N_LOG_FILE_SIZE_MAX` | Number | `16` | Max size of each log file in MB. |
| `N8N_LOG_FILE_LOCATION` | String | `file` | Log file location. Requires N8N_LOG_OUTPUT set to `file`. |
| `DB_LOGGING_ENABLED` | Boolean | `false` | Whether to enable database-specific logging. |
| `DB_LOGGING_OPTIONS` | Enum string: `query`, `error`, `schema`, `warn`, `info`, `log` | `error` | Database log output level. To enable all logging, specify `all`. |
| `DB_LOGGING_MAX_EXECUTION_TIME` | Number | `1000` | Maximum execution time (in milliseconds) before n8n logs a warning. Set to `0` to disable long running query warning. |
### Log streaming
Refer to [Log streaming](/log-streaming/) for more information on this feature.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_EVENTBUS_CHECKUNSENTINTERVAL` | Number | `0` | How often (in milliseconds) to check for unsent event messages. Can in rare cases cause a message to be sent twice. Set to `0` to disable it. |
| `N8N_EVENTBUS_LOGWRITER_SYNCFILEACCESS` | Boolean | `false` | Whether all file access happens synchronously within the thread (true) or not (false). |
| `N8N_EVENTBUS_LOGWRITER_KEEPLOGCOUNT` | Number | `3` | How many event log files to keep. |
| `N8N_EVENTBUS_LOGWRITER_MAXFILESIZEINKB` | Number | `10240` | Maximum size (in kilo-bytes) of an event log file before a new one is started. |
| `N8N_EVENTBUS_LOGWRITER_LOGBASENAME` | String | `n8nEventLog` | Basename of the event log file. |
## External data storage
Refer to [External storage](/hosting/scaling/external-storage/) for more information on using external storage for binary data.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_EXTERNAL_STORAGE_S3_HOST` | String | - | Host of the n8n bucket in S3-compatible external storage. For example, `s3.us-east-1.amazonaws.com` |
| `N8N_EXTERNAL_STORAGE_S3_BUCKET_NAME` | String | - | Name of the n8n bucket in S3-compatible external storage. |
| `N8N_EXTERNAL_STORAGE_S3_BUCKET_REGION` | String | - | Region of the n8n bucket in S3-compatible external storage. For example, `us-east-1`|
| `N8N_EXTERNAL_STORAGE_S3_ACCESS_KEY` | String | - | Access key in S3-compatible external storage |
| `N8N_EXTERNAL_STORAGE_S3_ACCESS_SECRET` | String | - | Access secret in S3-compatible external storage. |
## Nodes
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `NODES_INCLUDE` | Array of strings | - | Specify which nodes to load. |
| `NODES_EXCLUDE` | Array of strings | - | Specify which nodes not to load. For example, to block nodes that can be a security risk if users aren't trustworthy: `NODES_EXCLUDE: "[\"n8n-nodes-base.executeCommand\", \"n8n-nodes-base.filesreadwrite\"]"` |
| `NODE_FUNCTION_ALLOW_BUILTIN` | String | - | Permit users to import specific built-in modules in the Code node. Use * to allow all. n8n disables importing modules by default. |
| `NODE_FUNCTION_ALLOW_EXTERNAL` | String | - | Permit users to import specific external modules (from `n8n/node_modules`) in the Code node. n8n disables importing modules by default. |
| `NODES_ERROR_TRIGGER_TYPE` | String | `n8n-nodes-base.errorTrigger` | Specify which node type to use as Error Trigger. |
| `N8N_CUSTOM_EXTENSIONS` | String | - | Specify the path to additional directories containing your custom nodes. |
| `N8N_COMMUNITY_PACKAGES_ENABLED` | Boolean | `true` | Whether community nodes are enabled (true) or not (false). |
## Queue mode
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `QUEUE_BULL_PREFIX` | String | - | Prefix to use for all queue keys. |
| `QUEUE_BULL_REDIS_DB` | Number | `0` | The Redis database used. |
| `QUEUE_BULL_REDIS_HOST` | String | `localhost` | The Redis host. |
| `QUEUE_BULL_REDIS_PORT` | Number | `6379` | The Redis port used. |
| `QUEUE_BULL_REDIS_USERNAME` | String | - | The Redis username (needs Redis version 6 or above). Don't define it for Redis < 6 compatibility |
| `QUEUE_BULL_REDIS_PASSWORD` | String | - | The Redis password. |
| `QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD` | Number | `10000` | The Redis timeout threshold (in seconds). |
| `QUEUE_BULL_REDIS_CLUSTER_NODES` | String | - | Expects a comma-separated list of Redis Cluster nodes in the format `host:port`, for the Redis client to initially connect to. If running in queue mode (`EXECUTIONS_MODE = queue`), setting this variable will create a Redis Cluster client instead of a Redis client, and n8n will ignore `QUEUE_BULL_REDIS_HOST` and `QUEUE_BULL_REDIS_PORT`. |
| `QUEUE_BULL_REDIS_TLS` | Boolean | `false` | Enable TLS on Redis connections. |
| `QUEUE_RECOVERY_INTERVAL` | Number | `60` | Interval (in seconds) for active polling to the queue to recover from Redis crashes. `0` disables recovery. May increase Redis traffic significantly. |
| `QUEUE_WORKER_TIMEOUT` (**deprecated**) | Number | `30` | **Deprecated** Use `N8N_GRACEFUL_SHUTDOWN_TIMEOUT` instead.<br/><br/>How long should n8n wait (seconds) for running executions before exiting worker process on shutdown. |
| `QUEUE_HEALTH_CHECK_ACTIVE` | Boolean | `false` | Whether to enable health checks (true) or disable (false). |
| `QUEUE_HEALTH_CHECK_PORT` | Number | - | The port to serve health checks on. |
| `QUEUE_WORKER_LOCK_DURATION` | Number | `30000` | How long (in ms) is the lease period for a worker to work on a message. |
| `QUEUE_WORKER_LOCK_RENEW_TIME` | Number | `15000` | How frequently (in ms) should a worker renew the lease time. |
| `QUEUE_WORKER_STALLED_INTERVAL` | Number | `30000` | How often should a worker check for stalled jobs (use 0 for never). |
| `QUEUE_WORKER_MAX_STALLED_COUNT` | Number | `1` | Maximum amount of times a stalled job will be re-processed. |
### Multi-main setup
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_MULTI_MAIN_SETUP_ENABLED` | Boolean | `false` | Whether to enable multi-main setup for queue mode (license required). |
| `N8N_MULTI_MAIN_SETUP_KEY_TTL` | Number | `10` | Time to live (in seconds) for leader key in multi-main setup. |
| `N8N_MULTI_MAIN_SETUP_CHECK_INTERVAL` | Number | `3` | Interval (in seconds) for leader check in multi-main setup. |
## Security
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_BLOCK_ENV_ACCESS_IN_NODE` | Boolean | `false` | Whether to allow users to access environment variables in expressions and the Code node (false) or not (true). |
## Source control
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_SOURCECONTROL_DEFAULT_SSH_KEY_TYPE` | String | `ed25519` | Set to `rsa` to make RSA the default SSH key type for [Source control setup](/source-control-environments/setup/). |
## External secrets
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_EXTERNAL_SECRETS_UPDATE_INTERVAL` | Number | `300` (5 minutes) | How often (in seconds) to check for secret updates. |
## Timezone and localization
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `GENERIC_TIMEZONE` | * | `America/New_York` |The n8n instance timezone. Important for schedule nodes (such as Cron). |
| `N8N_DEFAULT_LOCALE` | String | `en` | A locale identifier, compatible with the [Accept-Language header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language){:target="_blank" .external-link}. n8n doesn't support regional identifiers, such as `de-AT`. When running in a locale other than the default, n8n displays UI strings in the selected locale, and falls back to `en` for any untranslated strings. |
## Workflows
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `WORKFLOWS_DEFAULT_NAME` | String | `My workflow` | The default name used for new workflows. |
| `N8N_ONBOARDING_FLOW_DISABLED` | Boolean | `false` | Whether to show onboarding tips when creating a new workflow (true) or not (false). |
| `N8N_WORKFLOW_TAGS_DISABLED` | Boolean | `false` | Whether to disable workflow tags (true) or enable tags (false). |
| `N8N_WORKFLOW_CALLER_POLICY_DEFAULT_OPTION` | String | `workflowsFromSameOwner` | Which workflows can call a workflow. Options are: `any`, `none`, `workflowsFromAList`, `workflowsFromSameOwner`. This feature requires [Workflow sharing](/workflows/sharing/). |
## License
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_HIDE_USAGE_PAGE` | boolean | `false` | Hide the usage and plans page in the app. |
| `N8N_LICENSE_ACTIVATION_KEY` | String | `''` | Activation key to initialize license. Not applicable if the n8n instance was already activated. |
| `N8N_LICENSE_AUTO_RENEW_ENABLED` | Boolean | `true` | Whether autorenew for licenses is enabled (true) or not (false). |
| `N8N_LICENSE_AUTO_RENEW_OFFSET` | Number | `60 * 60 * 72` (72 hours) | How many seconds before expiry a license should automatically renew. |
| `N8N_LICENSE_SERVER_URL` | String | `http://license.n8n.io/v1` | Server URL to retrieve license. |

View File

@ -0,0 +1,22 @@
---
title: Binary data environment variables
description: Customize binary data storage modes and paths with environment variables for your self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Binary data environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
By default, n8n uses memory to store binary data. Enterprise users can choose to use an external service instead. Refer to [External storage](/hosting/scaling/external-storage/) for more information on using external storage for binary data.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_AVAILABLE_BINARY_DATA_MODES` | String | `filesystem` | A comma separated list of available binary data modes. |
| `N8N_BINARY_DATA_STORAGE_PATH` | String | `N8N_USER_FOLDER/binaryData` | The path where n8n stores binary data. |
| `N8N_DEFAULT_BINARY_DATA_MODE` | String | `default` | The default binary data mode. `default` keeps binary data in memory. Set to `filesystem` to use the filesystem, or `s3` to AWS S3. |

View File

@ -0,0 +1,22 @@
---
title: Credentials environment variables
description: Manage default credentials and override them through environment variables your self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Credentials environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
Enable credential overwrites using the following environment variables. Refer to [Credential overwrites](/embed/configuration/#credential-overwrites/) for details.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `CREDENTIALS_OVERWRITE_DATA`<br>/`_FILE` | * | - | Overwrites for credentials. |
| `CREDENTIALS_OVERWRITE_ENDPOINT` | String | - | The API endpoint to fetch credentials. |
| `CREDENTIALS_DEFAULT_NAME` | String | `My credentials` | The default name for credentials. |

View File

@ -0,0 +1,44 @@
---
title: Database environment variables
description: Set up and configure databases with environment variables for your self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Database environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
By default, n8n uses SQLite. n8n also supports PostgreSQL. n8n [removed support for MySQL and MariaDB](/1-0-migration-checklist/#mysql-and-mariadb) in v1.0.
This page outlines environment variables to configure your chosen database for your self-hosted n8n instance.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `DB_TYPE`<br>/`_FILE` | Enum string:<br> `sqlite`, `postgresdb` | `sqlite` | The database to use. |
| `DB_TABLE_PREFIX` | * | - | Prefix to use for table names. |
## PostgreSQL
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `DB_POSTGRESDB_DATABASE`<br>/`_FILE` | String | `n8n` | The name of the PostgreSQL database. Default value is `n8n`. |
| `DB_POSTGRESDB_HOST`<br>/`_FILE` | String | `localhost` | The PostgreSQL host. Default value is `localhost`. |
| `DB_POSTGRESDB_PORT`<br>/`_FILE` | Number | `5432` | The PostgreSQL port. Default value is `5432`. |
| `DB_POSTGRESDB_USER`<br>/`_FILE` | String | `root` | The PostgreSQL user. Default value is `root`. |
| `DB_POSTGRESDB_PASSWORD`<br>/`_FILE` | String | - | The PostgreSQL password. |
| `DB_POSTGRESDB_SCHEMA`<br>/`_FILE` | String | `public` | The PostgreSQL schema. Default value is `public`. |
| `DB_POSTGRESDB_SSL_CA`<br>/`_FILE` | String | - | The PostgreSQL SSL certificate authority. |
| `DB_POSTGRESDB_SSL_CERT`<br>/`_FILE` | String | - | The PostgreSQL SSL certificate. |
| `DB_POSTGRESDB_SSL_KEY`<br>/`_FILE` | String | - | The PostgreSQL SSL key. |
| `DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED`<br>/`_FILE` | Boolean | `true` | If n8n should reject unauthorized SSL connections (true) or not (false). |
## SQLite
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `DB_SQLITE_VACUUM_ON_STARTUP` | Boolean | `false` | Runs [VACUUM](https://www.sqlite.org/lang_vacuum.html){:target="_blank" .external-link} operation on startup to rebuild the database. Reduces file size and optimizes indexes. This is a long running blocking operation and increases start-up time. |

View File

@ -0,0 +1,48 @@
---
title: Deployment environment variables
description: Configure deployment options and application accessibility with environment variables for your self-hosted n8n intance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Deployment environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
This page lists the deployment configuration options for your self-hosted n8n instance, including setting up access URLs, enabling templates, customizing encryption, and configuring server details.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_EDITOR_BASE_URL` | String | - | Public URL where users can access the editor. Also used for emails sent from n8n. |
| `N8N_CONFIG_FILES` | String | - | Use to provide the path to any JSON [configuration file](/hosting/configuration/configuration-methods/). |
| `N8N_DISABLE_UI` | Boolean | `false` | Disable the UI (true) or not (false). |
| `N8N_TEMPLATES_ENABLED` | Boolean | `true` | Enable workflow templates (true) or disable (false). |
| `N8N_TEMPLATES_HOST` | String | `https://api.n8n.io` | Change this if creating your own workflow template library. Note that to use your own workflow templates library, your API must provide the same endpoints and response structure as n8n's. Refer to [Workflow templates](/workflows/templates/) for more information. |
| `N8N_ENCRYPTION_KEY` | String | Random key generated by n8n | Provide a custom key used to encrypt credentials in the n8n database. By default n8n generates a random key on first launch. |
| `N8N_USER_FOLDER` | String | `user-folder` | Provide the path where n8n will create the `.n8n` folder. This directory stores user-specific data, such as database file and encryption key. |
| `N8N_PATH` | String | `/` | The path n8n deploys to. |
| `N8N_HOST` | String | `localhost` | Host name n8n runs on. |
| `N8N_PORT` | Number | `5678` | The HTTP port n8n runs on. |
| `N8N_LISTEN_ADDRESS` | String | `0.0.0.0` | The IP address n8n should listen on. |
| `N8N_PROTOCOL` | Enum string: `http`, `https` | `http` | The protocol used to reach n8n. |
| `N8N_SSL_KEY` | String | - | The SSL key for HTTPS protocol. |
| `N8N_SSL_CERT` | String | - | The SSL certificate for HTTPS protocol. |
| `N8N_PERSONALIZATION_ENABLED` | Boolean | `true` | Whether to ask users personalisation questions and then customise n8n accordingly. |
| `N8N_VERSION_NOTIFICATIONS_ENABLED` | Boolean | `true` | When enabled, n8n sends notifications of new versions and security updates. |
| `N8N_VERSION_NOTIFICATIONS_ENDPOINT` | String | `https://api.n8n.io/versions/` | The endpoint to retrieve where version information. |
| `N8N_VERSION_NOTIFICATIONS_INFO_URL` | String | `https://docs.n8n.io/getting-started/installation/updating.html` | The URL displayed in the New Versions panel for additional information. |
| `N8N_DIAGNOSTICS_ENABLED` | Boolean | `true` | Whether to share selected, anonymous [telemetry](/privacy-security/privacy/) with n8n |
| `N8N_DIAGNOSTICS_CONFIG_FRONTEND` | String | `1zPn9bgWPzlQc0p8Gj1uiK6DOTn;https://telemetry.n8n.io` | Telemetry configuration for the frontend. |
| `N8N_DIAGNOSTICS_CONFIG_BACKEND` | String | `1zPn7YoGC3ZXE9zLeTKLuQCB4F6;https://telemetry.n8n.io/v1/batch` | Telemetry configuration for the backend. |
| `N8N_PUSH_BACKEND` | String | `websocket` | Choose whether the n8n backend uses server-sent events (`sse`) or WebSockets (`websocket`) to send changes to the UI. |
| `VUE_APP_URL_BASE_API` | String | `http://localhost:5678/` | Used when building the `n8n-editor-ui` package manually to set how the frontend can reach the backend API. Refer to [Configure the Base URL](/hosting/configuration/configuration-examples/base-url/).
|
| `N8N_HIRING_BANNER_ENABLED` | Boolean | `true` | Whether to show the n8n hiring banner in the console (true) or not (false). |
| `N8N_PUBLIC_API_SWAGGERUI_DISABLED` | Boolean | `false` | Whether the Swagger UI (API playground) is disabled (true) or not (false). |
| `N8N_PUBLIC_API_DISABLED` | Boolean | `false` | Whether to disable the public API (true) or not (false). |
| `N8N_PUBLIC_API_ENDPOINT` | String | `api` | Path for the public API endpoints. |
| `N8N_GRACEFUL_SHUTDOWN_TIMEOUT` | Number | `30` | How long should the n8n process wait (in seconds) for components to shut down before exiting the process. |

View File

@ -0,0 +1,38 @@
---
title: Endpoints environment variables
description: Customize the application's API and webhook endpoints with environment variables for your self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Endpoints environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
This page lists environment variables for customizing endpoints in n8n.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_PAYLOAD_SIZE_MAX` | Number | `16` | The maximum payload size in MB. |
| `N8N_METRICS` | Boolean | `false` | Whether to enable the `/metrics` endpoint. |
| `N8N_METRICS_PREFIX` | String | `n8n_` | Optional prefix for n8n specific metrics names. |
| `N8N_METRICS_INCLUDE_DEFAULT_METRICS` | Boolean | `true` | Whether to expose default system and node.js metrics. |
| `N8N_METRICS_INCLUDE_CACHE_METRICS` | Boolean | false | Whether to include metrics (true) for cache hits and misses, or not include them (false). |
| `N8N_METRICS_INCLUDE_MESSAGE_EVENT_BUS_METRICS` | Boolean | `false` | Whether to include metrics (true) for events, or not include them (false). |
| `N8N_METRICS_INCLUDE_WORKFLOW_ID_LABEL` | Boolean | `false` | Whether to include a label for the workflow ID on workflow metrics. |
| `N8N_METRICS_INCLUDE_NODE_TYPE_LABEL` | Boolean | `false` | Whether to include a label for the node type on node metrics. |
| `N8N_METRICS_INCLUDE_CREDENTIAL_TYPE_LABEL` | Boolean | `false` | Whether to include a label for the credential type on credential metrics. |
| `N8N_METRICS_INCLUDE_API_ENDPOINTS` | Boolean | `false` | Whether to expose metrics for API endpoints. |
| `N8N_METRICS_INCLUDE_API_PATH_LABEL` | Boolean | `false` | Whether to include a label for the path of API invocations. |
| `N8N_METRICS_INCLUDE_API_METHOD_LABEL` | Boolean | `false` | Whether to include a label for the HTTP method (GET, POST, ...) of API invocations. |
| `N8N_METRICS_INCLUDE_API_STATUS_CODE_LABEL` | Boolean | `false` | Whether to include a label for the HTTP status code (200, 404, ...) of API invocations. |
| `N8N_ENDPOINT_REST` | String | `rest` | The path used for REST endpoint. |
| `N8N_ENDPOINT_WEBHOOK` | String | `webhook` | The path used for webhook endpoint. |
| `N8N_ENDPOINT_WEBHOOK_TEST` | String | `webhook-test` | The path used for test-webhook endpoint. |
| `N8N_ENDPOINT_WEBHOOK_WAIT` | String | `webhook-waiting` | The path used for waiting-webhook endpoint. |
| `WEBHOOK_URL` | String | - | Used to manually provide the Webhook URL when running n8n behind a reverse proxy. See [here](/hosting/configuration/configuration-examples/webhook-url/) for more details. |
| `N8N_DISABLE_PRODUCTION_MAIN_PROCESS` | Boolean | `false` | Disable production webhooks from main process. This helps ensure no HTTP traffic load to main process when using webhook-specific processes. |

View File

@ -0,0 +1,32 @@
---
title: Executions environment variables
description: Environment variables to configure settings related to workflow executions.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Executions environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
This page lists environment variables to configure workflow execution settings.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `EXECUTIONS_MODE` | Enum string: `regular`, `queue` | `regular` | Whether executions should run directly or using queue.<br><br>Refer to [Queue mode](/hosting/scaling/queue-mode/) for more details. |
| `EXECUTIONS_TIMEOUT` | Number | `-1` | Sets a default timeout (in seconds) to all workflows after which n8n stops their execution. Users can override this for individual workflows up to the duration set in `EXECUTIONS_TIMEOUT_MAX`. Set `EXECUTIONS_TIMEOUT` to `-1` to disable. |
| `EXECUTIONS_TIMEOUT_MAX` | Number | `3600` | The maximum execution time (in seconds) that users can set for an individual workflow. |
| `EXECUTIONS_DATA_SAVE_ON_ERROR` | Enum string: `all`, `none` | `all` | Whether n8n saves execution data on error. |
| `EXECUTIONS_DATA_SAVE_ON_SUCCESS` | Enum string: `all`, `none` | `all` | Whether n8n saves execution data on success. |
| `EXECUTIONS_DATA_SAVE_ON_PROGRESS` | Boolean | `false` | Whether to save progress for each node executed (true) or not (false). |
| `EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS` | Boolean | `true` | Whether to save data of executions when started manually. |
| `EXECUTIONS_DATA_PRUNE` | Boolean | `true` | Whether to delete data of past executions on a rolling basis. |
| `EXECUTIONS_DATA_MAX_AGE` | Number | `336` | The execution age (in hours) before it's deleted. |
| `EXECUTIONS_DATA_PRUNE_MAX_COUNT` | Number | `10000` | Maximum number of executions to keep in the database. 0 = no limit |
| `EXECUTIONS_DATA_HARD_DELETE_BUFFER` | Number | `1` | How old (hours) the finished execution data has to be to get hard-deleted. By default, this buffer excludes recent executions as the user may need them while building a workflow. |
| `EXECUTIONS_DATA_PRUNE_HARD_DELETE_INTERVAL` | Number | `15` | How often (minutes) execution data should be hard-deleted. |
| `EXECUTIONS_DATA_PRUNE_SOFT_DELETE_INTERVAL` | Number | `60` | How often (minutes) execution data should be soft-deleted. |

View File

@ -0,0 +1,24 @@
---
title: External data storage environment variables
description: Environment variables to configure external data storage for your self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# External data storage environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
Refer to [External storage](/hosting/scaling/external-storage/) for more information on using external storage for binary data.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_EXTERNAL_STORAGE_S3_HOST` | String | - | Host of the n8n bucket in S3-compatible external storage. For example, `s3.us-east-1.amazonaws.com` |
| `N8N_EXTERNAL_STORAGE_S3_BUCKET_NAME` | String | - | Name of the n8n bucket in S3-compatible external storage. |
| `N8N_EXTERNAL_STORAGE_S3_BUCKET_REGION` | String | - | Region of the n8n bucket in S3-compatible external storage. For example, `us-east-1`|
| `N8N_EXTERNAL_STORAGE_S3_ACCESS_KEY` | String | - | Access key in S3-compatible external storage |
| `N8N_EXTERNAL_STORAGE_S3_ACCESS_SECRET` | String | - | Access secret in S3-compatible external storage. |

View File

@ -0,0 +1,20 @@
---
title: External hooks environment variables
description: Environment variables to integrate external hooks into your self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# External hooks environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
You can define external hooks that n8n executes whenever a specific operation runs. Refer to [Backend hooks](/embed/configuration/#backend-hooks) for examples of available hooks and [Hook files](/embed/configuration/#hook-files_1) for information on file formatting.
| Variable | Type | Description |
| :------- | :---- | :---------- |
| `EXTERNAL_HOOK_FILES` | String | Files containing external hooks. Provide multiple files as a colon-separated list ("`:`"). |

View File

@ -0,0 +1,20 @@
---
title: External secrets environment variables
description: Configure the interval for checking updates to external secrets in self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# External secrets environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
You can use an external secrets store to manage credentials for n8n. Refer to [External secrets](/external-secrets/) for details.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_EXTERNAL_SECRETS_UPDATE_INTERVAL` | Number | `300` (5 minutes) | How often (in seconds) to check for secret updates. |

View File

@ -0,0 +1,22 @@
---
title: Environment Variables Overview
description: An overview of configuration environment variables for self-hosted n8n.
contentType: overview
tags:
- environment variables
hide:
- toc
- tags
---
# Environment variables overview
This section lists of environment variables that you can use to change n8n's configuration settings when self-hosting n8n.
/// note | File-based configuration
You can provide a [configuration file](/hosting/configuration/configuration-methods/) for n8n. You can also append `_FILE` to certain variables to provide their configuration in a separate file.
///
[[% import "_macros/section-toc.html" as sectionToc %]]
[[ sectionToc.sectionToc(page) ]]

View File

@ -0,0 +1,24 @@
---
title: License environment variables
description: Environment variables to configure license settings in n8n, including options to hide the usage page, manage license activation and auto-renewal settings, and specify the server URL for license retrieval.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# License environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
To enable enterprise features, you need to add your enterprise license key. You can do this through the UI, or using environment variables. Refer to [Enterprise license key](/enterprise-key/) for details.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_HIDE_USAGE_PAGE` | boolean | `false` | Hide the usage and plans page in the app. |
| `N8N_LICENSE_ACTIVATION_KEY` | String | `''` | Activation key to initialize license. Not applicable if the n8n instance was already activated. |
| `N8N_LICENSE_AUTO_RENEW_ENABLED` | Boolean | `true` | Enables (true) or disables (false) autorenewal for licenses. |
| `N8N_LICENSE_AUTO_RENEW_OFFSET` | Number | `60 * 60 * 72` (72 hours) | Time in seconds before expiry a license should automatically renew. |
| `N8N_LICENSE_SERVER_URL` | String | `http://license.n8n.io/v1` | Server URL to retrieve license. |

View File

@ -0,0 +1,42 @@
---
title: Logs environment variables
description: Environment variables to configure logging and diagnostic data.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Logs environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
This page lists environment variables to set up logging for debugging. Refer to [Logging in n8n](/hosting/logging-monitoring/logging/) for details.
## n8n logs
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_LOG_LEVEL` | Enum string: `info`, `warn`, `error`, `verbose`, `debug` | `info` | Log output level. Refer to [Log levels](/hosting/logging-monitoring/logging/#log-levels) for details. |
| `N8N_LOG_OUTPUT` | Enum string: `console`, `file` | `console` | Where to output logs. Provide multiple values as a comma-separated list. |
| `N8N_LOG_FILE_COUNT_MAX` | Number | `100` | Max number of log files to keep. |
| `N8N_LOG_FILE_SIZE_MAX` | Number | `16` | Max size of each log file in MB. |
| `N8N_LOG_FILE_LOCATION` | String | `<n8n-directory-path>/logs/n8n.log` | Log file location. Requires N8N_LOG_OUTPUT set to `file`. |
| `DB_LOGGING_ENABLED` | Boolean | `false` | Whether to enable database-specific logging. |
| `DB_LOGGING_OPTIONS` | Enum string: `query`, `error`, `schema`, `warn`, `info`, `log` | `error` | Database log output level. To enable all logging, specify `all`. Refer to [TypeORM logging options](https://orkhan.gitbook.io/typeorm/docs/logging#logging-options){:target=_blank .external-link} |
| `DB_LOGGING_MAX_EXECUTION_TIME` | Number | `1000` | Maximum execution time (in milliseconds) before n8n logs a warning. Set to `0` to disable long running query warning. |
## Log streaming
Refer to [Log streaming](/log-streaming/) for more information on this feature.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_EVENTBUS_CHECKUNSENTINTERVAL` | Number | `0` | How often (in milliseconds) to check for unsent event messages. Can in rare cases send message twice. Set to `0` to disable it. |
| `N8N_EVENTBUS_LOGWRITER_SYNCFILEACCESS` | Boolean | `false` | Whether all file access happens synchronously within the thread (true) or not (false). |
| `N8N_EVENTBUS_LOGWRITER_KEEPLOGCOUNT` | Number | `3` | Number of event log files to keep. |
| `N8N_EVENTBUS_LOGWRITER_MAXFILESIZEINKB` | Number | `10240` | Maximum size (in kilo-bytes) of an event log file before a new one starts. |
| `N8N_EVENTBUS_LOGWRITER_LOGBASENAME` | String | `n8nEventLog` | Basename of the event log file. |

View File

@ -0,0 +1,26 @@
---
title: Nodes environment variables
description: Environment variable to configure nodes management in self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Nodes environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
This page lists the environment variables configuration options for managing nodes in n8n, including specifying which nodes to load or exclude, importing built-in or external modules in the Code node, and enabling community nodes.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `NODES_INCLUDE` | Array of strings | - | Specify which nodes to load. |
| `NODES_EXCLUDE` | Array of strings | - | Specify which nodes not to load. For example, to block nodes that can be a security risk if users aren't trustworthy: `NODES_EXCLUDE: "[\"n8n-nodes-base.executeCommand\", \"n8n-nodes-base.filesreadwrite\"]"` |
| `NODE_FUNCTION_ALLOW_BUILTIN` | String | - | Permit users to import specific built-in modules in the Code node. Use * to allow all. n8n disables importing modules by default. |
| `NODE_FUNCTION_ALLOW_EXTERNAL` | String | - | Permit users to import specific external modules (from `n8n/node_modules`) in the Code node. n8n disables importing modules by default. |
| `NODES_ERROR_TRIGGER_TYPE` | String | `n8n-nodes-base.errorTrigger` | Specify which node type to use as Error Trigger. |
| `N8N_CUSTOM_EXTENSIONS` | String | - | Specify the path to directories containing your custom nodes. |
| `N8N_COMMUNITY_PACKAGES_ENABLED` | Boolean | `true` | Enables (true) or disables (false) community nodes. |

View File

@ -0,0 +1,46 @@
---
title: Queue mode environment variables
description: Environment variables to configure queue mode on your self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Queue mode environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
You can run n8n in different modes depending on your needs. Queue mode provides the best scalability. Refer to [Queue mode](/hosting/scaling/queue-mode/) for more information.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `QUEUE_BULL_PREFIX` | String | - | Prefix to use for all queue keys. |
| `QUEUE_BULL_REDIS_DB` | Number | `0` | The Redis database used. |
| `QUEUE_BULL_REDIS_HOST` | String | `localhost` | The Redis host. |
| `QUEUE_BULL_REDIS_PORT` | Number | `6379` | The Redis port used. |
| `QUEUE_BULL_REDIS_USERNAME` | String | - | The Redis username (needs Redis version 6 or above). Don't define it for Redis < 6 compatibility |
| `QUEUE_BULL_REDIS_PASSWORD` | String | - | The Redis password. |
| `QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD` | Number | `10000` | The Redis timeout threshold (in ms). |
| `QUEUE_BULL_REDIS_CLUSTER_NODES` | String | - | Expects a comma-separated list of Redis Cluster nodes in the format `host:port`, for the Redis client to initially connect to. If running in queue mode (`EXECUTIONS_MODE = queue`), setting this variable will create a Redis Cluster client instead of a Redis client, and n8n will ignore `QUEUE_BULL_REDIS_HOST` and `QUEUE_BULL_REDIS_PORT`. |
| `QUEUE_BULL_REDIS_TLS` | Boolean | `false` | Enable TLS on Redis connections. |
| `QUEUE_RECOVERY_INTERVAL` | Number | `60` | Interval (in seconds) for active polling to the queue to recover from Redis crashes. `0` disables recovery. May increase Redis traffic. |
| `QUEUE_WORKER_TIMEOUT` (**deprecated**) | Number | `30` | **Deprecated** Use `N8N_GRACEFUL_SHUTDOWN_TIMEOUT` instead.<br/><br/>How long should n8n wait (seconds) for running executions before exiting worker process on shutdown. |
| `QUEUE_HEALTH_CHECK_ACTIVE` | Boolean | `false` | Whether to enable health checks (true) or disable (false). |
| `QUEUE_HEALTH_CHECK_PORT` | Number | - | The port to serve health checks on. |
| `QUEUE_WORKER_LOCK_DURATION` | Number | `30000` | How long (in ms) is the lease period for a worker to work on a message. |
| `QUEUE_WORKER_LOCK_RENEW_TIME` | Number | `15000` | How frequently (in ms) should a worker renew the lease time. |
| `QUEUE_WORKER_STALLED_INTERVAL` | Number | `30000` | How often should a worker check for stalled jobs (use 0 for never). |
| `QUEUE_WORKER_MAX_STALLED_COUNT` | Number | `1` | Maximum amount of times a stalled job will be re-processed. |
## Multi-main setup
Refer to [Configuring multi-main setup](/hosting/scaling/queue-mode/#configuring-multi-main-setup) for details.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_MULTI_MAIN_SETUP_ENABLED` | Boolean | `false` | Whether to enable multi-main setup for queue mode (license required). |
| `N8N_MULTI_MAIN_SETUP_KEY_TTL` | Number | `10` | Time to live (in seconds) for leader key in multi-main setup. |
| `N8N_MULTI_MAIN_SETUP_CHECK_INTERVAL` | Number | `3` | Interval (in seconds) for leader check in multi-main setup. |

View File

@ -0,0 +1,18 @@
---
title: Security environment variables
description: Configure authentication and environment variable access in self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Security environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_BLOCK_ENV_ACCESS_IN_NODE` | Boolean | `false` | Whether to allow users to access environment variables in expressions and the Code node (false) or not (true). |

View File

@ -0,0 +1,20 @@
---
title: Source control environment variables
description: Environment variable to set the default SSH key type for source control setup.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Source control environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
n8n uses Git-based source control to support environments. Refer to [Source control and environments](/source-control-environments/setup/) for more information on how to link a Git repository to an n8n instance and configure your source control.
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `N8N_SOURCECONTROL_DEFAULT_SSH_KEY_TYPE` | String | `ed25519` | Set to `rsa` to make RSA the default SSH key type for [Source control setup](/source-control-environments/setup/). |

View File

@ -0,0 +1,19 @@
---
title: Timezone and localization environment variables
description: Set the timezone and default language locale for self-hosted n8n instance.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Timezone and localization environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `GENERIC_TIMEZONE` | * | `America/New_York` |The n8n instance timezone. Important for schedule nodes (such as Cron). |
| `N8N_DEFAULT_LOCALE` | String | `en` | A locale identifier, compatible with the [Accept-Language header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language){:target="_blank" .external-link}. n8n doesn't support regional identifiers, such as `de-AT`. When running in a locale other than the default, n8n displays UI strings in the selected locale, and falls back to `en` for any untranslated strings. |

View File

@ -0,0 +1,37 @@
---
title: User management SMTP, and two-factor authentication environment variables
description: Environment variables to set up user management and emails.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# User management SMTP, and two-factor authentication environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
Refer to [User management](/hosting/configuration/user-management-self-hosted/) for more information on setting up user management and emails.
<!-- vale off -->
| Variable | Type | Default | Description |
| :------- | :--- | :------ | :---------- |
| `N8N_EMAIL_MODE` | String | `smtp` | Enable emails. |
| `N8N_SMTP_HOST` | String | - | _your_SMTP_server_name_ |
| `N8N_SMTP_PORT` | Number | - | _your_SMTP_server_port_ |
| `N8N_SMTP_USER` | String | - | _your_SMTP_username_ |
| `N8N_SMTP_PASS` | String | - | _your_SMTP_password_ |
| `N8N_SMTP_OAUTH_SERVICE_CLIENT` | String | - | If using 2LO with a service account this is your client ID |
| `N8N_SMTP_OAUTH_PRIVATE_KEY` | String | - | If using 2LO with a service account this is your private key |
| `N8N_SMTP_SENDER` | String | - | Sender email address. You can optionally include the sender name. Example with name: _N8N `<contact@n8n.com>`_ |
| `N8N_SMTP_SSL` | Boolean | `true` | Whether to use SSL for SMTP (true) or not (false). |
| `N8N_UM_EMAIL_TEMPLATES_INVITE` | String | - | Full path to your HTML email template. This overrides the default template for invite emails. |
| `N8N_UM_EMAIL_TEMPLATES_PWRESET` | String | - | Full path to your HTML email template. This overrides the default template for password reset emails. |
| `N8N_UM_EMAIL_TEMPLATES_WORKFLOW_SHARED` | String | - | Overrides the default HTML template for notifying users that a workflow was shared. Provide the full path to the template. |
| `N8N_UM_EMAIL_TEMPLATES_CREDENTIALS_SHARED` | String | - | Overrides the default HTML template for notifying users that a credential was shared. Provide the full path to the template. |
| `N8N_USER_MANAGEMENT_JWT_SECRET` | String | - | Set a specific JWT secret. By default, n8n generates one on start. |
| `N8N_USER_MANAGEMENT_JWT_DURATION_HOURS` | Number | 168 | Set an expiration date for the JWTs in hours. |
| `N8N_USER_MANAGEMENT_JWT_REFRESH_TIMEOUT_HOURS` | Number | 0 | How many hours before the JWT expires to automatically refresh it. 0 means 25% of `N8N_USER_MANAGEMENT_JWT_DURATION_HOURS`. -1 means it will never refresh, which forces users to log in again after the period defined in `N8N_USER_MANAGEMENT_JWT_DURATION_HOURS`. |
| `N8N_MFA_ENABLED` | Boolean | `true` | Whether to enable two-factor authentication (true) or disable (false). n8n ignores this if existing users have 2FA enabled. |
<!-- vale on -->

View File

@ -0,0 +1,21 @@
---
title: Workflows environment variables
description: Environment variables to configure workflows in n8n, including default naming, onboarding flow preferences, tag management, and caller policy settings.
contentType: reference
tags:
- environment variables
hide:
- toc
- tags
---
# Workflows environment variables
--8<-- "_snippets/self-hosting/file-based-configuration.md"
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
| `WORKFLOWS_DEFAULT_NAME` | String | `My workflow` | The default name used for new workflows. |
| `N8N_ONBOARDING_FLOW_DISABLED` | Boolean | `false` | Whether to disable onboarding tips when creating a new workflow (true) or not (false). |
| `N8N_WORKFLOW_TAGS_DISABLED` | Boolean | `false` | Whether to disable workflow tags (true) or enable tags (false). |
| `N8N_WORKFLOW_CALLER_POLICY_DEFAULT_OPTION` | String | `workflowsFromSameOwner` | Which workflows can call a workflow. Options are: `any`, `none`, `workflowsFromAList`, `workflowsFromSameOwner`. This feature requires [Workflow sharing](/workflows/sharing/). |

View File

@ -47,7 +47,7 @@ If no directory is found, n8n creates automatically one on
startup. In this case, existing credentials saved with a different encryption key can not be used anymore.
/// note | Keep in mind
Persisting the `/home/node/.n8n` directory even when using alternate databases is the recommended best practice, but not explicitly required. The encryption key can be provided using the `N8N_ENCRYPTION_KEY` [environment variable](/hosting/configuration/environment-variables/#deployment).
Persisting the `/home/node/.n8n` directory even when using alternate databases is the recommended best practice, but not explicitly required. The encryption key can be provided using the `N8N_ENCRYPTION_KEY` [environment variable](/hosting/configuration/environment-variables/deployment).
///
### PostgresDB

View File

@ -49,7 +49,7 @@ You should create a new user, to avoid working as the root user:
## Clone configuration repository
Docker Compose, n8n, and Caddy require a series of folders and configuration files. You can clone these from [this repository](https://github.com/n8n-io/n8n-docker-caddy){:target=_blank .external-link} into the root user folder of the Droplet. The following steps will tell you which file to change and what changes to make.
Docker Compose, n8n, and Caddy require a series of folders and configuration files. You can clone these from [this repository](https://github.com/n8n-io/n8n-docker-caddy){:target=_blank .external-link} into the home folder of the logged-in user on your Droplet. The following steps will tell you which file to change and what changes to make.
Clone the repository with the following command:

View File

@ -18,8 +18,8 @@ To set up logging in n8n, you need to set the following environment variables (y
| n8n.log.level | N8N_LOG_LEVEL | The log output level. The available options are (from lowest to highest level) are error, warn, info, verbose, and debug. The default value is `info`. You can learn more about these options [here](#log-levels). |
| n8n.log.output | N8N_LOG_OUTPUT | Where to output logs. The available options are `console` and `file`. Multiple values can be used separated by a comma (`,`). `console` is used by default. |
| n8n.log.file.location | N8N_LOG_FILE_LOCATION | The log file location, used only if log output is set to file. By default, `<n8nFolderPath>/logs/n8n.log` is used. |
| n8n.log.file.maxsize | N8N_LOG_FILE_MAXSIZE | The maximum size (in MB) for each log file. By default, n8n uses 16 MB. |
| n8n.log.file.maxcount | N8N_LOG_FILE_MAXCOUNT | The maximum number of log files to keep. The default value is 100. This value should be set when using workers. |
| n8n.log.file.maxsize | N8N_LOG_FILE_SIZE_MAX | The maximum size (in MB) for each log file. By default, n8n uses 16 MB. |
| n8n.log.file.maxcount | N8N_LOG_FILE_COUNT_MAX | The maximum number of log files to keep. The default value is 100. This value should be set when using workers. |
```bash

View File

@ -52,7 +52,7 @@ This report lists nodes that interact with the file system.
This report shows:
* Official risky nodes. These are n8n built in nodes. You can use them to fetch and run any code on the host system, which exposes the instance to exploits. You can view the list in [n8n code | Audit constants](https://github.com/n8n-io/n8n/blob/master/packages/cli/src/audit/constants.ts){:target=_blank .external-link}, under `OFFICIAL_RISKY_NODE_TYPES`.
* Official risky nodes. These are n8n built in nodes. You can use them to fetch and run any code on the host system, which exposes the instance to exploits. You can view the list in [n8n code | Audit constants](https://github.com/n8n-io/n8n/blob/master/packages/cli/src/security-audit/constants.ts#L51){:target=_blank .external-link}, under `OFFICIAL_RISKY_NODE_TYPES`.
* Community nodes.
* Custom nodes.

View File

@ -10,4 +10,4 @@ Binary data is any file-type data, such as image files or documents.
When handling binary data, n8n keeps the data in memory. This can cause crashes when working with large files.
To avoid this, change the `N8N_DEFAULT_BINARY_DATA_MODE` [environment variable](/hosting/configuration/environment-variables/#binary-data) to `filesystem`. This causes n8n to save data to disk, instead of using memory.
To avoid this, change the `N8N_DEFAULT_BINARY_DATA_MODE` [environment variable](/hosting/configuration/environment-variables/binary-data) to `filesystem`. This causes n8n to save data to disk, instead of using memory.

View File

@ -8,7 +8,7 @@ Depending on your executions settings and volume, your n8n database can quickly
To avoid this, n8n recommends that you don't save unnecessary data, and enable pruning of old executions data.
To do this, configure the corresponding [environment variables](/hosting/configuration/environment-variables/#executions).
To do this, configure the corresponding [environment variables](/hosting/configuration/environment-variables/executions).
## Reduce saved data
@ -93,5 +93,5 @@ n8n:
```
/// note | SQLite
If you run n8n using the default SQLite database, the disk space of any pruned data isn't automatically freed up but rather reused for future executions data. To free up this space configure the `DB_SQLITE_VACUUM_ON_STARTUP` [environment variable](/hosting/configuration/environment-variables/#sqlite) or manually run the [VACUUM](https://www.sqlite.org/lang_vacuum.html){:target=_blank .external-link} operation.
If you run n8n using the default SQLite database, the disk space of any pruned data isn't automatically freed up but rather reused for future executions data. To free up this space configure the `DB_SQLITE_VACUUM_ON_STARTUP` [environment variable](/hosting/configuration/environment-variables/database/#sqlite) or manually run the [VACUUM](https://www.sqlite.org/lang_vacuum.html){:target=_blank .external-link} operation.
///

View File

@ -4,33 +4,41 @@ contentType: howto
# Queue mode
n8n can be run in different modes depending on your needs. The queue mode provides the best scalability, and its configuration is detailed here.
You can run n8n in different modes depending on your needs. The queue mode provides the best scalability.
/// note | Binary data storage
n8n doesn't support queue mode with binary data storage. If your workflows need to persist binary data, you can't use queue mode.
///
/// note | Own mode removed
n8n removed `own` mode in version 1.27.0.
///
## How it works
When running in `queue` mode you have multiple n8n instances set up, with one main instance receiving workflow information (such as triggers) and the worker instances performing the executions.
When running in queue mode, you have multiple n8n instances set up, with one main instance receiving workflow information (such as triggers) and the worker instances performing the executions.
n8n passes the workflow information from the main instance to a message broker, [Redis](#start-redis), which maintains the queue of pending executions and allows the next available worker to pick them up.
Each worker is its own Node.js instance, running in `main` mode, but able to handle multiple simultaneous workflow executions due to their high IOPS (input-output operations per second).
Each worker is its own Node.js instance, running in `main` mode, but able to handle multiple simultaneous workflow executions due to their high IOPS (input-output operations per second).
By using worker instances and running in queue mode, you can scale n8n up (by adding workers) and down (by removing workers) as needed to handle the workload.
This is the process flow:
1. The main n8n instance handles timers and webhook calls, generating (but not running) a workflow execution.
1. It passes the execution ID to a message broker, [Redis](#start-redis), which maintains the queue of pending executions and allows the next available worker to pick them up.
1. A worker in the pool picks up message from Redis.
1. The worker uses the execution ID to get workflow information from the database.
1. After completing the workflow execution, the worker:
- Writes the results to the database.
- Posts to Redis, saying that the execution has finished.
1. Redis notifies the main instance.
!["Diagram showing the flow of data between the main n8n instance, Redis, the n8n workers, and the n8n database"](/_images/hosting/scaling/queue-mode-flow.png)
## Configuring workers
Workers are n8n instances that do the actual work. They receive information from the main n8n process about the workflows that have to get executed, execute the workflows, and update the status after each execution is complete.
### Set encryption key
n8n automatically generates an encryption key upon first startup. You can also provide your own custom key using [environment variable](/hosting/configuration/environment-variables/#deployment) if desired.
n8n automatically generates an encryption key upon first startup. You can also provide your own custom key using [environment variable](/hosting/configuration/environment-variables/deployment) if desired.
The encryption key of the main n8n instance must be shared with all worker and webhooks processor nodes to ensure these worker nodes are able to access credentials stored in the database.
@ -82,9 +90,10 @@ You can also set the following optional configurations:
| `queue.bull.redis.username:USERNAME` | `QUEUE_BULL_REDIS_USERNAME` | By default, Redis doesn't require a username. If you're using a specific user, configure it variable. |
| `queue.bull.redis.password:PASSWORD` | `QUEUE_BULL_REDIS_PASSWORD` | By default, Redis doesn't require a password. If you're using a password, configure it variable. |
| `queue.bull.redis.db:0` | `QUEUE_BULL_REDIS_DB` | The default value is `0`. If you change this value, update the configuration. |
| `queue.bull.redis.timeoutThreshold:10000ms` | `QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD` | Tells n8n how long it should wait if Redis is unavailable before exiting. The default value is `10000ms`. |
| `queue.bull.redis.timeoutThreshold:10000ms` | `QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD` | Tells n8n how long it should wait if Redis is unavailable before exiting. The default value is `10000` (ms). |
| `queue.bull.queueRecoveryInterval:60` | `QUEUE_RECOVERY_INTERVAL` | Adds an active watchdog to n8n that checks Redis for finished executions. This is used to recover when n8n's main process loses connection temporarily to Redis and isn't notified about finished jobs. The default value is `60` seconds. |
| `queue.bull.gracefulShutdownTimeout:30` | `QUEUE_WORKER_TIMEOUT` | A graceful shutdown timeout for workers to finish executing jobs before terminating the process. The default value is `30` seconds. |
| `queue.bull.gracefulShutdownTimeout:30` | `N8N_GRACEFUL_SHUTDOWN_TIMEOUT` | A graceful shutdown timeout for workers to finish executing jobs before terminating the process. The default value is `30` seconds. |
Now you can start your n8n instance and it will connect to your Redis instance.
@ -119,7 +128,7 @@ You can view running workers and their performance metrics in n8n by select **Se
When running n8n with queues, all the production workflow executions get processed by worker processes. This means that even the webhook calls get delegated to the worker processes, which might add some overhead and extra latency. However, the manual workflow executions still use the main process.
Redis is used as the message broker, and the database is used to persist data, so access to both is required. Running a distributed system with this setup over SQLite isn't recommended.
Redis acts as the message broker, and the database persists data, so access to both is required. Running a distributed system with this setup over SQLite isn't supported.
/// note | Migrate data
If you want to migrate data from one database to another, you can use the Export and Import commands. Refer to the [CLI commands for n8n](/hosting/cli-commands/#export-workflows-and-credentials) documentation to learn how to use these commands.
@ -135,7 +144,7 @@ Webhook processors are another layer of scaling in n8n. Configuring the webhook
This method allows n8n to process a huge number of parallel requests. All you have to do is add more webhook processes and workers accordingly. The webhook process will listen to requests on the same port (default: `5678`). Run these processes in containers or separate machines, and have a load balancing system to route requests accordingly.
n8n doesn't recommend adding the main process to the load balancer pool. If the main process is added to the pool, it will receive requests and possibly a heavy load. This will result in degraded performance for editing, viewing, and interacting with the n8n UI.
n8n doesn't recommend adding the main process to the load balancer pool. If you add the main process to the pool, it will receive requests and possibly a heavy load. This will result in degraded performance for editing, viewing, and interacting with the n8n UI.
You can start the webhook processor by executing the following command from the root directory:
@ -184,7 +193,7 @@ When disabling the webhook process in the main process, run the main process and
## Configure worker concurrency
You can define the number of jobs a worker can run in parallel by using the `concurrency` flag. It defaults to `10` but can be changed:
You can define the number of jobs a worker can run in parallel by using the `concurrency` flag. It defaults to `10`. To change it:
```bash
n8n worker --concurrency=5
@ -199,7 +208,7 @@ n8n worker --concurrency=5
In queue mode you can run more than one `main` process for high availability.
Normally, in a single-mode setup, the `main` process is responsible for two sets of tasks:
In a single-mode setup, the `main` process does two sets of tasks:
- **regular tasks**, such as running the API, serving the UI, listening for webhooks, and handling manual executions, and
- **at-most-once tasks**, such as running non-HTTP triggers (timers, pollers, and persistent connections like RabbitMQ and IMAP), and pruning executions and binary data.
@ -211,7 +220,7 @@ In a multi-main setup, there are two kinds of `main` processes:
### Leader designation
In a multi-main setup, all `main` handle the leadership process transparently to users. In case the current leader becomes unavailable, e.g. because it crashed or its event loop became too busy, other followers can take over. If the previous leader becomes responsive again, it becomes a follower.
In a multi-main setup, all main instances handle the leadership process transparently to users. In case the current leader becomes unavailable, for example because it crashed or its event loop became too busy, other followers can take over. If the previous leader becomes responsive again, it becomes a follower.
### Configuring multi-main setup
@ -230,5 +239,5 @@ If needed, you can adjust the leader key options:
| `multiMainSetup.interval:3` | `N8N_MULTI_MAIN_SETUP_CHECK_INTERVAL=3` | Interval (in seconds) for leader check in multi-main setup. |
/// note | Keep in mind
In multi-main setup, all `main` processes listen for webhooks, so they fulfill the same purpose as `webhook` processes. Therefore, running `webhook` processes is neither needed nor allowed in multi-main setup.
In multi-main setup, all `main` processes listen for webhooks, so they fulfill the same purpose as `webhook` processes. Running `webhook` processes is neither needed nor allowed in multi-main setup.
///

View File

@ -17,41 +17,44 @@ Refer to [GitHub credentials](/integrations/builtin/credentials/github/) for gui
For usage examples and templates to help you get started, take a look at n8n's [GitHub integrations](https://n8n.io/integrations/github/){:target="_blank" .external-link} list.
///
## Basic Operations
## Operations
* File
* Create a new file in repository.
* Delete a file in repository.
* Edit a file in repository.
* Get the data of a single file.
* List contents of a folder.
* Create
* Delete
* Edit
* Get
* List
* Issue
* Create a new issue.
* Create a new comment on an issue.
* Edit an issue.
* Get the data of a single issue.
* Lock an issue.
* Repository
* Get the data of a single repository.
* Returns the contents of the repository's license file, if one is detected.
* Returns issues of a repository.
* Get the community profile of a repository with metrics, health score, description, license, etc.
* Get the top 10 popular content paths over the last 14 days.
* Get the top 10 referring domains over the last 14 days.
* Create
* Create Comment
* Edit
* Get
* Lock
* Organization
* Get Repositories
* Release
* Creates a new release.
* Get a release.
* Get all repository releases.
* Delete a release.
* Update a release.
* Create
* Delete
* Get
* Get Many
* Update
* Repository
* Get
* Get Issues
* Get License
* Get Profile
* Get Pull Requests
* List Popular Paths
* List Referrers
* Review
* Creates a new review.
* Get a review for a pull request.
* Get all reviews for a pull request.
* Update a review.
* Create
* Get
* Get Many
* Update
* User
* Returns the repositories of a user.
* Invites a user to an organization.
* Get Repositories
* Invite
--8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

View File

@ -0,0 +1,34 @@
---
title: Embeddings Google Gemini
description: Documentation for the Embeddings Google Gemini node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
---
# Embeddings Google Gemini
Use the Embeddings Google Gemini node to generate embeddings for a given text.
On this page, you'll find the node parameters for the Embeddings Google Gemini node, and links to more resources.
/// note | Credentials
You can find authentication information for this node [here](/integrations/builtin/credentials/google/googleai/).
///
/// note | Examples and templates
For usage examples and templates to help you get started, refer to n8n's [Google Gemini Embeddings integrations](https://n8n.io/integrations/embeddings-google-gemini/){:target=_blank .external-link} page.
///
--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"
## Node parameters
**Model**: the model to use to generate the embedding. Learn more about available models in [Google Gemini's models documentation](https://ai.google.dev/models/gemini){:target=_blank .external-link}.
## Related resources
View [example workflows and related content](https://n8n.io/integrations/embeddings-google-gemini/){:target=_blank .external-link} on n8n's website.
Refer to [Langchain's Google Generative AI embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/google_generativeai){:target=_blank .external-link} for more information about the service.
--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
--8<-- "_glossary/ai-glossary.md"

View File

@ -10,7 +10,7 @@ Use the Embeddings Google PaLM node to generate embeddings for a given text.
On this page, you'll find the node parameters for the Embeddings Google PaLM node, and links to more resources.
/// note | Credentials
You can find authentication information for this node [here](/integrations/builtin/credentials/google/googlepalm/).
You can find authentication information for this node [here](/integrations/builtin/credentials/google/googleai/).
///
/// note | Examples and templates

View File

@ -0,0 +1,42 @@
---
title: Google Gemini Chat Model
description: Documentation for the Google Gemini Chat Model node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
---
# Google Gemini Chat Model
Use the Google Gemini Chat Model node to use Google's Gemini chat models with conversational agents.
On this page, you'll find the node parameters for the Google Gemini Chat Model node, and links to more resources.
/// note | Credentials
You can find authentication information for this node [here](/integrations/builtin/credentials/google/googleai/).
///
/// note | Examples and templates
For usage examples and templates to help you get started, refer to n8n's [Google Gemini Chat Model integrations](https://n8n.io/integrations/google-gemini-chat-model/){:target=_blank .external-link} page.
///
--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"
## Node parameters
**Model**: the model to use to generate the completion. n8n dynamically loads models from the Google Gemini API and you will only see the models available to your account.
## Node options
* **Maximum Number of Tokens**: change the maximum possible length of the completion.
* **Sampling Temperature**: controls the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.
* **Top K**: the number of token choices the model uses to generate the next token.
* **Top P**: use a lower value to ignore less probable options.
* **Safety Settings**: Gemini supports adjustable safety settings. Refer to Google's [Gemini API safety settings](https://ai.google.dev/docs/safety_setting_gemini){:target=_blank .external-link} for information on the available filters and levels.
## Related resources
View [example workflows and related content](https://n8n.io/integrations/google-gemini-chat-model/){:target=_blank .external-link} on n8n's website.
Refer to [LangChain's Google Gemini documentation](https://js.langchain.com/docs/integrations/chat/google_generativeai){:target=_blank .external-link} for more information about the service.
--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
--8<-- "_glossary/ai-glossary.md"

View File

@ -10,7 +10,7 @@ Use the Google PaLM Chat Model node to use Google's PaLM chat models with conver
On this page, you'll find the node parameters for the Google PaLM Chat Model node, and links to more resources.
/// note | Credentials
You can find authentication information for this node [here](/integrations/builtin/credentials/google/googlepalm/).
You can find authentication information for this node [here](/integrations/builtin/credentials/google/googleai/).
///
/// note | Examples and templates

View File

@ -10,7 +10,7 @@ Use the Google PaLM Language Model node to use Google's PaLM models.
On this page, you'll find the node parameters for the Google PaLM Language Model node, and links to more resources.
/// note | Credentials
You can find authentication information for this node [here](/integrations/builtin/credentials/google/googlepalm/).
You can find authentication information for this node [here](/integrations/builtin/credentials/google/googleai/).
///
/// note | Examples and templates

View File

@ -11,21 +11,20 @@ On this page, you'll find a list of operations the Window Buffer Memory node sup
/// note | Examples and templates
For usage examples and templates to help you get started, refer to n8n's [Window Buffer Memory integrations](https://n8n.io/integrations/window-buffer-memory/){:target=_blank .external-link} page.
///
///
--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"
## Node parameters
* **Session Key**: the key to use to store the memory in the workflow data.
* **Context Window Length**: the number of previous messages to consider for context.
- **Session Key**: the key to use to store the memory in the workflow data.
- **Context Window Length**: the number of previous messages to consider for context.
## Related resources
View [example workflows and related content](https://n8n.io/integrations/window-buffer-memory/){:target=_blank .external-link} on n8n's website.
Refer to [LangChain's Buffer Window Memory documentation](https://js.langchain.com/docs/modules/memory/how_to/buffer_window_memory){:target=_blank .external-link} for more information about the service.
Refer to [LangChain's Buffer Window Memory documentation](https://js.langchain.com/docs/modules/memory/types/buffer_window){:target=_blank .external-link} for more information about the service.
--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
--8<-- "_glossary/ai-glossary.md"

View File

@ -10,7 +10,7 @@ The Chat Memory Manager node manages chat message memories within your workflows
On this page, you'll find a list of operations that the Chat Memory Manager node supports, along with links to more resources.
/// note | Examples and templates
For usage examples and templates to help you get started, refer to n8n's [Chat Memory Manager integrations](https://n8n.io/integrations/chat-messages-manager/){:target=_blank .external-link} page.
For usage examples and templates to help you get started, refer to n8n's [Chat Memory Manager integrations](https://n8n.io/integrations/chat-memory-manager/){:target=_blank .external-link} page.
///
--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"
@ -18,16 +18,11 @@ For usage examples and templates to help you get started, refer to n8n's [Chat M
## Node parameters
* **Operation Mode**: choose between **Get Many Messages**, **Insert Messages**, and **Delete Messages** operations.
* **Insert Mode**: available in **Insert Messages** mode. Choose between **Insert Messages** to add alongside existing messages or **Override All Messages** to replace current memory.
**Delete Mode**: available in **Delete Messages** mode. Select either **Last N** to delete the last N messages or **All Messages** to clear all messages from memory.
**Chat Messages**: available in **Insert Messages** mode. Define the chat messages to insert into the memory, including message type (AI, System, User), message content, and visibility in UI.
**Messages Count**: available in **Delete Messages** mode and when **Last N** is selected. Specify the number of latest messages to delete.
**Simplify Output**: available in **Get Many Messages** mode. Toggle to simplify the output to include only the sender (AI, user, or system) and the text.
* **Delete Mode**: available in **Delete Messages** mode. Select either **Last N** to delete the last N messages or **All Messages** to clear all messages from memory.
* **Chat Messages**: available in **Insert Messages** mode. Define the chat messages to insert into the memory, including message type (AI, System, User), message content, and visibility in UI.
* **Messages Count**: available in **Delete Messages** mode and when **Last N** is selected. Specify the number of latest messages to delete.
* **Simplify Output**: available in **Get Many Messages** mode. Toggle to simplify the output to include only the sender (AI, user, or system) and the text.
## Related resources

View File

@ -12,6 +12,10 @@ When using this node, you're creating a REST API call. You need some understandi
There are two ways to create an HTTP request: configure the [node fields](#node-fields) or [import a curl command](#import-curl-command).
/// note | Credentials
Refer to [HTTP Request credentials](/integrations/builtin/credentials/httprequest/) for guidance on setting up authentication.
///
/// note | Examples and templates
For usage examples and templates to help you get started, refer to n8n's [HTTP Request integrations](https://n8n.io/integrations/http-request/){:target=_blank .external-link} page.
///

View File

@ -0,0 +1,23 @@
---
title: JWT
description: Documentation for the JWT node in n8n, a workflow automation platform. Includes guidance on usage, and links to examples.
contentType: integration
---
# JWT
Work with JSON web tokens in your n8n workflows.
/// note | Credentials
You can find authentication information for this node [here](/integrations/builtin/credentials/jwt/).
///
/// note | Examples and templates
For usage examples and templates to help you get started, refer to n8n's [JWT integrations](https://n8n.io/integrations/jwt/){:target=_blank .external-link} page.
///
## Operations
* Decode
* Sign
* Verify

View File

@ -0,0 +1,25 @@
---
title: Google AI credentials
description: Documentation for the Google AI credentials. Use these credentials to authenticate Google AI nodes in n8n, a workflow automation platform.
---
# Google AI credentials
You can use these credentials to authenticate the following nodes:
* [Embeddings Google Gemini](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsgooglegemini/)
* [Google Gemini Chat Model](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglegemini/)
* [Embeddings Google PaLM](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsgooglepalm/)
* [Google PaLM Chat Model](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglepalm/)
* [Google PaLM Language Model](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmgooglepalm/)
## Prerequisites
You need an API key and the API host URL.
## Related resources
Refer to [Google's documentation](https://developers.generativeai.google/tutorials/setup){:target=_blank .external-link} for more information about the service.
--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"

View File

@ -1,23 +0,0 @@
---
title: Google PaLM credentials
description: Documentation for the Cohere credentials. Use these credentials to authenticate Cohere in n8n, a workflow automation platform.
---
# Cohere credentials
You can use these credentials to authenticate the following nodes:
* [Embeddings Google PaLM](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsgooglepalm/)
* [Google PaLM Chat Model](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglepalm/)
* [Google PaLM Language Model](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmgooglepalm/)
## Prerequisites
You need an API key and the API host URL.
## Related resources
Refer to [Google PaLM's documentation](https://developers.generativeai.google/tutorials/setup){:target=_blank .external-link} for more information about the service.
--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"

View File

@ -11,7 +11,7 @@ This section contains:
* [OAuth2 single service](/integrations/builtin/credentials/google/oauth-single-service/): create an OAuth2 credential for a specific service node, such as the Gmail node.
* [OAuth2 generic](/integrations/builtin/credentials/google/oauth-generic/): create an OAuth2 credential for use with [custom operations](/integrations/custom-operations/).
* [Service Account](/integrations/builtin/credentials/google/service-account/): create a Service Account credential.
* [Google PaLM](/integrations/builtin/credentials/google/googlepalm/): get your API key to work with Google PaLM nodes.
* [Google PaLM and Gemini](/integrations/builtin/credentials/google/googleai/): get your API key to work with Google PaLM and Google Gemini nodes.
## OAuth2 and Service Account

View File

@ -8,11 +8,17 @@ contentType: integration
This document contains instructions for creating a Google credential for a single service. They're also available as a [video](#video).
## Prerequisites
* [Google Cloud](https://cloud.google.com/){:targe=_blank .external-link} account
* [Google Cloud Platform project](https://developers.google.com/workspace/marketplace/create-gcp-project){:targe=_blank .external-link}
* If you haven't used OAuth in your Google Cloud project before, you need to [configure the OAuth consent screen](https://developers.google.com/workspace/guides/configure-oauth-consent){:target=_blank .external-link}.
* If using Google Perspective: [Request API Access](https://developers.perspectiveapi.com/s/docs-get-started){:targe=_blank .external-link}
* If using Google Ads: [Developer Token](https://developers.google.com/google-ads/api/docs/first-call/dev-token){:targe=_blank .external-link}
## Set up OAuth
You need a [Google Cloud Platform project](https://developers.google.com/workspace/marketplace/create-gcp-project){:targe=_blank .external-link} for these steps.
In Google Cloud:
1. Go to [Google Cloud Console | APIs and services](https://console.cloud.google.com/apis/credentials){:target=_blank .external-link} and make sure you're in the project you want to use.

View File

@ -82,4 +82,48 @@ Read more about [OAuth1](https://oauth.net/1/){:target=_blank .external-link}.
Read more about [OAuth2](https://oauth.net/2/){:target=_blank .external-link}.
## Using Custom Auth
The **Generic Auth Type** > **Custom Auth** option expects JSON data to define your credential. You can use `headers`, `qs`, `body` or a mix. See the examples below to get started.
### Sending two headers
```
{
"headers": {
"X-AUTH-USERNAME": "username",
"X-AUTH-PASSWORD": "password"
}
}
```
### Body
```
{
"body" : {
"user": "username",
"pass": "password"
}
}
```
### Query string
```
{
"qs": {
"appid": "123456",
"apikey": "my-api-key"
}
}
```
### Sending header and query string
```
{
"headers": {
"api-version": "202404"
},
"qs": {
"apikey": "my-api-key"
}
}
```

View File

@ -0,0 +1,24 @@
---
title: JWT credentials
description: Documentation for the JWT credentials. Use these credentials to authenticate JWT in n8n, a workflow automation platform.
---
# JWT credentials
You can use these credentials to authenticate the following nodes:
[JWT](/integrations/builtin/core-nodes/n8n-nodes-base.jwt/)
## Supported authentication methods
You can use a passphrase or a PEM key.
## Related resources
Refer to the [JWT website](https://jwt.io/introduction){:target=_blank .external-link} for more information about working with JWTs.

View File

@ -9,6 +9,7 @@ contentType: integration
You can use these credentials to authenticate the following nodes with Twilio.
- [Twilio](/integrations/builtin/app-nodes/n8n-nodes-base.twilio/)
- [Twilio trigger](/integrations/builtin/trigger-nodes/n8n-nodes-base.twiliotrigger/)
## Prerequisites

View File

@ -30,7 +30,7 @@ There are two ways to handle rate limits in n8n's integrations: using the Retry
When you enable Retry On Fail, the node automatically tries the request again if it fails the first time.
1. Open the node.
1. Select **Settings** <span class="inline-image">![Settings icon](/_images/common-icons/settings.png)</span>.
1. Select **Settings** <span class="inline-image">![Settings icon](/_images/common-icons/settings.png){.off-glb}</span>.
1. Enable the **Retry On Fail** toggle.
1. Configure the retry settings: if using this to work around rate limits, set **Wait Between Tries (ms)** to more than the rate limit. For example, if the API you're using allows one request per second, set **Wait Between Tries (ms)** to `1000` to allow a 1 second wait.

View File

@ -0,0 +1,34 @@
---
title: Twilio trigger
description: Documentation for the Twilio trigger node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
---
# Twilio trigger
Use the Twilio trigger node to respond to events in Twilio and integrate Twilio with other applications. n8n has built-in support for a wide range of Twilio events.
On this page, you'll find a list of events the Twilio trigger node can respond to, and links to more resources.
/// note | Credentials
You can find authentication information for this node [here](/integrations/builtin/credentials/twilio/).
///
/// note | Examples and templates
For usage examples and templates to help you get started, refer to n8n's [Twilio integrations](https://n8n.io/integrations/twilio-trigger/){:target=_blank .external-link} page.
///
## Events
* On New SMS
* On New Call
/// note | New Call Delay
It can take Twilio up to thirty minutes to generate a summary for a completed call.
///
## Related resources
n8n provides an app node for Twilio. You can find the node docs [here](/integrations/builtin/app-nodes/n8n-nodes-base.twilio/).
View [example workflows and related content](https://n8n.io/integrations/twilio/){:target=_blank .external-link} on n8n's website.
Refer to [Twilio's documentation](https://www.twilio.com/docs){:target=_blank .external-link} for details about their API.

View File

@ -34,7 +34,7 @@ n8n maintains a blocklist of community nodes that it prevents you from installin
To uninstall a community node:
1. Go to **Settings** > **Community nodes**.
2. On the node you want to install, select **Options** <span class="inline-image">![Three dots options menu](/_images/common-icons/three-dot-options-menu.png)</span>.
2. On the node you want to install, select **Options** <span class="inline-image">![Three dots options menu](/_images/common-icons/three-dot-options-menu.png){.off-glb}</span>.
3. Select **Uninstall package**.
4. Select **Uninstall Package** in the confirmation modal.

View File

@ -8,7 +8,7 @@ To use community nodes, you first need to [install](/integrations/community-node
## Adding community nodes to your workflow
After installing a community node, you can use it like any other node. n8n displays the node in search results in the **Nodes** panel. n8n marks community nodes with a **Package** <span class="inline-image">![Package icon](/_images/common-icons/package.png)</span> icon in the nodes panel.
After installing a community node, you can use it like any other node. n8n displays the node in search results in the **Nodes** panel. n8n marks community nodes with a **Package** <span class="inline-image">![Package icon](/_images/common-icons/package.png){.off-glb}</span> icon in the nodes panel.
## Community nodes with duplicate names

View File

@ -21,7 +21,7 @@ The credentials file follows this basic structure:
```js
import {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
@ -38,23 +38,23 @@ export class ExampleNode implements ICredentialType {
default: '',
},
];
authenticate = {
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
// Can be body, header, or qs
// Can be body, header, qs or auth
qs: {
// Use the value from `apiKey` above
// Use the value from `apiKey` above
'api_key': '={{$credentials.apiKey}}'
}
},
} as IAuthenticateGeneric;
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials?.domain}}',
url: '/bearer',
},
};
};
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials?.domain}}',
url: '/bearer',
},
};
}
```
@ -84,7 +84,7 @@ Each object contains:
### `authenticate`
Object. Contains objects that tell n8n how to inject the authentication data as part of the API request.
* `authenticate`: Object. Contains objects that tell n8n how to inject the authentication data as part of the API request.
#### `type`
@ -94,10 +94,65 @@ String. If you're using an authentication method that sends data in the header,
Object. Defines the authentication methods. Options are:
* `body`: object. Sends authentication data in the request body. Can contain nested objects.
* `header`: object. Send authentication data in the request header.
* `qs`: object. Stands for "query string." Send authentication data in the request query string.
* `body`: Object. Sends authentication data in the request body. Can contain nested objects.
```typescript
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
body: {
username: '={{$credentials.username}}',
password: '={{$credentials.password}}',
},
},
};
```
* `header`: Object. Send authentication data in the request header.
```typescript
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
header: {
Authorization: '=Bearer {{$credentials.authToken}}',
},
},
};
```
* `qs`: Object. Stands for "query string." Send authentication data in the request query string.
```typescript
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
qs: {
token: '={{$credentials.token}}',
},
},
};
```
* `auth`: Object. Used for Basic Auth. Requires `username` and `password` as the key names.
```typescript
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
auth: {
username: '={{$credentials.username}}',
password: '={{$credentials.password}}',
},
},
};
```
### `test`
Provide a `request` object containing a URL and authentication type that n8n can use to test the credential.
```typescript
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials?.domain}}',
url: '/bearer',
},
};
```

View File

@ -23,7 +23,7 @@ To use log streaming, you have to add a streaming destination.
6. Select **Save**.
/// note | Self-hosted users
If you self-host n8n, you can configure additional log streaming behavior using [Environment variables](/hosting/configuration/environment-variables/#log-streaming).
If you self-host n8n, you can configure additional log streaming behavior using [Environment variables](/hosting/configuration/environment-variables/logs/#log-streaming).
///
## Events
@ -48,6 +48,8 @@ The following events are available. You can choose which events to stream in **S
* User reset
* User credentials created
* User credentials shared
* User credentials updated
* User credentials deleted
* User API created
* User API deleted
* Package installed

Some files were not shown because too many files have changed in this diff Show More