2023-01-27 03:22:44 -08:00
import type { IAuthenticateGeneric , ICredentialType , INodeProperties } from 'n8n-workflow' ;
2019-07-07 10:19:07 -07:00
export class AirtableApi implements ICredentialType {
name = 'airtableApi' ;
2022-12-02 12:54:28 -08:00
2019-07-07 10:19:07 -07:00
displayName = 'Airtable API' ;
2022-12-02 12:54:28 -08:00
2020-08-17 05:42:09 -07:00
documentationUrl = 'airtable' ;
2022-12-02 12:54:28 -08:00
2021-06-12 09:39:55 -07:00
properties : INodeProperties [ ] = [
2023-05-04 03:17:22 -07:00
{
displayName :
'API Keys will be deprecated by the end of January 2024, see <a href="https://support.airtable.com/docs/airtable-api-key-deprecation-notice" target="_blank">this article</a> for more details. We recommend to use Personal Access Token instead.' ,
name : 'deprecated' ,
type : 'notice' ,
default : '' ,
} ,
2019-07-07 10:19:07 -07:00
{
displayName : 'API Key' ,
name : 'apiKey' ,
2021-06-12 09:39:55 -07:00
type : 'string' ,
2022-11-01 09:41:45 -07:00
typeOptions : { password : true } ,
2019-07-07 10:19:07 -07:00
default : '' ,
} ,
] ;
2022-12-02 12:54:28 -08:00
2022-07-10 03:32:19 -07:00
authenticate : IAuthenticateGeneric = {
type : 'generic' ,
properties : {
2022-07-14 01:28:34 -07:00
qs : {
api_key : '={{$credentials.apiKey}}' ,
2022-07-10 03:32:19 -07:00
} ,
} ,
} ;
2019-07-07 10:19:07 -07:00
}