Skip to main content

Check out Port for yourself ➜ 

n8n

Custom Ocean integration

This integration was created using the custom Ocean integration builder.
Please note that:

  1. This integration will not be listed in the Data sources page of your Port application, and must be installed manually using the instructions on this page.
  2. This integration will not create components (e.g. blueprints, mapping, etc.) in your portal automatically, you will need to create them manually using the instructions on this page.

Port's n8n integration ingests n8n resources into your software catalog using the Ocean Custom Integration framework. It focuses on three key data sources: users, projects, and workflows.

Supported resources

The n8n integration can ingest the following resources into Port:

  • n8nUser – n8n users from /v1/users.
  • n8nProject – n8n projects from /v1/projects.
  • n8nWorkflow – n8n workflows from /v1/workflows.

These resources provide visibility into your n8n automation platform, including user management, project organization, and workflow definitions.

Prerequisites

To use this integration, you need:

  1. Port credentials (CLIENT_ID and CLIENT_SECRET)
  2. n8n instance URL (e.g., https://your-instance.com/api)
  3. n8n API key (see n8n API docs)

To create an n8n API key:

  1. Navigate to your n8n instance and sign in to your account.
  2. Go to SettingsAPI.
  3. Click Create API Key.
  4. Give your key a name (e.g., "Port Integration") and copy the API key.
  5. Store the API key securely.
API key security

Store your API key securely and never share it. The key provides access to your n8n instance data.

Review the n8n API reference to understand the exact response structure returned by each endpoint.

Installation

Choose one of the following installation methods to deploy the Ocean Custom Integration:

Prerequisites

To install the integration, you need a Kubernetes cluster that the integration's container chart will be deployed to.

Please make sure that you have kubectl and helm installed on your machine, and that your kubectl CLI is connected to the Kubernetes cluster where you plan to install the integration.

Troubleshooting

If you are having trouble installing this integration, please refer to these troubleshooting steps.

Installation

Add Port's Helm repo and install the Ocean Custom Integration:

Replace placeholders

Remember to replace the placeholders for YOUR_PORT_CLIENT_ID, YOUR_PORT_CLIENT_SECRET, YOUR_N8N_INSTANCE_URL, and YOUR_N8N_API_KEY.

helm repo add port-labs https://port-labs.github.io/helm-charts
helm repo update

helm install n8n-integration port-labs/port-ocean-custom \
--set eventListener.type=ONCE \
--set initializePortResources=true \
--set sendRawDataExamples=true \
--set integration.identifier=n8n-integration \
--set integration.config.baseUrl=https://your-instance.com/api \
--set integration.config.authType=api_key \
--set integration.config.apiKeyHeader=X-N8N-API-KEY \
--set integration.secrets.apiKey=YOUR_N8N_API_KEY \
--set integration.config.paginationType=cursor \
--set integration.config.paginationParam=cursor \
--set integration.config.sizeParam=limit \
--set integration.config.pageSize=100 \
--set integration.config.cursorPath=nextCursor \
--set integration.config.hasMorePath=nextCursor \
--set port.clientId=YOUR_PORT_CLIENT_ID \
--set port.clientSecret=YOUR_PORT_CLIENT_SECRET \
--set port.baseUrl=https://api.getport.io
Selecting a Port API URL by account region

The port_region, port.baseUrl, portBaseUrl, port_base_url and OCEAN__PORT__BASE_URL parameters are used to select which instance of Port API will be used.

Port exposes two API instances, one for the EU region of Port, and one for the US region of Port.

Configuration parameters

ParameterDescriptionExampleRequired
port.clientIdYour Port client id.
port.clientSecretYour Port client secret.
port.baseUrlYour Port API URL (https://api.getport.io for EU, https://api.us.getport.io for US).
integration.config.baseUrlBase URL for your n8n instance API.https://your-instance.com/api
integration.config.authTypeAuthentication type for n8n (use api_key for n8n).api_key
integration.config.apiKeyHeaderHeader name for the API key.X-N8N-API-KEY
integration.secrets.apiKeyn8n API key.
integration.config.paginationTypePagination type used by n8n API.cursor
integration.config.paginationParamQuery parameter name for pagination cursor.cursor
integration.config.sizeParamQuery parameter name for page size.limit
integration.config.pageSizeNumber of items per page.100
integration.config.cursorPathJSON path to cursor value in response.nextCursor
integration.config.hasMorePathJSON path to check if more pages exist.nextCursor
integration.eventListener.typeEvent listener type for the integration.ONCE
integration.identifierUnique identifier for this integration instance.n8n-integration
initializePortResourcesCreate default blueprints and mappings on first run.true
sendRawDataExamplesSend sample payloads for easier mapping.true

Advanced integration configuration

For advanced configuration such as proxies or self-signed certificates, click here.

Set up data model

Before syncing data, create the blueprints that define your n8n entities (users, projects, and workflows).

To create the blueprints:

  1. Go to your Builder page.

  2. Click the + Blueprint button.

  3. Copy each blueprint JSON from the sections below.

    n8n User blueprint (Click to expand)
    {
    "identifier": "n8nUser",
    "description": "This blueprint represents an n8n user",
    "title": "n8n User",
    "icon": "User",
    "schema": {
    "properties": {
    "created_at": {
    "type": "string",
    "title": "Created At",
    "format": "date-time"
    },
    "is_active": {
    "type": "boolean",
    "title": "Is Active"
    },
    "email": {
    "type": "string",
    "title": "Email"
    },
    "full_name": {
    "type": "string",
    "title": "Full Name"
    }
    },
    "required": []
    },
    "mirrorProperties": {},
    "calculationProperties": {},
    "aggregationProperties": {},
    "relations": {}
    }
    n8n Project blueprint (Click to expand)
    {
    "identifier": "n8nProject",
    "description": "This blueprint represents an n8n project",
    "title": "n8n Project",
    "icon": "OpenFolder",
    "schema": {
    "properties": {},
    "required": []
    },
    "mirrorProperties": {},
    "calculationProperties": {},
    "aggregationProperties": {},
    "relations": {}
    }
    n8n Workflow blueprint (Click to expand)
    {
    "identifier": "n8nWorkflow",
    "description": "This blueprint represents an n8n workflow",
    "title": "n8n Workflow",
    "icon": "Pipeline",
    "schema": {
    "properties": {
    "created_at": {
    "type": "string",
    "title": "Created At",
    "format": "date-time"
    },
    "updated_at": {
    "type": "string",
    "title": "Updated At",
    "format": "date-time"
    },
    "is_active": {
    "type": "boolean",
    "title": "Is Active"
    },
    "is_archived": {
    "type": "boolean",
    "title": "Is Archived"
    },
    "nodes": {
    "items": {
    "type": "object"
    },
    "icon": "DefaultProperty",
    "type": "array",
    "title": "Nodes"
    },
    "connections": {
    "type": "object",
    "title": "Connections"
    },
    "trigger_count": {
    "type": "number",
    "title": "Trigger Count"
    },
    "tags": {
    "items": {
    "type": "string"
    },
    "type": "array",
    "title": "Tags"
    }
    },
    "required": []
    },
    "mirrorProperties": {},
    "calculationProperties": {},
    "aggregationProperties": {},
    "relations": {
    "project": {
    "title": "Project",
    "target": "n8nProject",
    "required": false,
    "many": false
    }
    }
    }
  4. Click Save after each blueprint is added.

Configuration

Each resource maps an n8n endpoint to the Port entities defined above.

Key mapping components:

  • kind – API endpoint path appended to your n8n base URL.
  • selector – Request payload, pagination controls, and data selection logic.
  • port.entity.mappings – JQ expressions that transform the API payload into Port entities.

To configure the mapping:

  1. Go to the data sources page of your portal.

  2. Find your n8n integration in the list.

  3. Click on the integration to open the mapping editor.

  4. Add the resource mapping configurations below.

    Complete n8n mapping configuration (Click to expand)
    deleteDependentEntities: true
    createMissingRelatedEntities: true
    enableMergeEntity: true
    resources:
    - kind: /v1/users
    selector:
    query: 'true'
    data_path: .data
    port:
    entity:
    mappings:
    identifier: .id
    title: .email
    blueprint: '"n8nUser"'
    properties:
    full_name: >-
    if (.firstName // null) != null or (.lastName // null) != null
    then ((.firstName // "") + " " + (.lastName // "")) else .email
    end
    is_active: (.isPending | not)
    created_at: .createdAt
    email: .email
    - kind: /v1/projects
    selector:
    query: 'true'
    data_path: .data
    port:
    entity:
    mappings:
    identifier: .id
    title: .name
    blueprint: '"n8nProject"'
    properties: {}
    - kind: /v1/workflows
    selector:
    query: 'true'
    data_path: .data
    port:
    entity:
    mappings:
    identifier: .id
    title: .name
    blueprint: '"n8nWorkflow"'
    properties:
    nodes: .nodes
    connections: .connections
    trigger_count: .triggerCount
    is_active: .active
    is_archived: .isArchived
    tags: (.tags | map(.name))
    created_at: .createdAt
    updated_at: .updatedAt
    relations:
    project: .shared[0].projectId
  5. Click Save to save the mapping.

Customization

If you want to expand beyond the starter resources, use the interactive builder to:

  1. Test additional n8n endpoints.
  2. Explore the response shape and detected property types.
  3. Generate blueprint JSON and mapping snippets automatically.
  4. Export installation commands with your configuration pre-filled.

Start with the users, projects, and workflows entities above, then add more resources (such as executions or credentials) once you verify the value.

API Reference