n8n Kommo Nodes
n8n-nodes-kommo is a community-developed n8n node package designed to integrate n8n workflows with the Kommo CRM API. It provides a comprehensive set of operations to automate interactions with Kommo, including managing companies, contacts, deals, tasks, notes, and lists directly within n8n workflows. Currently at version 0.0.16, this package is in its early development stages, typical for community nodes, which implies a potentially rapid iteration cycle. While an explicit release cadence is not stated, users should anticipate frequent updates. It differentiates itself by offering a direct, pre-built bridge to Kommo's functionalities, enabling n8n users to automate CRM processes without writing custom code for API interactions. This node is installed directly through n8n's community nodes interface, rather than as a traditional npm dependency in a separate project.
Common errors
-
OAuth error: Invalid redirect URI
cause The 'Redirect Link' configured in your Kommo widget settings does not precisely match the OAuth Redirect URL copied from your n8n Kommo credential setup.fixIn Kommo, navigate to your integration's widget settings and update the 'Redirect Link' field to exactly match the OAuth Redirect URL provided by n8n during credential creation. -
Error: Invalid Integration ID or Secret key
cause The Integration ID or Secret Key entered into n8n for your Kommo API credentials is incorrect or contains typos.fixRe-copy the Integration ID and Secret Key from the 'Keys and Accesses' section of your Kommo integration settings and paste them carefully into the corresponding fields in n8n. -
NodeNotFoundError: Kommo node not found
cause The `n8n-nodes-kommo` package was not successfully installed, or n8n has not been restarted to register the new community node.fixVerify that `n8n-nodes-kommo` is listed as installed under 'Settings > Community Nodes' in n8n. If installed, try restarting your n8n instance to ensure the node is loaded and registered correctly.
Warnings
- gotcha As a community-contributed and pre-1.0 package (version 0.0.16), `n8n-nodes-kommo` may undergo frequent and potentially undocumented breaking changes in minor or patch releases.
- gotcha Community nodes, by their nature, are unverified code from public sources and may pose security risks. It's crucial to understand these implications before installation.
- gotcha The initial Kommo OAuth setup is complex, requiring precise configuration of Redirect URLs, Integration IDs, and Secret Keys in both Kommo and n8n. Mistakes in these steps are common.
- gotcha The package specifies `pnpm >=9.1` in its `engines` field, which indicates it's built or intended for installation with pnpm. Using npm or yarn, or an older pnpm version, may lead to unexpected installation issues.
Install
-
npm install n8n-nodes-kommo -
yarn add n8n-nodes-kommo -
pnpm add n8n-nodes-kommo
Imports
- INodeType
import { INodeType } from 'n8n-nodes-kommo';import { INodeType } from 'n8n-workflow'; - INodeTypeDescription
import { INodeTypeDescription } from 'n8n-nodes-kommo';import { INodeTypeDescription } from 'n8n-workflow'; - KommoNode
import KommoNode from 'n8n-nodes-kommo'; const KommoNode = require('n8n-nodes-kommo');import { KommoNode } from 'n8n-nodes-kommo';
Quickstart
import { INodeType, INodeTypeDescription, IExecuteFunctions } from 'n8n-workflow';
// This quickstart demonstrates how an n8n node *could be defined* in TypeScript,
// mimicking the functionality of n8n-nodes-kommo for 'Get Account Info'.
// Users of n8n-nodes-kommo typically install and configure it via the n8n UI,
// rather than importing it programmatically into their own code.
// Dummy Kommo API client (in a real node, this would handle actual API calls)
class MockKommoApiClient {
private accessToken: string;
constructor(credentials: any) {
// In a real scenario, credentials would be used to obtain an access token.
this.accessToken = credentials?.accessToken || 'mock_access_token';
console.log(`Initialized MockKommoApiClient with token: ${this.accessToken}`);
}
async getAccountInfo() {
console.log('Mock: Fetching Kommo account info...');
// Simulate API response structure for Kommo account info
return {
account_id: '1234567',
domain: 'mock-subdomain.kommo.com',
currency: 'USD',
timezone: 'America/New_York',
_system: 'Kommo-CRM-Mock'
};
}
}
export class ExampleKommoNode implements INodeType {
description: INodeTypeDescription = {
displayName: 'Example Kommo Node',
name: 'exampleKommo',
icon: 'file:kommo.svg', // Placeholder icon
group: ['transform'],
version: 1,
description: 'An example n8n node to interact with Kommo CRM (mocked)',
defaults: {
name: 'Example Kommo',
},
credentials: [
{
name: 'kommoApi',
required: true,
},
],
inputs: ['main'],
outputs: ['main'],
properties: [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
options: [
{
name: 'Get Account Info',
value: 'getAccountInfo',
action: 'Retrieve Kommo account details',
},
],
default: 'getAccountInfo',
noDataExpression: true,
description: 'The operation to perform on Kommo.',
},
],
};
async execute(this: IExecuteFunctions) {
const items = this.getInputData();
const returnData = [];
const credentials = await this.getCredentials('kommoApi');
const kommoClient = new MockKommoApiClient(credentials);
for (let i = 0; i < items.length; i++) {
const operation = this.getNodeParameter('operation', i) as string;
if (operation === 'getAccountInfo') {
const accountInfo = await kommoClient.getAccountInfo();
returnData.push({ json: accountInfo });
} else {
throw new Error(`Unsupported operation: ${operation}`);
}
}
return [returnData];
}
}