On this page
Sommatic Docs
Open portal

Desktop Clipboard

Read/Write to System Clipboard.

View as Markdown
Open in
Input and output Available io.desktop.clipboard Version 1.0.0 Execution: async

Reads the text in the system clipboard, or writes text to it, on the machine that runs the worker.

How it works

  1. Resolves the node config. operation and content fall back to the same keys of the incoming payload when they are empty in the config; operation defaults to read.
  2. With write, writes content (an empty string when missing) to the clipboard and returns { result: { written: true } }.
  3. Any other value of operation reads the clipboard and returns its text as result.
  4. Any failure of the clipboard access leaves through error.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-copy-invoice-number",
  "label": "Copy invoice number",
  "operator_slug": "io.desktop.clipboard",
  "operator_version": "1.0.0",
  "config": {
    "operation": "write",
    "content": "{{ $json.invoice_number }}"
  }
}

Configuration

operation string Required

Default: read

Allowed values: readwrite

content string Optional

Content to write

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

operation
Only write writes; every other value, including an unknown one, reads the clipboard.

Output ports

out default

The clipboard was read (result is its text) or written (result is { written: true }).

Data
{
  "result": "INV-2026-0042"
}
error

The clipboard could not be accessed.

Data
{
  "error": "<clipboard error message>"
}

In expressions

What a later node can read from this node's output with $("Desktop Clipboard").item.json.<path> (write your node's label instead of Desktop Clipboard). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.

ExpressionEditorWorker
$("Desktop Clipboard").item.json.resultstring= "INV-2026-0042"Clipboard content (read) or success status (write)

Errors

Message Port Cause and fix
<clipboard error message> error The machine that runs the worker has no desktop session or clipboard utility available (for example, a headless server). Run this node only where a desktop session exists.

Input contract

operation string Required
content string Optional

Output contract

result string Optional

Clipboard content (read) or success status (write)

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "io.desktop.clipboard",
  "name": "Desktop Clipboard",
  "category": "io",
  "version": "1.0.0",
  "description": "Read/Write to System Clipboard.",
  "capabilities": [
    "clipboard",
    "desktop"
  ],
  "config_schema": {
    "type": "object",
    "properties": {
      "operation": {
        "type": "string",
        "enum": [
          "read",
          "write"
        ],
        "default": "read"
      },
      "content": {
        "type": "string",
        "description": "Content to write"
      }
    },
    "required": [
      "operation"
    ]
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "operation": {
        "type": "string"
      },
      "content": {
        "type": "string"
      }
    },
    "required": [
      "operation"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "result": {
        "type": "string",
        "description": "Clipboard content (read) or success status (write)"
      }
    }
  },
  "ports": [
    {
      "port_id": "out",
      "label": "Result",
      "description": "Operation successful",
      "is_default": true,
      "supports_condition": true
    },
    {
      "port_id": "error",
      "label": "Error",
      "description": "Clipboard access failure",
      "is_default": false,
      "supports_condition": false
    }
  ],
  "execution_mode": "async",
  "required_resources": [],
  "compatible_worker_pools": [
    "desktop-agent"
  ],
  "tags": [
    "desktop",
    "clipboard"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_link_loom",
    "profile": {
      "name": "Link Loom",
      "verified": true,
      "url": "https://me.veripass.com/link-loom",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Capabilities
clipboarddesktop
Tags
desktopclipboard

Notes and limits

  • The node acts on the clipboard of the host where the orchestrator worker runs, not on the user's browser.
  • Only text is supported. A write replaces the whole clipboard content.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs