diff --git a/credentials/BrowserbaseApi.credentials.ts b/credentials/BrowserbaseApi.credentials.ts index 75a3c44..54dfb7c 100644 --- a/credentials/BrowserbaseApi.credentials.ts +++ b/credentials/BrowserbaseApi.credentials.ts @@ -40,6 +40,20 @@ export class BrowserbaseApi implements ICredentialType { required: false, description: 'Optional. Provide your own model API key, or leave blank to use the Browserbase Model Gateway.', }, + { + displayName: 'Disable Session Recording', + name: 'disableSessionRecording', + type: 'boolean', + default: false, + description: 'Whether to force-disable session recording for all workflows using this credential. When enabled, the per-node "Record Session" option is ignored and recording is always off.', + }, + { + displayName: 'Disable Session Logging', + name: 'disableSessionLogging', + type: 'boolean', + default: false, + description: 'Whether to force-disable session logging for all workflows using this credential. When enabled, the per-node "Log Session" option is ignored and logging is always off.', + }, ]; authenticate: IAuthenticateGeneric = { diff --git a/nodes/Browserbase/Browserbase.node.ts b/nodes/Browserbase/Browserbase.node.ts index ea04597..d7c02d7 100644 --- a/nodes/Browserbase/Browserbase.node.ts +++ b/nodes/Browserbase/Browserbase.node.ts @@ -817,11 +817,15 @@ export class Browserbase implements INodeType { try { // 1. Start session const browserSettings: Record = { - recordSession: browserOptions.recordSession ?? true, + recordSession: credentials.disableSessionRecording + ? false + : (browserOptions.recordSession ?? true), solveCaptchas: browserOptions.solveCaptchas ?? false, blockAds: browserOptions.blockAds ?? true, advancedStealth: browserOptions.advancedStealth ?? false, - logSession: browserOptions.logSession ?? true, + logSession: credentials.disableSessionLogging + ? false + : (browserOptions.logSession ?? true), viewport: { width: browserOptions.viewportWidth ?? 1288, height: browserOptions.viewportHeight ?? 711,