PrompteryxBeta
    ⌘K
    PlatformSupport
    Menu
    IntroductionInstall Desktop & extensionQuick StartPlatform Overview
    OverviewWhat you can makeAI Browser Agent in the chatModels and AutoConnectorsSchedulesProjectsExplore and publishingShare linksMemory and SkillsPersonal agent (beta)Welcome, settings and skinsPlans, credits and top-upsPrompteryx DesktopGroups (pilot)Phone app (early access)
    OverviewCreating WorkflowsTesting & DebuggingScheduling
    OverviewGetting StartedCommandsRecordingSettingsStructured OutputParallel AgentsTips & Best Practices
    OverviewInstallationSidebar AgentUsing Attached FilesExecute on Current TabExporting to Visual Studio
    Overview
    OverviewOpen PageClickClick CoordinatesFillExtract TextScreenshotWaitPress KeyFocus ElementBlur ElementSelect TextHighlight ElementSet ViewportGet Bounding BoxScrollHoverSelect OptionAssertionsCookiesEvaluate JavaScriptExample Workflows
    OverviewPrompteryx Browser AgentOpenAI
    OverviewSchedule TriggerWebhook Trigger
    OverviewGoogle SheetsGoogle CalendarConnect Hub (3,000+ apps)Example Workflows
    AI Vision SettingsChrome Automation ProfilesCloud BrowserBrowser Profiles & Persistent ContextVideo RecordingExecution LogsSharing & CollaborationEdit History
    Selectors GuideVariables
    Start hereGet an API keyRun the AI browser agentDrive a cloud browserRun workflows from anywhereUse connected apps (Connect Hub)SDK (TypeScript)CLIMCP for AI assistants
    REST APIWebhooksMCP toolsCloud Browser APICloud Browser quickstartMigrate from Browserbasen8nZapierMake.com

    Need help? Contact Support

    1. Documentation
    2. Nodes
    3. Browser Actions
    4. Cookies

    Cookie Nodes

    Browser Node

    Manage browser cookies for authentication and session handling

    Overview

    Cookie nodes allow you to read, add, and clear cookies in the browser context. This is essential for handling authentication, maintaining sessions across workflows, and testing cookie-dependent features.

    Available Nodes

    Get Cookies
    Retrieve cookies from the browser context
    Parameters
    Configuration options for this node
    urls
    String

    Comma-separated URLs to get cookies for. If empty, gets all cookies.

    Example: https://example.com, https://api.example.com
    targetVar
    String

    Target Variable — stores the cookies array

    Default: cookies

    Cookie Object Properties:

    { name: "session_id", value: "abc123", domain: "example.com", path: "/", expires: 1735689600, httpOnly: true, secure: true, sameSite: "Lax" }
    Add Cookies
    Add cookies to the browser context
    Parameters
    Configuration options for this node
    cookies
    JSON
    Required

    Cookies (JSON) — an array of cookie objects to add

    Example: [{"name": "auth", "value": "token123", "domain": ".example.com", "path": "/"}]
    Required Cookie Properties
    Each cookie must have at least: name, value, and either url or domain + path. Other properties (expires, httpOnly, secure, sameSite) are optional.
    Clear Cookies
    Remove all cookies from the browser context

    This node removes all cookies from the browser context. Use it to simulate a fresh session or to clean up after authentication tests.

    Clearing cookies will log you out of most websites. You'll need to re-authenticate in subsequent steps. On a Chrome Automation Profile this also removes the profile's saved logins, since profiles keep their cookies between runs.

    Usage Examples

    Example 1: Save Session Cookies
    Extract cookies after login for reuse

    Workflow sequence:

    1. Open Page: https://example.com/login
    2. Fill login credentials
    3. Click Login button
    4. Wait for dashboard
    5. Get Cookies → sessionCookies
    6. Save to file/database for later use
    Example 2: Restore Session
    Skip login by adding saved cookies

    Workflow sequence:

    1. Load cookies from file/database
    2. Add Cookies: {{savedCookies}}
    3. Open Page: https://example.com/dashboard
    4. You're already logged in!
    Example 3: Test Without Cookies
    Clear cookies to test logged-out behavior

    Workflow sequence:

    1. Clear Cookies
    2. Open Page: https://example.com/protected
    3. Assert redirect to login page

    Cookie Authentication Pattern

    A common pattern is to login once and save the cookies, then reuse them in subsequent runs:

    First Run (Login & Save):

    1. Open login page
    2. Enter credentials
    3. Submit login
    4. Get Cookies
    5. Save cookies to Google Sheets or file

    Subsequent Runs (Reuse Cookies):

    1. Load cookies from storage
    2. Add Cookies
    3. Go directly to authenticated pages

    Best Practices

    Set Cookie Domain Correctly
    When adding cookies, ensure the domain matches where they'll be used. Cookies for api.example.com won't work on www.example.com.
    Handle Cookie Expiry
    Session cookies expire when the browser closes. Check cookie expiry dates and refresh authentication if cookies have expired.
    Security Warning
    Cookies contain sensitive authentication data. Store them securely and never commit them to version control.

    Related Documentation

    Open Page Node

    Navigate with cookies set

    Google Sheets

    Store cookies in spreadsheet

    Variables Guide

    Use cookies in workflows