diff --git a/packages/nodes-base/credentials/LinearOAuth2Api.credentials.ts b/packages/nodes-base/credentials/LinearOAuth2Api.credentials.ts index b1e22ddfd9..1f1ba72467 100644 --- a/packages/nodes-base/credentials/LinearOAuth2Api.credentials.ts +++ b/packages/nodes-base/credentials/LinearOAuth2Api.credentials.ts @@ -1,7 +1,5 @@ import type { ICredentialType, INodeProperties } from 'n8n-workflow'; -const scopes = ['read', 'write', 'issues:create', 'comments:create']; - export class LinearOAuth2Api implements ICredentialType { name = 'linearOAuth2Api'; @@ -50,11 +48,19 @@ export class LinearOAuth2Api implements ICredentialType { ], default: 'user', }, + { + displayName: 'Include Admin Scope', + name: 'includeAdminScope', + type: 'boolean', + default: false, + description: 'Grants the "Admin" scope, Needed to create webhooks', + }, { displayName: 'Scope', name: 'scope', type: 'hidden', - default: scopes.join(' '), + default: + '={{$self["includeAdminScope"] ? "read write issues:create comments:create admin" : "read write issues:create comments:create"}}', required: true, }, {