feat(Airtop Node): Support running an agent with a specific browser profile#34933
feat(Airtop Node): Support running an agent with a specific browser profile#34933theogravity wants to merge 1 commit into
Conversation
|
✅ CLA Check passed. All contributors on this PR have signed the n8n CLA — thank you! |
ae8fcab to
fbbbfda
Compare
|
/cla-check |
|
Hey @theogravity, Thank you for your contribution. We appreciate the time and effort you’ve taken to submit this pull request. Before we can proceed, please ensure the following: Regarding new nodes: If your node integrates with an AI service that you own or represent, please email nodes@n8n.io and we will be happy to discuss the best approach. About review timelines: Thank you again for contributing to n8n. |
fbbbfda to
21145de
Compare
|
Companion documentation PR: |
|
@cesars-gh FYI |
There was a problem hiding this comment.
All reported issues were addressed across 21 files
Architecture diagram
sequenceDiagram
participant WF as n8n Workflow Engine
participant Node as Airtop Node (Run Agent)
participant API as Airtop REST API
participant Hooks as Airtop Hooks API
Note over Node: NEW: Optional Browser Profile ID field
WF->>Node: execute("agent", "run") with parameters
Node->>Node: Read 'profileId' parameter, trim whitespace
alt profileId is non-empty
Node->>Node: Validate against PROFILE_IDENTIFIER_REGEX (alphanum + hyphens)
alt Invalid (e.g. "bad profile!")
Node-->>WF: Throw NodeOperationError('Browser Profile ID should only contain letters, numbers and dashes')
else Valid
Node->>API: GET /agents/{agentId} (get webhookId)
API-->>Node: { webhookId }
Node->>Node: Build invokeUrl = /agents/{agentId}/webhooks/{webhookId}
Node->>Hooks: POST invokeUrl?profileId={trimmedProfileId} with agent parameters
Hooks-->>Node: { invocationId }
alt awaitExecution is true
loop poll until completed or timeout
Node->>Hooks: GET /agents/{agentId}/invocations/{invocationId}/result
Hooks-->>Node: { status, output }
end
end
Node-->>WF: Return execution data with invocationId (and output if awaited)
end
else profileId is empty
Node->>API: GET /agents/{agentId} (get webhookId)
API-->>Node: { webhookId }
Node->>Node: Build invokeUrl = /agents/{agentId}/webhooks/{webhookId}
Note over Node: No query param → uses agent's default profile
Node->>Hooks: POST invokeUrl with agent parameters only
Hooks-->>Node: { invocationId }
alt awaitExecution is true
loop poll until completed or timeout
Node->>Hooks: GET /agents/{agentId}/invocations/{invocationId}/result
Hooks-->>Node: { status, output }
end
end
Node-->>WF: Return execution data
end
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
…ackfill tests Squashed Airtop node changes (AIR-5022): - Add an optional Browser Profile ID field to the agent Run operation; when set it's sent to the agent webhook as a ?profileId= query param, omitted otherwise. - Extract a shared PROFILE_IDENTIFIER_REGEX used by both the agent field and the session profileName validation (matches the backend alphanum-hyphen rule). - Relabel the session profile field to "Browser Profile ID" for consistency (display/validation text only; the profileName parameter key and API contract are unchanged, so existing workflows keep working). - Add unit tests for the previously-untested getLiveView, list, load and upload operations and expanded agent run tests. - Add NodeTestHarness workflow tests for the agent Run operation (asserting the ?profileId= query param), plus the window (get live view, list) and file (load, upload) operations. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21145de to
87d2939
Compare
Summary
Adds one option to the Airtop node's Run an agent operation and improves the node's test coverage. No new operations or dependencies are introduced.
New feature — Browser Profile ID on Run an agent
A workflow can now run a published agent against a specific browser profile instead of always using the agent's default. When the optional Browser Profile ID field is set, the identifier is sent to the agent webhook as a
?profileId=query parameter; when empty it's omitted and the agent's default profile is used. The value is trimmed and validated against the same alphanumeric-and-hyphen rule the Airtop API enforces, via a sharedPROFILE_IDENTIFIER_REGEXthat the existing session profile validation now also uses. Additive optional field; no nodetypeVersionbump.Consistency — session profile field relabelled
The existing profile field on Create session, Save profile on termination, and the "automatically create session" mode of the extraction/interaction/window operations is relabelled Browser Profile ID. This is a display-label, description, and validation-message change only — the
profileNameparameter key and the outgoing API request are unchanged, so existing workflows keep working.Test coverage (no behaviour change)
NodeTestHarnessworkflow tests for Run an agent (asserting the?profileId=query param is sent when a Browser Profile ID is set and omitted when it isn't, including an await-execution + poll case), and for Get live view, List windows, Load a file, and Upload a file.How to test
?profileId=<id>).profileIdsent).bad profile!→ the node raises a validation error before making any request.Automated tests:
Related Linear tickets, Github issues, and Community forum posts
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(n/a)🤖 Generated with Claude Code