# Import local storage

Node type `browser_importLocalStorage`

## What it does

Write supplied values to page local storage.

## Desktop client configuration

![Import local storage configuration in the desktop client](/assets/import-local-storage.fddc06e7880f552c64e75987401f8d7489d77be970c8c146e1669b69152fc33a.0538f3a9.webp)

Captured in the English interface of MoreLogin Desktop V2.73.101.

## Inputs

These fields belong in `data.browserUi.inputs`.

| Field | Type or values | Schema required | Execution default | Description and bounds |
|  --- | --- | --- | --- | --- |
| `dataSource` | `"input"` / `"file"` (supports variable references) | No | `"input"` | Data source. Editor initial value `"input"` |
| `importFile` | `string` / `object` | No | — | JSON file |
| `storage` | `["null","boolean","number","string"]` / array<`JSON`> / `object` (supports variable references) | No | — | Local Storage data |
| `importMode` | `"merge"` / `"replace"` (supports variable references) | No | `"merge"` | Import mode. Editor initial value `"merge"` |
| `refreshAfterImport` | `boolean` (supports variable references) | No | `false` | Refresh page after import. Editor initial value `false` |


## Mode requirements and limits

- dataSource=input requires storage (an object or JSON string); file requires importFile (JSON text or {content:JSON text}). The current page must be HTTP/HTTPS.
- Validation code `RPA_NODE_INPUT_INVALID`


## Input references

| Field | Allowed forms |
|  --- | --- |
| `dataSource` | `literal`, `template` |
| `importFile` | `literal` |
| `storage` | `literal`, `template` |
| `importMode` | `literal`, `template` |
| `refreshAfterImport` | `literal`, `template` |


## Outputs

| Output field | Type or values |
|  --- | --- |
| `origin` | `string` |
| `importedCount` | `number` |
| `importMode` | `"merge"` / `"replace"` |
| `refreshed` | `boolean` |


Reference published fields as `${nodeId.data.field}`.

## JSON example

A complete node object for a workflow's `nodes` array or another node's `blocks`.

```json
{
  "id": "restore_settings",
  "type": "browser_importLocalStorage",
  "data": {
    "title": "Restore the saved site settings",
    "browserAction": "importLocalStorage",
    "browserUi": {
      "inputs": {
        "dataSource": "input",
        "storage": {
          "theme": "dark",
          "language": "en"
        },
        "importMode": "merge",
        "refreshAfterImport": true
      },
      "exception": {
        "timeout": 30000,
        "policy": "interrupt"
      }
    }
  }
}
```

[Back to the node catalog](/browser-rpa/nodes)