Skip to main content

n8n

N8n is a low-code workflow automation tool that enables users to connect various applications and services, automating complex processes and tasks using no-code nodes.

How to run​

Due to n8n's licensing, run it using the cgc compute create custom command. We recommend allocating at least 2 CPU cores and 2 GB of RAM, adjusting as needed for your workload.

  1. Create the Compute:
    echo "export N8N_PORT=8888; n8n;" | cgc compute create custom -n <compute_name> -c 2 -m 2 -v <volume_name> --image n8nio/n8n:latest
    Replace <compute_name> with your desired name (e.g., n8n) and <volume_name> with the name of a suitable volume.

After the compute resource starts, the CLI will display the URL to access the n8n interface.

Registration and configuration​

Open the provided URL in your web browser to access the n8n interface.

n8n-interface

  1. Create Owner Account: Follow the registration form to set up the owner account.

  2. Optional: Activate Paid Features (for free): After registration, you will be prompted to unlock paid features for free by providing your email address. If interested, enter your email to receive a license key. n8n Free Key Prompt

Activation (if you requested a key)​

Navigate to Settings (three dots in the bottom left corner) -> Usage and plan, then click Enter activation key and paste the key received via email, then press Activate n8n Settings Menu n8n Key Activation

Connecting to the CGC LLM API​

To use CGC's LLM's within your n8n workflow, you need to add your LLM API key as a credential. It's really simple!

  1. If you don't have one, generate an LLM API key using the CGC CLI: bash cgc api-keys create --level LLM The output will contain an API secret. Save it somewhere convenient and safe for future use as it cannot be retrieved again. If you lose it, delete it and create another one.

  2. Add Credentials in n8n:

    • Navigate to the Credentials section in n8n. Adding Credentials
    • Add new credentials for the LLM API.
    • IMPORTANT: Set the Base URL to https://llm.comtegra.cloud/v1!
    • Paste your saved API Key Secret.
    • Test the connection. You should see a "Connection tested successfully" message. Connection Tested Successfully
    • You can change the name of the credential in the upper left corner of the window, change "OpenAi Account" to the name of your choice.

Configuring Nodes for LLM API​

When using nodes that interact with language models (e.g., a Chat node):

  1. Select the credentials you just created from the Credentials dropdown.
  2. Choose the desired language model from the Model list.

n8n Chat Node Model Selection

For further steps on how to use n8n, go to n8n docs.

First steps​