mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(Hubspot Node): enable hubspot credentials for http predefined types (#3686)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export class HubspotApi implements ICredentialType {
|
||||
name = 'hubspotApi';
|
||||
@@ -12,4 +12,20 @@ export class HubspotApi implements ICredentialType {
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
qs: {
|
||||
hapikey: '={{$credentials.apiKey}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://api.hubapi.com',
|
||||
url: '/account-info/v3/details',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export class HubspotAppToken implements ICredentialType {
|
||||
name = 'hubspotAppToken';
|
||||
@@ -12,4 +12,20 @@ export class HubspotAppToken implements ICredentialType {
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
Authorization: '=Bearer {{$credentials.appToken}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://api.hubapi.com',
|
||||
url: '/account-info/v3/details',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user