diff --git a/packages/nodes-base/credentials/IntercomApi.credentials.ts b/packages/nodes-base/credentials/IntercomApi.credentials.ts new file mode 100644 index 0000000000..64263e889f --- /dev/null +++ b/packages/nodes-base/credentials/IntercomApi.credentials.ts @@ -0,0 +1,18 @@ +import { + ICredentialType, + NodePropertyTypes, +} from 'n8n-workflow'; + + +export class IntercomApi implements ICredentialType { + name = 'intercomApi'; + displayName = 'Intercom API'; + properties = [ + { + displayName: 'API Key', + name: 'apiKey', + type: 'string' as NodePropertyTypes, + default: '', + }, + ]; +} diff --git a/packages/nodes-base/nodes/Intercom/Intercom.node.ts b/packages/nodes-base/nodes/Intercom/Intercom.node.ts new file mode 100644 index 0000000000..55e61151b7 --- /dev/null +++ b/packages/nodes-base/nodes/Intercom/Intercom.node.ts @@ -0,0 +1,59 @@ +import { + IExecuteSingleFunctions, +} from 'n8n-core'; +import { + IDataObject, + INodeTypeDescription, + INodeExecutionData, + INodeType, + ILoadOptionsFunctions, + INodePropertyOptions, +} from 'n8n-workflow'; + +export class Intercom implements INodeType { + + description: INodeTypeDescription = { + displayName: 'Intercom', + name: 'intercom', + icon: 'file:intercom.png', + group: ['output'], + version: 1, + subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', + description: 'Consume intercom API', + defaults: { + name: 'Intercom', + color: '#c02428', + }, + inputs: ['main'], + outputs: ['main'], + credentials: [ + { + name: 'intercomApi', + required: true, + } + ], + properties: [ + { + displayName: 'Resource', + name: 'resource', + type: 'options', + options: [ + { + name: 'Lead', + value: 'lead', + description: '', + }, + ], + default: '', + description: 'Resource to consume.', + }, + ], + }; + + async executeSingle(this: IExecuteSingleFunctions): Promise { + + return { + json: {}, + }; + } +} diff --git a/packages/nodes-base/nodes/Intercom/intercom.png b/packages/nodes-base/nodes/Intercom/intercom.png new file mode 100644 index 0000000000..5fb79c11ea Binary files /dev/null and b/packages/nodes-base/nodes/Intercom/intercom.png differ diff --git a/packages/nodes-base/package.json b/packages/nodes-base/package.json index 1e3e1ceeae..193f0c0fc6 100644 --- a/packages/nodes-base/package.json +++ b/packages/nodes-base/package.json @@ -39,7 +39,8 @@ "dist/credentials/GoogleApi.credentials.js", "dist/credentials/HttpBasicAuth.credentials.js", "dist/credentials/HttpDigestAuth.credentials.js", - "dist/credentials/HttpHeaderAuth.credentials.js", + "dist/credentials/HttpHeaderAuth.credentials.js", + "dist/credentials/IntercomApi.credentials.js", "dist/credentials/Imap.credentials.js", "dist/credentials/LinkFishApi.credentials.js", "dist/credentials/MailgunApi.credentials.js", @@ -95,7 +96,8 @@ "dist/nodes/GraphQL/GraphQL.node.js", "dist/nodes/HttpRequest.node.js", "dist/nodes/If.node.js", - "dist/nodes/Interval.node.js", + "dist/nodes/Interval.node.js", + "dist/nodes/Intercom/Intercom.node.js", "dist/nodes/LinkFish/LinkFish.node.js", "dist/nodes/Mailgun/Mailgun.node.js", "dist/nodes/Mandrill/Mandrill.node.js",