Playwright Automation icon

Playwright Automation

Playwright Automation for n8n

Session → Get Storage State

AI-generated

Summary

Retrieve the stored cookies and local storage state from a browser session.

Inputs

  • sessionId (required) — The ID of the existing browser session to retrieve storage state from.
  • screenshotOnFail — Whether to capture a screenshot if the operation fails and attach it to the error.

Output shape

{ success: boolean, state: object }

The returned state object contains cookies and origins as captured by Playwright's context.storageState().

Examples

Example 1: Get storage state after logging in

Create a session via the Create operation, then use this operation with the returned sessionId to capture cookies/localStorage for reuse in later workflows.

Links

Discussion