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. Developers
    3. N8n

    n8n

    Run Prompteryx workflows and the AI browser agent from n8n, get results back by webhook, or give an n8n AI Agent the Prompteryx tools over MCP

    No community node needed
    A dedicated Prompteryx node for n8n is not published yet. You don't need one: n8n's built-in HTTP Request, Webhook and MCP Client Tool nodes do everything below, on n8n Cloud and self-hosted.
    1. Add your API key to n8n once
    A Header Auth credential every HTTP Request node can reuse
    1. Create a key in Cloud Platform → API → API Keys. It starts with px_live_ and is shown once.
    2. In n8n open Credentials → Add credential (or Create → Credential) and choose Header Auth.
    3. Name: Authorization. Value: Bearer px_live_YOUR_KEY (with the word Bearer and a space). Save it as Prompteryx.

    In each HTTP Request node below set Authentication to Generic Credential Type, Generic Auth Type to Header Auth, and pick Prompteryx.

    2. Run a Prompteryx workflow
    Anything you built on the canvas or saved from an agent run

    Find the workflow id in the Visual Studio URL, or list them with GET https://www.prompteryx.ai/api/v1/workflows. Values in variables become {{name}} inside the workflow.

    HTTP Request node: start the run

    • Method POST, URL https://www.prompteryx.ai/api/v1/workflows/WORKFLOW_ID/execute
    • Authentication: the Prompteryx Header Auth credential
    • Send Body: on, Body Content Type JSON, Specify Body Using JSON:
    {
      "variables": { "postcode": "{{ $json.postcode }}" },
      "options": { "runMode": "headless" }
    }

    It answers at once with { "data": { "execution": { "id": "api_…", "status": "pending" } } }. Runs usually start within a minute.

    Wait for the result (polling)

    1. Wait node: 15 seconds.
    2. HTTP Request: GET https://www.prompteryx.ai/api/v1/executions/{{ $('Start run').item.json.data.execution.id }} (same credential; rename the first node "Start run").
    3. IF (boolean condition): {{ ['COMPLETED','FAILED','CANCELLED','ERROR'].includes(String($json.data.execution.status).toUpperCase()) }} is true → continue; false → loop back to Wait. (The status starts as pending and ends COMPLETED or FAILED.)
    4. Use {{ $json.data.execution.outputs }} downstream: one entry per step name, for example {{ $json.data.execution.outputs['Extract Price'].extractedText }}.

    Prefer no polling? Use a callback instead (section 4).

    The same calls with curl
    curl -X POST https://www.prompteryx.ai/api/v1/workflows/WORKFLOW_ID/execute \
      -H "Authorization: Bearer px_live_YOUR_KEY" -H "Content-Type: application/json" \
      -d '{"variables":{"postcode":"SW1A 1AA"},"options":{"runMode":"headless"}}'
    
    curl https://www.prompteryx.ai/api/v1/executions/api_… -H "Authorization: Bearer px_live_YOUR_KEY"
    3. Run the AI browser agent
    Describe a goal in plain English; the agent works a real browser and reports back

    HTTP Request node "Start agent": POST https://www.prompteryx.ai/api/v1/ai-browser/execute

    {
      "instruction": "Go to https://news.ycombinator.com and return the titles of the top 5 stories",
      "maxSteps": 20,
      "mode": "start"
    }

    HTTP Request node "Advance agent": the same URL, body

    { "jobId": "{{ $('Start agent').item.json.data.jobId }}", "mode": "run" }
    • Set the node's Options → Timeout to 300000 (each call works for up to about 4 minutes).
    • Add an IF: {{ $json.data.terminal }} is false → loop back to "Advance agent".
    • When it is true, read {{ $json.data.finalAnswer }}. {{ $json.data.jobStatus }} is done on success, failed on error, and awaiting_input if the agent stopped to ask before a risky step (payment, sending, deleting).

    Each run spends AI credits and cloud minutes. Cap it with maxSteps and maxCredits. Add "saveAsWorkflow": true to save the successful path as a workflow you can then run without AI. More in Run the AI browser agent.

    4. Get the result pushed to n8n (callback)
    Prompteryx POSTs to an n8n Webhook node when the workflow run ends
    1. Start a new n8n workflow with a Webhook node: HTTP Method POST, Respond Immediately. Copy its Production URL and activate the workflow.
    2. In the "Start run" body from section 2 add "webhookUrl": "https://YOUR-N8N/webhook/…".
    3. When the run ends the Webhook node receives { event, data: { executionId, workflowId, status, outputs, error, duration } }; event is workflow.completed or workflow.failed.

    To check a callback really came from Prompteryx, create a signing secret (whsec_…) on the API Keys page and verify the X-Prompteryx-Signature-256 header: in the Webhook node turn on Options → Raw Body, then add a Code node:

    const crypto = require('crypto')
    const secret = 'whsec_YOUR_SECRET'
    const item = $input.first()
    const h = item.json.headers
    const raw = Buffer.from(item.binary.data.data, 'base64').toString('utf8')
    const expected = 'v1=' + crypto.createHmac('sha256', secret).update(h['x-prompteryx-timestamp'] + '.' + raw).digest('hex')
    const fresh = Math.abs(Date.now() / 1000 - Number(h['x-prompteryx-timestamp'])) < 300
    if (!fresh || !(h['x-prompteryx-signature-256'] || '').split(',').map(s => s.trim()).includes(expected)) {
      throw new Error('Bad Prompteryx signature')
    }
    return [{ json: JSON.parse(raw) }]

    Self-hosted n8n may block require('crypto') in Code nodes; allow it with NODE_FUNCTION_ALLOW_BUILTIN=crypto. Full details: Webhooks.

    5. Start a Prompteryx workflow from any n8n event
    Without an API key: the workflow's own webhook trigger

    Add a Webhook Trigger node to the Prompteryx workflow in Visual Studio, choose its authentication (for example a secret in X-Webhook-Secret) and save. Then in n8n:

    HTTP Request: POST https://www.prompteryx.ai/api/v1/webhooks/WORKFLOW_ID
    Header: X-Webhook-Secret = your_workflow_secret
    Body (JSON): { "email": "{{ $json.email }}", "action": "process" }

    Inside Prompteryx the JSON arrives as the trigger's body. 30 calls a minute per caller IP; each call counts as a workflow run.

    6. Give an n8n AI Agent the Prompteryx tools (MCP)
    The agent decides when to run workflows, browse or use your connected apps
    1. Add an AI Agent node with a chat model.
    2. Under Tool, add MCP Client Tool.
    3. Endpoint: https://www.prompteryx.ai/api/mcp. If the node asks for a transport, choose HTTP Streamable (not SSE).
    4. Authentication: Bearer Auth with your px_live_ key (or Header Auth: Authorization = Bearer px_live_…).
    5. Tools to Include: Selected is a good habit, for example workflow_list, workflow_execute, browser_ai_action.

    Tool list and what each does: MCP tools. The step-by-step browser_* tools are not enabled on the hosted server; use browser_ai_action.

    Limits and errors

    60 requests a minute per API key (429 with Retry-After when exceeded). Workflow runs count against your plan's monthly executions; agent runs spend AI credits and cloud minutes (402 QUOTA_EXHAUSTED / 429 say which to top up).

    Every endpoint and field: REST API reference.