This commit is contained in:
Tanay Pant 2021-08-16 11:45:29 +02:00
commit 4dc4667f23
17 changed files with 206 additions and 82 deletions

View File

@ -237,10 +237,6 @@ module.exports = {
title: '⌨️ Keyboard Shortcuts',
path: 'keyboard-shortcuts.md',
},
{
title: '🧑‍💻 Setup via PM2',
path: 'setup-pm2.md',
},
{
title: '💻 Environment Variables',
path: 'environment-variables.md',

View File

@ -1,4 +1,4 @@
# Creating your first node
# Creating Your First Node
Today, you will learn how to create your first node for n8n.

View File

@ -1,4 +1,4 @@
# Creating your first trigger node
# Creating Your First Trigger Node
Today, you will learn how to create your first trigger node for n8n.

View File

@ -1,4 +1,4 @@
# Node review checklist
# Node Review Checklist
If you want to create a new node for a service - that's great, thank you! We recommend you take a look at the [existing nodes](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes) to get an idea of how your code should look and work like.
@ -19,6 +19,7 @@ Make sure you tick the boxes below before submitting a node for review, as this
<input type="checkbox"> Ensure the parameters have the correct type.</input><br>
<input type="checkbox"> Mind the defaults: if the service has a default as true, keep it as true. Changing default values can break the existing workflows of the users.</input><br>
<input type="checkbox"> Check if the node disposes of everything properly, in particular, if connections were properly closed.</input><br>
<input type="checkbox"> Check your code using <a href="https://docs.n8n.io/nodes/creating-nodes/nodelinter.html">Nodelinter</a> to ensure a clean lint <strong>before</strong> submitting your pull request</input><br>
## Testing

View File

@ -0,0 +1,83 @@
# Nodelinter
[Nodelinter](https://github.com/n8n-io/nodelinter) is an extensible static analysis tool for checking your n8n node files to ensure n8n recommended best practices are followed when developing new nodes.
This includes rules for:
* Alphabetization of node parameters and options
* Casing for display names and descriptions
* Default values per parameter type
* Required and optional key-value pairs
See the full linting list [here](https://github.com/n8n-io/nodelinter/blob/master/src/lintings.ts) for more details.
## Installation and Usage
Nodelinter is a dependency of the `nodes-base` package and available upon [installing](../../getting-started/installation/README.md) n8n.
You can run Nodelinter from the `packages/nodes-base` directory as follows:
```sh
npm run nodelinter -- --<options>
```
:::tip 💡 Keep in mind
Be sure to run Nodelinter and verify your code before submitting a pull request.
:::
## Options
| Option | Description | Example |
| ----------------- | -------------------------------------------------- | -------- |
| `--target` | Path of the file or directory to lint | Lint a single file:<br>`--target=nodes/Stripe/Stripe.node.ts` <br><br>Lint all files in a directory:<br>`--target=nodes/Stripe` |
| `--config` | Path of the [custom config](#custom-config) to use | `--config=/Users/john/Documents/myConfig.json` |
| `--patterns` | Lintable file patterns | `--patterns:.node.ts,Description.ts` |
| `--print` | Print output to JSON<br><br>A custom filename can optionally be specified. | `--print=myLintOutput` |
| `--errors-only` | Enable error logs only |
| `--warnings-only` | Enable warning logs only |
| `--infos-only` | Enable info logs only |
### Custom config
The Nodelinter [default config](https://github.com/n8n-io/nodelinter/blob/master/src/defaultConfig.ts) can be overridden to, for example, change the areas and issues linted.
To do so create a JSON file containing the key values you want to override. For example:
```json
{
"target": "/Users/john/n8n/packages/nodes-base/nodes/Notion/Notion.node.ts",
"patterns": [".node.ts"],
"sortMethod": "lineNumber",
"lintings": {
"PARAM_DESCRIPTION_MISSING_WHERE_OPTIONAL": {
"enabled": false
},
"NAME_WITH_NO_CAMELCASE": {
"enabled": false
}
}
}
```
Name this file `nodelinter.config.json` and place it anywhere in your `nodes-base` directory and it will be automatically detected. Alternatively, you can specify the custom config file and location using the `--config` option.
## Lint exceptions
You can create exceptions for individual lines of code from any or all linting rules as follows:
```
// nodelinter-ignore-next-line <LINTING_NAME> <LINTING_NAME>
```
If no specific linting name is provided that line will be excepted from all rules. For example:
Exception for one rule:
```
// nodelinter-ignore-next-line PARAM_DESCRIPTION_WITH_EXCESS_WHITESPACE
description: 'Time zone used in the response. The default is the time zone of the calendar.',
```
Exception for all rules:
```
// nodelinter-ignore-next-line
description: 'Time zone used in the response. The default is the time zone of the calendar.',
```

View File

@ -0,0 +1,24 @@
---
permalink: /credentials/nocoDb
description: Learn to configure credentials for the NocoDB node in n8n
---
# NocoDB
You can use these credentials to authenticate the following nodes:
- [NocoDB](../../nodes-library/nodes/nocoDb/README.md)
## Prerequisites
* Install [NocoDB](https://www.nocodb.com/)
* Enable [API Access](https://docs.nocodb.com/setup-and-usages/apis-access)
## Using Auth Token
From n8n:
1. Enter a descriptive ***Credentials Name***.
2. In the ***Credentials Data*** section enter the following:
* ***API Token***: The authentication token for your NocoDB project, obtained when enabling API access (above).
* ***Host***: The host of your NocoDB instance, for example `http://localhost:8080`.
3. Click **Create** to save your new credentials.

View File

@ -1,5 +1,5 @@
---
permalink: /credentials/servicenow
permalink: /credentials/serviceNow
description: Learn to configure credentials for the ServiceNow node in n8n
---

View File

@ -34,7 +34,7 @@ The HTTP Request node is one of the most versatile nodes in n8n. It allows you t
- **Follow Redirect:** This option can be used to follow any redirections with a status code `3xx`.
- **Ignore Response Code:** This option can be used to let the node execute even when the HTTP status code is not 2xx.
- **Proxy:** This field is used to specify an HTTP proxy that you may want to use.
- **Split Into Items:** This option can be used to flatten the node output as a simple array.
- **Split Into Items:** This option can be used to flatten the node output as a simple array. See the [FAQ](#faqs) section to learn more.
- **Timeout:** The maximum time (in ms) to wait for a response header from the server before aborting the request.
- **Use Querystring:** Set this option to `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the default `foo[0]=bar&foo[1]=baz`.
- **Headers:** This section is used to specify any optional HTTP request headers you may want to include with your request.
@ -131,6 +131,14 @@ When the node gets executed, you will receive the HTTP status code, the HTTP sta
3. Select 'RAW/Custom' from the ***Body Content Type*** field.
4. Enter the XML data in the ***Body*** field.
### When to use the Split Into Items parameter?
Not all incoming data you receive will be properly [structured](../../../../getting-started/key-concepts.md#data-structure) to allow nodes to [process](../../../../getting-started/key-concepts.md#data-flow) each individual item.
Typically you would need to use [JavaScript code](../../../../reference/javascript-code-snippets.md) inside the [Function](../Function/README.md) node to [modify the data structure](../../../../reference/javascript-code-snippets.md#modify-data-structure).
The HTTP Request node allows you to do this automatically by enabling the Split Into Items parameter.
## Further Reading
<FurtherReadingBlog />

View File

@ -0,0 +1,8 @@
---
permalink: /nodes/n8n-nodes-base.n8nTrainingCustomerDatastore
description: Learn how to use the Customer Datastore node in n8n
---
# Customer Datastore (n8n Training)
This node is used exclusively for the n8n new user onboarding tutorial. It provides dummy data for testing purposes and has no further functionality.

View File

@ -0,0 +1,8 @@
---
permalink: /nodes/n8n-nodes-base.n8nTrainingCustomeMessenger
description: Learn how to use the Customer Messenger node in n8n
---
# Customer Messenger (n8n Training)
This node is used exclusively for the n8n new user onboarding tutorial. It provides no further functionality.

View File

@ -0,0 +1,41 @@
---
permalink: /nodes/n8n-nodes-base.nocoDb
description: Learn how to use the NocoDB node in n8n
---
# NocoDB
[NocoDB](https://www.nocodb.com/) is an open source Airtable alternative. It works by connecting to any relational database and transforming them into a spreadsheet interface.
::: tip 🔑 Credentials
You can find authentication information for this node [here](../../../credentials/NocoDb/README.md).
:::
## Basic operations
<Resource node="n8n-nodes-base.nocoDb" />
## Example usage
This workflow allows you to get all rows in your table. This example usage workflow would use the following two nodes.
- [Start](../../core-nodes/Start/README.md)
- [NocoDB]()
The final workflow should look like the following image.
![A workflow with the NocoDB node](./workflow.png)
### 1. Start node
The start node exists by default when you create a new workflow.
### 2. NocoDB node
1. First enter your credentials for the NocoDB node. You can find out how to do that [here](../../../credentials/NocoDb/README.md).
2. The **Row** ***Resource*** is selected by default.
3. Select **Get All** from the ***Operation*** dropdown.
4. Enter the NocoDB **Project ID**.
5. Enter the name of the targeted **Table**.
6. Click on **Execute Node** to run the workflow.
![The NocoDB node](./nocoDb_node.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1000 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

View File

@ -14,6 +14,7 @@ You can find authentication information for this node [here](../../../credential
## Basic Operations
<Resource node="n8n-nodes-base.openWeatherMap" />
## Example Usage
This workflow allows you to get the current weather data for a city. You can also find the [workflow](https://n8n.io/workflows/460) on the website. This example usage workflow would use the following two nodes.

View File

@ -2,6 +2,32 @@
🛠 = Version contains a breaking change. Check out the list of all the breaking changes [here](https://github.com/n8n-io/n8n/blob/master/packages/cli/BREAKING-CHANGES.md).
## n8n@0.134.0
For a comprehensive list of changes, check out the [commits](https://github.com/n8n-io/n8n/compare/n8n%400.133.0...n8n@0.134.0) for this version.<br />
**Release date:** 2021-08-15
### Enhanced nodes 🚀
<br />
<Changelog node="n8n-nodes-base.awsDynamoDb" title="AWS DynamoDB:" text="Added Scan option to Item > Get All operation."/>
<Changelog node="n8n-nodes-base.googleDrive" title="Google Drive:" text="Added File Name option to File > Update operation."/>
<Changelog node="n8n-nodes-base.mautic" title="Mautic:" text="Added the following fields to Company resource: Address, Annual Revenue, Company Email, Custom Fields, Description, Fax, Industry, Number of Employees, Phone, Website."/>
<Changelog node="n8n-nodes-base.notion" title="Notion:" text="Added Timezone option when inserting Date fields."/>
<Changelog node="n8n-nodes-base.pipedrive" title="Pipedrive:" text="Added the following Filters options to the Deal > Get All operation: Predefined Filter, Stage ID, Status, and User ID."/>
<Changelog node="n8n-nodes-base.quickbooks" title="QuickBooks:" text="Added the Transaction resource and Get Report operation."/>
### Core Functionality ⚙️
- Integrated [Nodelinter](../nodes/creating-nodes/nodelinter.md) in n8n.
- Fix to add a trailing slash (`/`) to all webhook URLs for proper functionality.
### Bug fixes 🐛
<br />
<Changelog node="n8n-nodes-base.awsSes" title="AWS SES:" text="Fixed issue where special characters in the message were not encoded."/>
<Changelog node="n8n-nodes-base.baserow" title="Baserow:" text="Fixed issue where Create operation inserted null values."/>
<Changelog node="n8n-nodes-base.hubspot" title="Hubspot:" text="Fixed issue when sending context parameter."/>
### Contributors 🙌
[calvintwr](https://github.com/calvintwr), [CFarcy](https://github.com/CFarcy), [Jeremie Dokime](https://github.com/dokime7), [Michael Hirschler](https://github.com/mvhirsch), [Rodrigo Correia](https://github.com/rodrigoscdc), [sol](https://github.com/5pecia1)
## n8n@0.133.0
For a comprehensive list of changes, check out the [commits](https://github.com/n8n-io/n8n/compare/n8n%400.132.2...n8n@0.133.0) for this version.<br />
**Release date:** 2021-08-08

View File

@ -1,72 +0,0 @@
# Setup via PM2
PM2 is a daemon process manager that will help you manage and keep your application online. It allows you to wrap a Node.js application into a service. You can deploy n8n via PM2.
::: warning
We don't officially support running n8n via PM2. You should follow the instructions mentioned [here](./server-setup.md) to deploy n8n via Docker.
:::
## Prerequisites
To run n8n via PM2, you need to have the following software installed:
- **Node.js and npm:** You can find instructions on how to install both using nvm (Node Version Manager) [here](https://github.com/nvm-sh/nvm). The current minimum version is `14.15`. In case you already have installed Node.js, you can check your current version with the following command:
```bash
node -v
```
- **PM2:** You can install PM2 globally with the following command:
```bash
npm install pm2 -g
```
- **n8n:** You can install n8n globally with the following command:
```bash
npm install n8n -g
```
## Start n8n
To start the n8n service via PM2, execute the following command:
```bash
pm2 start n8n
```
### Auto-start on machine restarts
PM2 can generate startup scripts and configure them to keep your process list intact across expected or unexpected machine restarts.
Refer to the official [PM2 documetation](https://pm2.keymetrics.io/docs/usage/startup/) to learn about configuring the auto-start script.
## Update n8n
To update n8n, follow the steps mentioned below:
1. Stop the n8n service
```bash
pm2 stop n8n
```
2. Install the latest version of n8n
```bash
npm install -g n8n@latest
```
3. Restart the n8n service
```bash
pm2 restart n8n
```
## Configurations
You can set environment variables to override the default n8n configurations. For example, if you want to enable basic authentication for your n8n service, use the following command:
```bash
N8N_BASIC_AUTH_ACTIVE=true N8N_BASIC_AUTH_USER=USERNAME N8N_BASIC_AUTH_PASSWORD=PASSWORD pm2 restart n8n --update-env
```
You can learn more about all the possible configurations [here](./configuration.md).
If you want to set these configurations via a file, refer to the [PM2 documentation](https://pm2.keymetrics.io/docs/usage/application-declaration/) to learn more.
## FAQs
### How to run n8n with PM2 on Windows?
To run n8n via PM2 on Windows, execute the command `pm2 start n8n` from the start directory `C:\Users\%AppData%\Roaming\npm\node_modules\n8n\bin`.
**Note:** If you have installed n8n in a different directory execute the above-mentioned command from that directory.

View File

@ -18,7 +18,7 @@
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/vue-fontawesome": "^2.0.2",
"n8n-nodes-base": "^0.130.0",
"n8n-nodes-base": "^0.131.0",
"vuepress-plugin-sitemap": "^2.3.1"
},
"devDependencies": {