mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Airtable Node): Access token support (#6160)
This commit is contained in:
@@ -28,12 +28,42 @@ export class AirtableTrigger implements INodeType {
|
||||
{
|
||||
name: 'airtableApi',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: ['airtableApi'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'airtableTokenApi',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: ['airtableTokenApi'],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
polling: true,
|
||||
inputs: [],
|
||||
outputs: ['main'],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'API Key',
|
||||
value: 'airtableApi',
|
||||
},
|
||||
{
|
||||
name: 'Access Token',
|
||||
value: 'airtableTokenApi',
|
||||
},
|
||||
],
|
||||
default: 'airtableApi',
|
||||
},
|
||||
{
|
||||
displayName: 'Base',
|
||||
name: 'baseId',
|
||||
@@ -192,19 +222,14 @@ export class AirtableTrigger implements INodeType {
|
||||
|
||||
async poll(this: IPollFunctions): Promise<INodeExecutionData[][] | null> {
|
||||
const downloadAttachments = this.getNodeParameter('downloadAttachments', 0) as boolean;
|
||||
|
||||
const webhookData = this.getWorkflowStaticData('node');
|
||||
const additionalFields = this.getNodeParameter('additionalFields') as IDataObject;
|
||||
const base = this.getNodeParameter('baseId', '', { extractValue: true }) as string;
|
||||
const table = this.getNodeParameter('tableId', '', { extractValue: true }) as string;
|
||||
const triggerField = this.getNodeParameter('triggerField') as string;
|
||||
|
||||
const qs: IDataObject = {};
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields') as IDataObject;
|
||||
|
||||
const base = this.getNodeParameter('baseId', '', { extractValue: true }) as string;
|
||||
|
||||
const table = this.getNodeParameter('tableId', '', { extractValue: true }) as string;
|
||||
|
||||
const triggerField = this.getNodeParameter('triggerField') as string;
|
||||
|
||||
const endpoint = `${base}/${table}`;
|
||||
|
||||
const now = moment().utc().format();
|
||||
|
||||
Reference in New Issue
Block a user