### Install Dependencies, Build, and Start n8n Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt After cloning the repository, install the necessary Node.js dependencies, build the project, and start the n8n server. This is a standard procedure for setting up a Node.js project. ```bash npm install npm run build npm run start ``` -------------------------------- ### Start n8n Local Instance Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Starts the n8n application from your local installation. This command allows you to access and test your custom nodes through the n8n web interface. ```bash n8n start ``` -------------------------------- ### Start Basic n8n Docker Container Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Run this command to start a basic n8n instance using Docker. Ensure Docker Desktop or Engine is installed. ```bash docker volume create n8n_data docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n ``` -------------------------------- ### Start n8n Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Commands to start the n8n service after installation. Either 'n8n' or 'n8n start' can be used. ```bash n8n ``` ```bash n8n start ``` -------------------------------- ### Install Docker Compose Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Installs Docker Compose on a server. Ensure your system is updated before installation. ```bash apt update && apt -y upgrade apt install docker-compose-plugin ``` -------------------------------- ### Install Docker and Docker Compose on Ubuntu Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Installs Docker and Docker Compose on Ubuntu systems. This script removes old versions, sets up the Docker repository, and installs the necessary packages. ```bash # Remove incompatible or out-of-date Docker implementations for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done # Install prerequisite packages sudo apt-get update sudo apt-get install ca-certificates curl # Download the repo signing key sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Configure the repository echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null # Update and install Docker and Docker Compose sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` -------------------------------- ### Configure Caddyfile Example Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Example Caddyfile configuration for reverse proxying n8n. Replace `n8n..` with your actual domain and suffix. ```plaintext n8n.. { reverse_proxy n8n:5678 { flush_interval -1 } } ``` -------------------------------- ### Install Node Project Dependencies Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Install all necessary project dependencies using npm after setting up the project structure. ```bash npm i ``` -------------------------------- ### Install a Community Node Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Install a community node from the npm registry. Ensure you are in the correct directory and have accessed the Docker shell. ```bash npm i n8n-nodes-nodeName ``` -------------------------------- ### Example n8n Configuration JSON File Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt An example JSON file demonstrating how to configure n8n settings like execution data saving, timezone, and node exclusions. ```json { "executions": { "saveDataOnSuccess": "none" }, "generic": { "timezone": "Europe/Berlin" }, "nodes": { "exclude": "[\"n8n-nodes-base.executeCommand\",\"n8n-nodes-base.writeBinaryFile\"]" } } ``` -------------------------------- ### Install n8n Next Version Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Install the latest beta version of n8n, often referred to as 'next'. This is useful for testing upcoming features. ```bash npm install -g n8n@next ``` -------------------------------- ### Example: Uninstall Specific Community Node Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Provides a concrete example of how to uninstall the 'n8n-nodes-evolution-api' community node using the CLI. ```bash n8n community-node --uninstall --package n8n-nodes-evolution-api ``` -------------------------------- ### Verify Docker and Docker Compose Installation Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Checks if Docker and Docker Compose have been installed correctly by displaying their versions. ```bash docker --version docker compose version ``` -------------------------------- ### Start n8n Webhook Processor Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Start a webhook processor in queue mode. This instance is specifically configured to handle incoming webhook calls. ```bash ./packages/cli/bin/n8n webhook ``` ```bash docker run --name n8n-queue -p 5679:5678 -e "EXECUTIONS_MODE=queue" docker.n8n.io/n8nio/n8n webhook ``` -------------------------------- ### Start Docker Compose Bash Command Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Start the n8n and Caddy services defined in your `docker-compose.yml` file in detached mode. ```bash sudo docker compose up -d ``` -------------------------------- ### Start n8n and Caddy Services Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Starts the n8n and Caddy services in detached mode using Docker Compose. ```bash docker compose up -d ``` -------------------------------- ### Example of Referenced Input Data Parameters Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt This example demonstrates how referencing '$input.params' might lead to errors if the incoming data lacks consistent fields or if the node has not yet executed. ```javascript { "my_field_1": {{ $input.params }} } ``` -------------------------------- ### Get Postgres Connection Info Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Use this command to retrieve information about your current Postgres connection, useful for credential setup. ```sql /conninfo ``` -------------------------------- ### Start n8n Docker Container with Custom Timezone Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Set the timezone for your n8n instance by using the GENERIC_TIMEZONE and TZ environment variables. Example uses 'Europe/Berlin'. ```bash docker volume create n8n_data docker run -it --rm \ --name n8n \ -p 5678:5678 \ -e GENERIC_TIMEZONE="Europe/Berlin" \ -e TZ="Europe/Berlin" \ -v n8n_data:/home/node/.n8n \ docker.n8n.io/n8nio/n8n ``` -------------------------------- ### Create Custom Directory and Initialize npm Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Creates a 'custom' directory in the n8n configuration path and initializes it as an npm package. This is a troubleshooting step if the 'custom' directory does not exist. ```bash mkdir custom cd custom npm init ``` -------------------------------- ### Try n8n with npx Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Use this command to quickly try n8n without a full installation. Access the n8n interface at http://localhost:5678. ```bash npx n8n ``` -------------------------------- ### Enable Multi-Main Setup in n8n Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Configure multiple main n8n instances for high availability. Ensure all instances run in queue mode, connect to the same database and Redis, and share the same n8n version. ```bash N8N_MULTI_MAIN_SETUP_ENABLED=true # TTL for leader key in seconds. N8N_MULTI_MAIN_SETUP_KEY_TTL=10 # Leader check interval in seconds. N8N_MULTI_MAIN_SETUP_CHECK_INTERVAL=3 ``` -------------------------------- ### Create a project Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Creates a new project with a specified name. Requires API key authentication. ```APIDOC ## POST /projects ### Description Creates a new project with a specified name. ### Method POST ### Endpoint /projects ### Parameters #### Request Body - **name** (string) - Required - The name of the project. ### Response #### Success Response (201) - Success #### Error Responses - **400** - Invalid request - **401** - Unauthorized ``` -------------------------------- ### Install n8n Globally with npm Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Install n8n globally on your system using npm. This makes the 'n8n' command available in your terminal. ```bash npm install n8n -g ``` -------------------------------- ### Initialize Custom Directory for n8n Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt If the `~/.n8n` directory does not contain a `custom` directory, create it manually and initialize it with npm. This is often a troubleshooting step. ```bash mkdir custom cd custom npm init ``` -------------------------------- ### Install Specific n8n Version Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Install or update n8n to a specific version using npm. Replace '0.126.1' with the desired version number. ```bash npm install -g n8n@0.126.1 ``` -------------------------------- ### MongoDB Connection String Example Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Use this format when configuring MongoDB credentials with a connection string. Replace placeholders with your actual credentials and cluster details. ```text mongodb+srv://yourName:yourPassword@clusterName.mongodb.net/?retryWrites=true&w=majority ``` -------------------------------- ### Example URL for Initial Field Values Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Use query parameters in the form URL to set initial values for fields when the form is in production mode. Ensure values are URL-encoded. ```url https://my-account.n8n.cloud/form/my-form?email=jane.doe%40example.com&name=Jane%20Doe ``` -------------------------------- ### Fruit Data Example for Compare Datasets Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Illustrates sample JSON data for two input streams containing 'fruit' objects, suitable for demonstrating the Compare Datasets node's functionality with nested structures. ```json // Input 1 [ { "fruit": { "type": "apple", "color": "red" } }, { "fruit": { "type": "apple", "color": "red" } }, { "fruit": { "type": "banana", "color": "yellow" } } ] // Input 2 [ { "fruit": { "type": "apple", "color": "red" } }, { "fruit": { "type": "apple", "color": "red" } }, { "fruit": { "type": "banana", "color": "yellow" } } ] ``` -------------------------------- ### Create Node Directory Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Create the necessary directory for custom nodes and navigate into it. This directory is used for manual node installations. ```bash mkdir ~/.n8n/nodes cd ~/.n8n/nodes ``` -------------------------------- ### Install Specific Version of Community Node Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Install or downgrade a community node to a specific version by specifying the version number. This is useful for compatibility or stability. ```bash # Replace 2.1.0 with your version number npm install n8n-nodes-nodeName@2.1.0 ``` -------------------------------- ### Start n8n Worker Instance Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Start a worker process for n8n in queue mode. Workers execute workflows and communicate with the main instance via Redis. ```bash ./packages/cli/bin/n8n worker ``` ```bash docker run --name n8n-queue -p 5679:5678 docker.n8n.io/n8nio/n8n worker ``` -------------------------------- ### Start Redis for Queue Mode Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Run a Redis instance, typically in a Docker container, to serve as the message broker for n8n's queue mode. Ensure the port is accessible. ```bash docker run --name some-redis -p 6379:6379 -d redis ``` -------------------------------- ### Start n8n Docker Container with Tunnel Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Run n8n with the tunnel service enabled, useful for local development and testing. This command starts the container and activates the tunnel. ```bash docker volume create n8n_data docker run -it --rm \ --name n8n \ -p 5678:5678 \ -v n8n_data:/home/node/.n8n \ docker.n8n.io/n8nio/n8n \ start --tunnel ``` -------------------------------- ### Deploy n8n and Postgres Manifests Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Apply all Kubernetes manifests to deploy n8n and Postgres. Use the `namespace.yaml` if you encounter namespace issues. ```bash kubectl apply -f . kubectl apply -f namespace.yaml ``` -------------------------------- ### Markdown Example: Full-Width Image Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Shows how to make an image display at 100% width within an n8n Sticky Note by appending '#full-width' to the image URL. ```markdown ![Source example](https:///.png#full-width) ``` -------------------------------- ### Example API Response with Next Cursor Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt An example JSON response from the n8n API indicating that there are more pages of results available. The 'nextCursor' value should be used to request the subsequent page. ```json { "data": [ // The response contains an object for each workflow { // Workflow data } ], "nextCursor": "MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA" } ``` -------------------------------- ### Configure Basic Auth Credentials Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt This JSON configuration is for setting up Basic Authentication. Ensure you provide valid username and password credentials for the target service. ```json { "auth": { "type": "basicAuth", "username": "YOUR_USERNAME", "password": "YOUR_PASSWORD" } } ``` -------------------------------- ### Cron Expression Examples for Schedule Trigger Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Examples of cron expressions for various scheduling needs, including intervals, specific times, and days of the week. These expressions define when the workflow will run. ```cron */10 * * * * * ``` ```cron */5 * * * * ``` ```cron 0 * * * * ``` ```cron 0 6 * * * ``` ```cron 0 12 * * 1 ``` ```cron 0 0 1 * * ``` ```cron 0 0 */3 * * ``` ```cron 0 9 * * 1-5 ``` ```cron 0 9-17 * * * ``` ```cron 0 0 1 1,4,7,10 * ``` -------------------------------- ### Get Row ID in Grist Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Obtain the Row ID for updating or deleting records in Grist. This can be done by creating a dedicated column with the '$id' formula or by using the 'Get All' operation's output. ```plaintext $id ``` ```n8n {{$node["GristNodeName"].json["id"]}} ``` -------------------------------- ### Input Data Example for Compare Datasets Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Provides sample JSON data for two input streams to be used with the Compare Datasets node. Each input contains an array of objects with nested 'person' fields. ```json // Input 1 [ { "person": { "name": "Stefan", "language": "de" } }, { "person": { "name": "Jim", "language": "en" } }, { "person": { "name": "Hans", "language": "de" } } ] // Input 2 [ { "person": { "name": "Sara", "language": "de" } }, { "person": { "name": "Jane", "language": "en" } }, { "person": { "name": "Harriet", "language": "de" } } ] ``` -------------------------------- ### Get Column Names Node Configuration Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Configures a set node in n8n to capture the keys from the input JSON, effectively getting the column names from the data. This is used to provide schema information. ```n8n - Type: "n8n-nodes-base.set" ID: "d49223eb-2927-4ddd-bd2c-cd439f927341" Fields: Values: - "response": "={{ Object.keys($json) }}" ``` -------------------------------- ### Countdown to Christmas Example Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt This example demonstrates a longer use case, calculating the number of days remaining until Christmas by comparing the current date with December 25th of the current year. It uses `diff()` and string manipulation for the output. ```javascript {{"There are " + $today.diff(DateTime.fromISO($today.year + '-12-25'), 'days').toObject().days.toString().substring(1) + " days to Christmas!"}} ``` ```javascript let daysToChristmas = "There are " + $today.diff(DateTime.fromISO($today.year + '-12-25'), 'days').toObject().days.toString().substring(1) + " days to Christmas!"; ``` -------------------------------- ### Link Custom Node to Local n8n Instance Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Link your locally developed custom node package to your local n8n installation. Replace `` with the actual name from your `package.json`. ```bash # In the nodes directory within your n8n installation npm link ``` -------------------------------- ### Enable Filesystem Mode for Binary Data Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Set this environment variable to 'filesystem' to handle binary data on disk, improving efficiency and preventing crashes with large files. This is not supported in queue mode. ```plaintext N8N_DEFAULT_BINARY_DATA_MODE=filesystem ``` -------------------------------- ### User Operations Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt This section details Slack API methods for user information and profile management, including getting user info, listing users, retrieving user profiles, getting user presence, and updating user profiles. ```APIDOC ## User Operations ### Get User Info - **Slack API Method**: `users.info` ### Get Many Users - **Slack API Method**: `users.list` ### Get User's Profile - **Slack API Method**: `users.profile.get` ### Get User's Status - **Slack API Method**: `users.getPresence` ### Update User's Profile - **Slack API Method**: `users.profile.set` ``` -------------------------------- ### Configure Postbin Node with Dynamic Content Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Set up the Postbin node to send a formatted string containing the solar flare class. This requires a valid Postbin ID. ```javascript Bin Content: Use expression: `There was a solar flare of class {{$json["classType"]}}` ``` -------------------------------- ### Get Collections Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Retrieves a list of template collections. ```APIDOC ## GET /templates/collections ### Description Retrieves a list of template collections. ### Method GET ### Endpoint /templates/collections ### Response #### Success Response (200) - **id** (number) - The unique identifier for the collection. - **rank** (number) - The rank of the collection. - **name** (string) - The name of the collection. - **totalViews** (number) - The total number of views for the collection. - **createdAt** (string) - The creation date of the collection. - **workflows** (array) - A list of workflow IDs associated with the collection. - **nodes** (array) - A list of node data associated with the collection. ``` -------------------------------- ### Get Categories Source: https://raw.githubusercontent.com/Synaptiv-AI/awesome-n8n/refs/heads/main/n8n-docs-llms.txt Retrieves a list of available template categories. ```APIDOC ## GET /templates/categories ### Description Retrieves a list of available template categories. ### Method GET ### Endpoint /templates/categories ### Response #### Success Response (200) - **id** (number) - The unique identifier for the category. - **name** (string) - The name of the category. ```