mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat: Add WhatsApp Business Trigger Node (#8840)
Co-authored-by: Giulio Andreini <andreini@netseven.it> Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export class WhatsAppTriggerApi implements ICredentialType {
|
||||
name = 'whatsAppTriggerApi';
|
||||
|
||||
displayName = 'WhatsApp API';
|
||||
|
||||
documentationUrl = 'whatsApp';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Client ID',
|
||||
name: 'clientId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
displayName: 'Client Secret',
|
||||
name: 'clientSecret',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
password: true,
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
method: 'POST',
|
||||
baseURL: 'https://graph.facebook.com/v19.0/oauth/access_token',
|
||||
body: {
|
||||
client_id: '={{$credentials.clientId}}',
|
||||
client_secret: '={{$credentials.clientSecret}}',
|
||||
grant_type: 'client_credentials',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user