diff --git a/docs/integrations/creating-nodes/code/create-n8n-nodes-module.md b/docs/integrations/creating-nodes/code/create-n8n-nodes-module.md index fb8deeda2..dd5126d0d 100644 --- a/docs/integrations/creating-nodes/code/create-n8n-nodes-module.md +++ b/docs/integrations/creating-nodes/code/create-n8n-nodes-module.md @@ -1,5 +1,7 @@ # Creating n8n-nodes-module +[TODO: this is the most up to date method, use it] + In this guide, you'll learn to create a custom n8n-nodes-module that can be installed separately alongside your n8n instance. The n8n-nodes-module is an npm package that contains the node. Your custom node will get loaded automatically when n8n starts. Consider creating n8n-nodes-module if any of the following conditions satisfy your needs: diff --git a/docs/integrations/creating-nodes/programmatic-style-node.md b/docs/integrations/creating-nodes/programmatic-style-node.md index ce2ac259a..424c46dcf 100644 --- a/docs/integrations/creating-nodes/programmatic-style-node.md +++ b/docs/integrations/creating-nodes/programmatic-style-node.md @@ -1,5 +1,7 @@ # Creating Your First Node +[TODO: delete most of this, the n8n-nodes-module doc is more up to date] + Today, you will learn how to create your first node for n8n. ## Prerequisites diff --git a/docs/integrations/creating-nodes/review-checklist.md b/docs/integrations/creating-nodes/review-checklist.md index 6f665fab3..5b2edcc5d 100644 --- a/docs/integrations/creating-nodes/review-checklist.md +++ b/docs/integrations/creating-nodes/review-checklist.md @@ -1,60 +1,56 @@ -# 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. - -There are several things to keep in mind when creating the node. To help you, we prepared a checklist that covers the requirements for creating nodes, from preparation to submission. - -Make sure you tick the boxes below before submitting a node for review, as this will help our team review your PR easier and faster. +This checklist helps you build a node that meets the standards for submission to the community nodes collection. It also helps ensure that nodes are consistent and good quality. ## Preparation + Set up your editor for code formatting (indentation, new lines, linting). If you use Visual Studio Code, you can use the TSLint extension for linting.
- Get credentials (e.g., Client ID, Client Secret, API key, user login, user password, website URL) for the service you are building a node for. + Get credentials (for example, Client ID, Client Secret, API key, user login, user password, website URL) for the service you are building a node for. ## Development - Open a pull request as early as possible with `WIP` in the pull request title.
- If you are creating a node requested by a community member, make sure to comment on the feature request in the [community forum](https://community.n8n.io/c/feature-requests/5).
- Ensure complementary operations to each resource (e.g., create, delete) have been added.
- Ensure the node works with multiple items via one input.
+ If you're' creating a node requested by a community member, make sure to comment on the feature request in the [community forum](https://community.n8n.io/c/feature-requests/5).
+ Add complementary operations to each resource (for example, create, delete)
+ Check the node works with more than one item using one input.
[TODO: what does this mean?] Ensure the parameters have the correct type.
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.
- Check if the node disposes of everything properly, in particular, if connections were properly closed.
- Check your code using Nodelinter to ensure a clean lint before submitting your pull request
+ Check if the node disposes of everything. In particular, the node has closed all connections.
+ Check your code using Node linter.
## Testing Test "create" and "update" operations with all fields/operations.
- Test the `continueOnFail` option with a Function node. (For example, a Widget node has a GET operation that takes a widgetId and returns information on the widget. To test that the workflow continues on fail, set the Widget node to continue on fail, create a Function node, return a valid and an invalid widgetId, connect the Function node to Widget node, and run the workflow. The Widget node should show two items: one with information on the widget and another one with the error from having passed an invalid ID.)
+ Test the `continueOnFail` option with a Function node. For example, a Widget node has a GET operation that takes a widgetId and returns information on the widget. To test that the workflow continues on fail, set the Widget node to continue on fail, create a Function node, return a valid and an invalid widgetId, connect the Function node to Widget node, and run the workflow. The Widget node should show two items: one with information on the widget and another one with the error from having passed an invalid ID.)
## Code formatting Ensure the branch lints cleanly by running `npm run lint`.
- Ensure the indentation is correct. Check this in the editorconfig.
- Ensure there are no extra spaces. Check this in the editorconfig.
+ Ensure the indentation is correct. Check this in the editor configuration.
+ Ensure there are no extra spaces. Check this in the editor configuration.
Code comment dividers inside if-branches.
Use "create/delete" verbs for operations, except for tags, where you should use "add/remove".
## Errors and Outputs Ensure empty API responses return `{ success: true }`.
- Ensure the error responses are handled and displayed correctly (e.g., malformed requests, requests with invalid credentials) and use the current format. You can check this by making failing requests to the API.
- Check if the response can be simplified and add a simplify function (e.g., SecurityScorecard node).
+ Ensure the node handles and displays error responses correctly (for example, malformed requests, requests with invalid credentials) and use the current format. You can check this by making failing requests to the API.
+ Check if the response can be simplified and add a simplify function (for example, SecurityScorecard node).
Ensure the response from `Create` is consistent with `Get`.
Ensure the response from `Get All` is consistent with `Get`.
## Presentation - Ensure the primary menu contains only required parameters.
- Ensure a JSON object is not shown in a single column in Table view.
+ The primary menu should only contain required parameters.
+ Ensure a JSON object isn't shown in a single column in Table view.
Make sure all GetAll operations have the fields `return` and `limit`.
- Ensure the property subtitle is set.
+ Set the property subtitle.
Make sure the pagination (if any) is working correctly. Set Limit 1.
## Writing Ensure all descriptions are correct and end with a period.
Ensure that most descriptions exist, excluding redundant ones.
- Ensure IDs in displayNames are capitalized (i.e.: "IDs", not "ids" or "Ids").
+ Ensure IDs in displayNames are capitalized (for example: "IDs" not "ids" or "Ids").
Ensure that IDs, if multiple, have descriptive qualifiers.
Ensure the `name` property in `description` in the node class is written in camelCase.
Ensure the file name and the Class name are identical.
diff --git a/docs/integrations/creating-nodes/troubleshooting-node-development.md b/docs/integrations/creating-nodes/troubleshooting-node-development.md index e8223a23d..5162ff6b5 100644 --- a/docs/integrations/creating-nodes/troubleshooting-node-development.md +++ b/docs/integrations/creating-nodes/troubleshooting-node-development.md @@ -2,35 +2,46 @@ ## Credentials -### Error message: 'Credentials of type “*” are not known' + +### Error message: 'Credentials of type "*" are not known' + -Ensure that the name in the credentials array matches the name used in the property name of the credentials' class. +Check that the name in the credentials array matches the name used in the property name of the credentials' class. ![Troubleshooting credentials](/_images/integrations/creating-nodes/troubleshooting-credentials-1.png) - + ## Editor UI + + ### Error message: 'There was a problem loading init data: API-Server can not be reached. It is probably down' + -- Ensure that the node's file name, class's name, and node's folder name matches the path added to `packages/nodes-base/package.json`. -- Ensure the names used in the `displayOptions` property are names used by UI elements in the node. +- Check that the node's file name, class's name, and node's folder name matches the path added to `packages/nodes-base/package.json`. +- Check the names used in the `displayOptions` property are names used by UI elements in the node. -### Node icon doesn't show up in the Create Node menu and the Editor UI + +### Node icon doesn't show up in the Add Node menu and the Editor UI + -- Ensure that the icon is in the same folder as the node. -- Ensure that it's either in PNG or SVG format. -- When the icon is referenced in the 'icon' property, ensure that it includes the logo extension (`.png` or `.svg`) and that it is preceded by the world `file:`. For example, `file:friendGrid.png` or `file:friendGrid.svg`. +- Check that the icon is in the same folder as the node. +- Check that it's either in PNG or SVG format. +- When the `icon` property references the icon file, check that it includes the logo extension (`.png` or `.svg`) and that it prefixes it with `file:`. For example, `file:friendGrid.png` or `file:friendGrid.svg`. -### Node icon does not fit correctly +### Node icon doesn't fit -- If you are using an SVG file, make sure the canvas size is square. You can find instructions to change the canvas size of an SVG file using GIMP [here](https://docs.gimp.org/2.10/en/gimp-image-resize.html). -- If you are using a PNG file, make sure that it's 60x60 pixels. +- If you use an SVG file, make sure the canvas size is square. You can find instructions to change the canvas size of an SVG file using GIMP [here](https://docs.gimp.org/2.10/en/gimp-image-resize.html). +- If you use a PNG file, make sure that it's 60x60 pixels. -### Node does not show up in the Create Node menu +### Node doesn't show up in the Add Node menu -Ensure that the node is registered in the `packages/nodes-base/package.json` file. +Check that you registered the node in the `packages/nodes-base/package.json` file. -### Changes to the description properties do not show in the UI on refreshing +[TODO: does this still apply with new way of adding nodes?] -Every time a change is made to the description properties, you have to stop the current n8n process (ctrl + c) and run it again (npm run dev). \ No newline at end of file + +### Changes to the description properties don't show in the UI on refreshing + + +Every time you change the description properties, you have to stop the current n8n process (`ctrl` + `c`) and run it again (`npm run dev`). \ No newline at end of file diff --git a/styles/Vocab/default/accept.txt b/styles/Vocab/default/accept.txt index d84c1b801..df8bd0e32 100644 --- a/styles/Vocab/default/accept.txt +++ b/styles/Vocab/default/accept.txt @@ -3,6 +3,8 @@ Cron Dockerfile Enum enum +GIMP +invalid n8n namespace npm