diff --git a/_snippets/self-hosting/installation/latest-next-version.md b/_snippets/self-hosting/installation/latest-next-version.md
index 29a91dcbb..25515ecd3 100644
--- a/_snippets/self-hosting/installation/latest-next-version.md
+++ b/_snippets/self-hosting/installation/latest-next-version.md
@@ -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.38.2
-Current `next`: 1.39.1
+Current `latest`: 1.39.1
+Current `next`: 1.40.0
///
diff --git a/docs/_images/workflows/export-import/selectingnodes.gif b/docs/_images/workflows/export-import/selectingnodes.gif
index 899dd14f9..bf41e4ac7 100644
Binary files a/docs/_images/workflows/export-import/selectingnodes.gif and b/docs/_images/workflows/export-import/selectingnodes.gif differ
diff --git a/docs/hosting/configuration/environment-variables/ai.md b/docs/hosting/configuration/environment-variables/ai.md
new file mode 100644
index 000000000..c5d85ae32
--- /dev/null
+++ b/docs/hosting/configuration/environment-variables/ai.md
@@ -0,0 +1,21 @@
+---
+title: AI environment variables
+description: Manage AI features in your n8n instance.
+contentType: reference
+tags:
+ - environment variables
+hide:
+ - toc
+ - tags
+---
+
+# AI environment variables
+
+--8<-- "_snippets/self-hosting/file-based-configuration.md"
+
+| Variable | Type | Default | Description |
+| :------- | :---- | :------- | :---------- |
+| `N8N_AI_ENABLED` | Boolean | `false` | Whether AI features are enabled (true) or not (false). Enables Ask AI for the code node and HTTP node. |
+| `N8N_AI_PROVIDER` | String | `openai` | The AI provider to use. Currently, n8n only supports OpenAI. |
+| `N8N_AI_OPENAI_API_KEY` | String | - | Your OpenAI API key. |
+
diff --git a/docs/hosting/configuration/environment-variables/database.md b/docs/hosting/configuration/environment-variables/database.md
index ae6687440..21447aeaf 100644
--- a/docs/hosting/configuration/environment-variables/database.md
+++ b/docs/hosting/configuration/environment-variables/database.md
@@ -26,12 +26,12 @@ This page outlines environment variables to configure your chosen database for y
| Variable | Type | Default | Description |
| :------- | :---- | :------- | :---------- |
-| `DB_POSTGRESDB_DATABASE`
/`_FILE` | String | `n8n` | The name of the PostgreSQL database. Default value is `n8n`. |
-| `DB_POSTGRESDB_HOST`
/`_FILE` | String | `localhost` | The PostgreSQL host. Default value is `localhost`. |
-| `DB_POSTGRESDB_PORT`
/`_FILE` | Number | `5432` | The PostgreSQL port. Default value is `5432`. |
-| `DB_POSTGRESDB_USER`
/`_FILE` | String | `root` | The PostgreSQL user. Default value is `root`. |
+| `DB_POSTGRESDB_DATABASE`
/`_FILE` | String | `n8n` | The name of the PostgreSQL database. |
+| `DB_POSTGRESDB_HOST`
/`_FILE` | String | `localhost` | The PostgreSQL host. |
+| `DB_POSTGRESDB_PORT`
/`_FILE` | Number | `5432` | The PostgreSQL port. |
+| `DB_POSTGRESDB_USER`
/`_FILE` | String | `postgres` | The PostgreSQL user. |
| `DB_POSTGRESDB_PASSWORD`
/`_FILE` | String | - | The PostgreSQL password. |
-| `DB_POSTGRESDB_SCHEMA`
/`_FILE` | String | `public` | The PostgreSQL schema. Default value is `public`. |
+| `DB_POSTGRESDB_SCHEMA`
/`_FILE` | String | `public` | The PostgreSQL schema. |
| `DB_POSTGRESDB_SSL_CA`
/`_FILE` | String | - | The PostgreSQL SSL certificate authority. |
| `DB_POSTGRESDB_SSL_CERT`
/`_FILE` | String | - | The PostgreSQL SSL certificate. |
| `DB_POSTGRESDB_SSL_KEY`
/`_FILE` | String | - | The PostgreSQL SSL key. |
diff --git a/docs/hosting/configuration/supported-databases-settings.md b/docs/hosting/configuration/supported-databases-settings.md
index c9ab9459b..a8ced74aa 100644
--- a/docs/hosting/configuration/supported-databases-settings.md
+++ b/docs/hosting/configuration/supported-databases-settings.md
@@ -20,7 +20,7 @@ To use PostgresDB as the database, you can provide the following environment var
- `DB_POSTGRESDB_DATABASE` (default: 'n8n')
- `DB_POSTGRESDB_HOST` (default: 'localhost')
- `DB_POSTGRESDB_PORT` (default: 5432)
- - `DB_POSTGRESDB_USER` (default: 'root')
+ - `DB_POSTGRESDB_USER` (default: 'postgres')
- `DB_POSTGRESDB_PASSWORD` (default: empty)
- `DB_POSTGRESDB_SCHEMA` (default: 'public')
- `DB_POSTGRESDB_SSL_CA` (default: undefined): Path to the server's CA certificate used to validate the connection (opportunistic encryption isn't supported)
diff --git a/docs/index.md b/docs/index.md
index 82edd3671..12e629b33 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -6,7 +6,6 @@ hide:
# Welcome
-
This is the documentation for [n8n](https://n8n.io/){:target=_blank .external-link}, a [fair-code](http://faircode.io){:target=_blank .external-link} licensed node-based workflow automation tool.
It covers everything from setup to usage and development. It's a work in progress and all [contributions](/help-community/contributing/) are welcome.
diff --git a/docs/integrations/builtin/app-nodes/n8n-nodes-base.misp.md b/docs/integrations/builtin/app-nodes/n8n-nodes-base.misp.md
index 421e32e52..055600848 100644
--- a/docs/integrations/builtin/app-nodes/n8n-nodes-base.misp.md
+++ b/docs/integrations/builtin/app-nodes/n8n-nodes-base.misp.md
@@ -25,6 +25,7 @@ For usage examples and templates to help you get started, take a look at n8n's [
* Delete
* Get
* Get All
+ * Search
* Update
* Event
* Create
@@ -32,6 +33,7 @@ For usage examples and templates to help you get started, take a look at n8n's [
* Get
* Get All
* Publish
+ * Search
* Unpublish
* Update
* Event Tag
@@ -51,6 +53,8 @@ For usage examples and templates to help you get started, take a look at n8n's [
* Noticelist
* Get
* Get All
+* Object
+ * Search
* Organisation
* Create
* Delete
diff --git a/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgroq.md b/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgroq.md
new file mode 100644
index 000000000..c6f794896
--- /dev/null
+++ b/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgroq.md
@@ -0,0 +1,38 @@
+---
+title: Groq Chat Model
+description: Documentation for the Groq Chat Model node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.
+---
+
+# Groq Chat Model
+
+Use the Groq Chat Model node to access Groq's large language models for conversational AI and text generation tasks.
+
+On this page, you'll find the node parameters for the Groq Chat Model node, and links to more resources.
+
+/// note | Credentials
+You can find authentication information for this node [here](/integrations/builtin/credentials/groq/).
+///
+
+/// note | Examples and templates
+For usage examples and templates to help you get started, refer to n8n's [Groq Chat Model integrations](https://n8n.io/integrations/groq-chat-model/){:target=_blank .external-link} page.
+///
+
+--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"
+
+## Node parameters
+
+* **Model**: The model which will generate the completion. Learn more in the [Groq model documentation](https://console.groq.com/docs/models){:target=_blank .external-link}. Available models are loaded dynamically from the Groq API.
+
+## Node options
+
+* **Maximum Number of Tokens**: the maximum number of tokens to generate in the completion.
+* **Sampling Temperature**: controls randomness. Lowering the value results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. Valid range is 0 to 1.
+
+## Related resources
+
+View [example workflows and related content](https://n8n.io/integrations/groq-chat-model/){:target=_blank .external-link} on n8n's website.
+
+Refer to [Groq's API documentation](https://console.groq.com/docs/quickstart){: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"
diff --git a/docs/integrations/builtin/core-nodes/n8n-nodes-base.httprequest.md b/docs/integrations/builtin/core-nodes/n8n-nodes-base.httprequest.md
index 67062f972..27a8ba528 100644
--- a/docs/integrations/builtin/core-nodes/n8n-nodes-base.httprequest.md
+++ b/docs/integrations/builtin/core-nodes/n8n-nodes-base.httprequest.md
@@ -122,5 +122,18 @@ Import a curl command:
2. Paste in your curl command.
3. Select **Import**. n8n loads the request configuration into the node fields. This overwrites any existing configuration.
+## Ask AI to configure the HTTP node
+
+From version 1.40.0, you can use AI to configure the node parameters:
+
+1. Select **Ask AI**.
+1. Enter the **Service** and **Request** you want to use. For example, to use the NASA API to get their picture of the day, enter `NASA` in **Service** and `get picture of the day` in **Request**.
+1. Check the parameters: the AI tries to fill them out, but you may still need to adjust or correct the configuration.
+
+For Cloud users, n8n provides a customized knowledge base of API specifications for the AI to draw on to provide good results. For services that aren't in the knowledge base, n8n falls back on OpenAI GPT-4's default knowledge. You can view the [list of services in the knowledge base](https://github.com/n8n-io/n8n/blob/master/packages/cli/src/services/ai/resources/api-knowledgebase.json){:target=_blank .external-link}.
+
+Self-hosted users need to [enable AI features and provide their own API keys](/hosting/configuration/environment-variables/ai/). On self-hosted you don't have access to n8n's API specifications knowledge base, so all responses from the AI use OpenAI GPT-4's default knowledge.
+
+
diff --git a/docs/integrations/builtin/credentials/groq.md b/docs/integrations/builtin/credentials/groq.md
new file mode 100644
index 000000000..dab151f9b
--- /dev/null
+++ b/docs/integrations/builtin/credentials/groq.md
@@ -0,0 +1,25 @@
+---
+title: Groq credentials
+description: Documentation for the Groq credentials. Use these credentials to authenticate Groq in n8n, a workflow automation platform.
+---
+
+# Groq credentials
+
+You can use these credentials to authenticate the following nodes:
+
+* [Groq Chat Model](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgroq/)
+
+## Using API Key
+
+1. Go to [Groq console](https://console.groq.com/){:target=_blank .external-link} and log in.
+2. Select **API Keys** in the left sidebar.
+3. Select **Create API Key**.
+4. Enter a name for your API key.
+5. Select **Submit**.
+6. Copy the displayed API key.
+
+## Related resources
+
+Refer to [Groq's documentation](https://console.groq.com/docs/quickstart){:target=_blank .external-link} for more information about the service.
+
+--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
diff --git a/docs/integrations/builtin/credentials/httprequest.md b/docs/integrations/builtin/credentials/httprequest.md
index 405ff72fa..84ea498a4 100644
--- a/docs/integrations/builtin/credentials/httprequest.md
+++ b/docs/integrations/builtin/credentials/httprequest.md
@@ -14,13 +14,19 @@ You can use these credentials to authenticate the following nodes:
You must use the authentication method required by the app or service you want to query.
-### Existing credential types
+### Predefined credential types
n8n recommends using this option whenever there's a credential type available for the service you want to connect to. It offers an easier way to set up and manage credentials, compared to configuring generic credentials.
You can use [Predefined credential types](/integrations/custom-operations/#predefined-credential-types) to perform custom operations with some APIs where n8n has a node for the platform. For example, n8n has an Asana node, and supports using your Asana credentials in the HTTP Request node. Refer to [Custom operations](/integrations/custom-operations/) for more information.
-### Generic authentication
+### Using a predefined credential type
+
+--8<-- "_snippets/integrations/predefined-credential-type-how-to.md"
+
+Refer to [Custom API operations](/integrations/custom-operations/) for more information.
+
+## Generic authentication
The following generic authentication methods are available:
@@ -34,26 +40,19 @@ The following generic authentication methods are available:
You can learn more about HTTP authentication [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#see_also){:target=_blank .external-link}.
-
-## Using an existing credential type
-
---8<-- "_snippets/integrations/predefined-credential-type-how-to.md"
-
-Refer to [Custom API operations](/integrations/custom-operations/) for more information.
-
-## Using Basic Auth or Digest Auth
+### Using Basic Auth or Digest Auth
1. Update the credential name.
2. Enter the **Username** and **Password** for the app or service your HTTP Request is targeting.
3. Select **Save** to save your credentials.
-## Using Header Auth
+### Using Header Auth
1. Update the credential name.
2. Enter the header **Name** and **Value** required for the app or service your HTTP Request is targeting. Read more about [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#authentication){:target=_blank .external-link}.
3. Select **Save** to save your credentials.
-## Using OAuth1
+### Using OAuth1
1. Update the credential name.
2. Enter the following authentication details:
@@ -67,7 +66,7 @@ Refer to [Custom API operations](/integrations/custom-operations/) for more info
Read more about [OAuth1](https://oauth.net/1/){:target=_blank .external-link}.
-## Using OAuth2
+### Using OAuth2
1. Update the credential name.
2. Enter the following authentication details:
@@ -82,11 +81,11 @@ 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
+### 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
+#### Sending two headers
```
{
"headers": {
@@ -96,7 +95,7 @@ The **Generic Auth Type** > **Custom Auth** option expects JSON data to define y
}
```
-### Body
+#### Body
```
{
"body" : {
@@ -106,7 +105,7 @@ The **Generic Auth Type** > **Custom Auth** option expects JSON data to define y
}
```
-### Query string
+#### Query string
```
{
"qs": {
@@ -116,7 +115,7 @@ The **Generic Auth Type** > **Custom Auth** option expects JSON data to define y
}
```
-### Sending header and query string
+#### Sending header and query string
```
{
"headers": {
@@ -127,3 +126,11 @@ The **Generic Auth Type** > **Custom Auth** option expects JSON data to define y
}
}
```
+
+## Provide an SSL certificate
+
+You can send an SSL certificate with your HTTP request. You can use this alongside other credential types.
+
+1. In the node **Settings** {.off-glb}, enable **SSL Certificates**.
+1. On the **Parameters** tab, add the SSL credential to **Credential for SSL Certificates**.
+
diff --git a/docs/integrations/builtin/trigger-nodes/n8n-nodes-base.wisetrigger.md b/docs/integrations/builtin/trigger-nodes/n8n-nodes-base.wisetrigger.md
index 27541467d..5af101603 100644
--- a/docs/integrations/builtin/trigger-nodes/n8n-nodes-base.wisetrigger.md
+++ b/docs/integrations/builtin/trigger-nodes/n8n-nodes-base.wisetrigger.md
@@ -19,6 +19,7 @@ For usage examples and templates to help you get started, refer to n8n's [Wise T
## Events
- Triggered every time a balance account is credited
+- Triggered every time a balance account is credited or debited
- Triggered every time a transfer's list of active cases is updated
-- Triggered every time a transfer's status is updated
+- Triggered every time a transfer's status is updated
diff --git a/docs/learning-path.md b/docs/learning-path.md
new file mode 100644
index 000000000..6f7591e47
--- /dev/null
+++ b/docs/learning-path.md
@@ -0,0 +1,51 @@
+---
+description: A suggested learning path to get started with n8n through tutorials, courses, and step-by-step guides.
+contentType: overview
+---
+This guide outlines a series of tutorials and resources designed to get you started with n8n.
+
+It's not necessary to complete all items listed to start using n8n. Use this as a reference to navigate to the most relevant parts of the documentation and other resources according to your needs.
+
+## Join the community
+
+n8n has an active community where you can get and offer help. Connect, share, and learn with other n8n users:
+
+- [Ask questions](https://community.n8n.io/t/readme-welcome-to-the-n8n-community/44381){:target=_blank .external-link} and [make feature requests](https://community.n8n.io/c/feature-requests){:target=_blank .external-link} in the Community Forum.
+- [Report bugs](https://github.com/n8n-io/n8n/issues){:target=_blank .external-link} and [contribute](https://github.com/n8n-io/n8n/blob/master/CONTRIBUTING.md){:target=_blank .external-link} on GitHub.
+
+## Set up your n8n
+
+If you don't have an account yet, sign up to a [free trial on n8n Cloud](https://app.n8n.cloud/register){:target=_blank .external-link} or install n8n's community edition with [Docker](/hosting/installation/docker/) (recommended) or [npm](/hosting/installation/npm/). See [Choose your n8n](/choose-n8n/) for more details.
+
+## Try it out
+
+Start with the quickstart guides to help you get up and running with building basic workflows.
+
+- [A very quick quickstart](/try-it-out/quickstart/)
+- [A longer introduction](/try-it-out/longer-introduction/)
+- [Build an AI workflow in n8n](/advanced-ai/intro-tutorial/)
+
+## Structured Courses
+
+Build more complex workflows while learning key concepts along the way. Earn a badge and an avatar in your community profile.
+
+- [Level 1: Beginner Course](https://blog.n8n.io/announcing-the-n8n-certification-course-for-beginners-level-1/){:target=_blank .external-link}
+- [Level 2: Intermediate Course](https://blog.n8n.io/announcing-course-level-two/){:target=_blank .external-link}
+
+## Self-hosting n8n
+
+Explore various [self-hosting options in n8n](/hosting/). If you’re not sure where to start, these are two popular options:
+
+- [Hosting n8n on DigitalOcean](/hosting/installation/server-setups/digital-ocean/)
+- [Hosting n8n on Amazon Web Services](/hosting/installation/server-setups/aws/)
+
+## Build a node
+
+If you can't find a node for a specific app or a service, you can build a node yourself and share with the community. See what others have built on [npm website](https://www.npmjs.com/search?q=keywords:n8n-community-node-package){:target=_blank .external-link}.
+
+- [Build a declarative-style node](/integrations/creating-nodes/build/declarative-style-node/)
+- [Learn how to build your own n8n nodes (Youtube Video)](https://www.youtube.com/live/OI6zHJ56eW0?si=SMD7L1J5fZ2mf79W){:target=_blank .external-link}
+
+## Stay updated
+- Follow new features and bug fixes in the [Release Notes](/release-notes/)
+- Follow n8n on socials: [Twitter/X](https://twitter.com/n8n_io){:target=_blank .external-link}, [Discord](https://discord.com/invite/vWwMVThRta){:target=_blank .external-link}, [LinkedIn](https://www.linkedin.com/company/n8n/){:target=_blank .external-link}, [YouTube](https://www.youtube.com/@n8n-io){:target=_blank .external-link}
\ No newline at end of file
diff --git a/docs/release-notes.md b/docs/release-notes.md
index e69ff5eff..3d7882c5a 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -29,13 +29,66 @@ n8n uses [semantic versioning](https://semver.org/){:target=_blank .external-lin
* PATCH version when making backward-compatible bug fixes.
+## n8n@1.40.0
+
+View the [commits](https://github.com/n8n-io/n8n/compare/n8n@1.39.1...n8n@1.40.0){:target=_blank .external-link} for this version.
+**Release date:** 2024-05-02
+
+/// note | Next version
+This is the `next` version. n8n recommends using the `latest` version. The `next` version may be unstable. To report issues, use the [forum](https://community.n8n.io/c/questions/12){:target=_blank .external-link}.
+///
+
+
+
+/// warning | Breaking change
+Please note that this version contains a breaking change for instances using a Postgres database. The default value for the DB_POSTGRESDB_USER environment variable was switched from `root` to `postgres`. Refer to the [breaking changes log](https://github.com/n8n-io/n8n/blob/master/packages/cli/BREAKING-CHANGES.md#1400){:target=_blank .external-link} for details.
+///
+
+This release contains new features, new nodes, node enhancements, and bug fixes.
+
+