n8n-nodes-service-account-google-drive
Version:
n8n node for Google Drive with Service Account authentication
51 lines • 1.96 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GoogleDriveServiceAccountApi = void 0;
class GoogleDriveServiceAccountApi {
constructor() {
this.name = 'googleDriveServiceAccountApi';
this.displayName = 'Google Drive Service Account API';
this.documentationUrl = 'https://cloud.google.com/iam/docs/service-accounts';
this.properties = [
{
displayName: 'Service Account Email',
name: 'serviceAccountEmail',
type: 'string',
default: '',
placeholder: 'service-account@project-id.iam.gserviceaccount.com',
description: 'The email address of the service account',
},
{
displayName: 'Private Key',
name: 'privateKey',
type: 'string',
typeOptions: {
password: true,
},
default: '',
placeholder: '-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n',
description: 'The private key from the service account JSON file',
},
{
displayName: 'Impersonate User Email (Optional)',
name: 'impersonateEmail',
type: 'string',
default: '',
placeholder: 'user@yourdomain.com',
description: 'Email of the user to impersonate (required for domain-wide delegation)',
},
];
this.authenticate = {
type: 'generic',
properties: {},
};
this.test = {
request: {
baseURL: 'https://www.googleapis.com/drive/v3',
url: '/about',
},
};
}
}
exports.GoogleDriveServiceAccountApi = GoogleDriveServiceAccountApi;
//# sourceMappingURL=GoogleDriveServiceAccountApi.credentials.js.map