2023-01-27 03:22:44 -08:00
import type { ICredentialType , INodeProperties } from 'n8n-workflow' ;
2020-05-30 12:09:04 -07:00
const scopes = [
'https://www.googleapis.com/auth/drive.file' ,
'https://www.googleapis.com/auth/spreadsheets' ,
2022-11-15 05:57:07 -08:00
'https://www.googleapis.com/auth/drive.metadata' ,
2020-05-30 12:09:04 -07:00
] ;
export class GoogleSheetsOAuth2Api implements ICredentialType {
name = 'googleSheetsOAuth2Api' ;
2022-12-02 12:54:28 -08:00
2022-07-24 08:36:17 -07:00
extends = [ 'googleOAuth2Api' ] ;
2022-12-02 12:54:28 -08:00
2020-05-31 10:24:14 -07:00
displayName = 'Google Sheets OAuth2 API' ;
2022-12-02 12:54:28 -08:00
2022-10-20 08:52:03 -07:00
documentationUrl = 'google/oauth-single-service' ;
2022-12-02 12:54:28 -08:00
2021-06-12 09:39:55 -07:00
properties : INodeProperties [ ] = [
2020-05-30 12:09:04 -07:00
{
displayName : 'Scope' ,
name : 'scope' ,
2021-06-12 09:39:55 -07:00
type : 'hidden' ,
2020-05-30 12:09:04 -07:00
default : scopes . join ( ' ' ) ,
} ,
2023-04-20 03:40:35 -07:00
{
displayName :
'Make sure you enabled the following APIs & Services in the Google Cloud Console: Google Drive API, Google Sheets API. <a href="https://docs.n8n.io/integrations/builtin/credentials/google/oauth-generic/#scopes" target="_blank">More info</a>.' ,
name : 'notice' ,
type : 'notice' ,
default : '' ,
} ,
2020-05-30 12:09:04 -07:00
] ;
}