I’ve been working on developing a custom node for my n8n workflow automation setup. After completing the build process, I expected to see my new node available in the n8n interface running locally, but it’s nowhere to be found in the node list. I’ve double-checked my configuration files and the build seemed to complete without errors. Has anyone encountered this problem before? I’m not sure if I’m missing a registration step or if there’s an issue with my implementation. Any guidance would be really helpful.
import { INodeType, INodeTypeDescription } from 'n8n-workflow';
export class ChatBot implements INodeType {
description: INodeTypeDescription = {
displayName: 'ChatBot Helper',
name: 'chatBotHelper',
icon: 'file:bot.svg',
group: ['communication'],
version: 1,
description: 'Communicate with ChatBot service',
defaults: {
name: 'ChatBot Helper',
},
inputs: ['main'],
outputs: ['main'],
credentials: [
{
name: 'chatBotCredentials',
required: true,
}
],
requestDefaults: {
baseURL: 'SERVICE_URL',
headers: {
// custom headers
}
},
properties: [
{
displayName: 'Query Text',
name: 'queryText',
type: 'string',
placeholder: 'Type your query here',
required: true,
description: 'Input text for processing',
routing: {
request: {
method: 'POST',
url: 'ENDPOINT_URL'
},
},
default: 'process',
},
]
};
}
Here’s my chatbot.node.ts implementation.
{
"node": "n8n-nodes-custom.ChatBot",
"nodeVersion": "1.0",
"codexVersion": "1.0",
"categories": ["Communication"],
"resources": {
"credentialDocumentation": [],
"primaryDocumentation": []
}
}
This is my chatbot.node.json configuration.
import {
IAuthenticateGeneric,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class ChatBotCredentials implements ICredentialType {
name = 'ChatBotCredentials';
displayName = 'ChatBot API Access';
documentationUrl = 'https://example.com/api-docs';
properties: INodeProperties[] = [
{
displayName: 'Access Token',
name: 'accessToken',
type: 'string',
default: '',
},
];
authenticate = {
type: 'generic',
properties: {
headers: {
'Authorization': 'Bearer ={{$credentials.accessToken}}'
}
},
} as IAuthenticateGeneric;
}
And here’s my chatbot.credentials.ts file setup.