> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glasswarp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use with n8n

> When an n8n workflow hits a Windows app with no connector, Glasswarp is that step — HTTP Request, not a community node.

n8n stays the brain and the clock. Glasswarp is eyes and hands on a Windows PC
you or your client already own. There is **no official Glasswarp n8n node**
today. You call the same Platform API with **HTTP Request** nodes.

This is the hop when the canvas reaches a desktop app that has no API — not a
replacement for n8n, UiPath Orchestrator, or a job runner we host.

<Note>
  Prerequisite: the PC owner [installs the host](/get-started/install-host)
  (no Glasswarp account on that machine). You [pair the tray code](/get-started/pair-rig)
  while logged in and turn on **API access**. Create an API key in
  [Console → API Keys](https://www.glasswarp.com/console/keys).
</Note>

## What you get

| n8n keeps                                          | Glasswarp provides                              |
| -------------------------------------------------- | ----------------------------------------------- |
| Trigger, schedule, retries, the rest of the canvas | Session on a real Windows PC                    |
| Your logic (IF, Code, LLM nodes)                   | Observe (text + click targets) and native input |
| Credentials store                                  | Kill switch, on-screen indicator, Live View     |

Sessions meter **wall-clock minutes** from start to end. Always `DELETE` the
session — the importable workflow does.

## Import the smoke workflow

The first workflow **does not click**. It lists a usable PC, starts a desktop
session, observes **text and targets only** (`image=0` — no JPEG, so the HTTP
node does not choke on a 4K frame), then ends the session.

1. Download
   [`n8n-observe-session.json`](https://www.glasswarp.com/n8n-observe-session.json).
2. In n8n: **⋯ → Import from File** (or Import from URL with that JSON link).
3. Create a **Header Auth** credential named **Glasswarp API**:
   * Name: `Authorization`
   * Value: `Bearer gw_live_sk_...` (the word `Bearer`, a space, then your key)
4. Attach that credential on every **HTTP Request** node (Import will prompt).
5. Confirm the host is **online** and API access is **on**.
6. **Test workflow**. Open **[Console → Sessions](https://www.glasswarp.com/console/sessions)**
   and click **Eye** while it runs — Live View is how you watch; this page does
   not add a “see the PC” button in Console.

The last node must succeed. If observe fails, the template still attempts
**End session** (`onError: continue` on observe). If **Start session** never
ran, there is nothing to end.

### If import complains about the credential id

Delete the dummy `GLASSWARP_HEADER_AUTH` credential reference and pick your
Header Auth credential on each HTTP Request node. The name **Glasswarp API**
is only a label.

## HTTP map (same API)

Base URL: `https://signal.glasswarp.com`. Header: `Authorization: Bearer <key>`.

| Step     | Method   | Path                                                   |
| -------- | -------- | ------------------------------------------------------ |
| List PCs | `GET`    | `/v1/rigs`                                             |
| Start    | `POST`   | `/v1/sessions` body `{ "rig_id", "mode": "desktop" }`  |
| Observe  | `GET`    | `/v1/sessions/{id}/observe?image=0`                    |
| Input    | `POST`   | `/v1/sessions/{id}/input` body `{ "events": [ ... ] }` |
| End      | `DELETE` | `/v1/sessions/{id}`                                    |

Usable PC: `online === true` **and** `api_access_enabled === true`. Full
contract: [API reference](/api-reference/overview).

<Warning>
  Default observe includes a JPEG (`jpeg_base64`). For n8n HTTP Request, start
  with `image=0` (text + targets). Request an image only when an LLM node must
  see pixels — then cap with `max_width=960&quality=60`.
</Warning>

## After the smoke: click a named control

Hardcoding “click Export” is as brittle as a selector farm. For a **stable**
dialog you have watched in Live View, resolve a target by `name` from
`observe`, then `POST /input` with a `mouse_click` at the target center
(`x + w/2`, `y + h/2`, native coordinates). For messy screens, put an **LLM
node** on the observe `text.summary` / `targets` and let n8n decide — Glasswarp
still does not own the brain.

Always `DELETE` the session in a final node, including on the error path.

## Cloud vs self-hosted n8n

Both work. The Windows host is the customer's PC; n8n only needs outbound HTTPS
to `signal.glasswarp.com`. Do not put the Glasswarp host installer on the n8n
server unless that server **is** the Windows PC you mean to drive.

## Related

* [Pair a PC](/get-started/pair-rig)
* [Ways to run agents](/guides/ways-to-run-agents)
* [Observe](/guides/observe)
* [Live View](/guides/live-view)
* [Connect via MCP](/get-started/mcp) — Cursor / Claude, not n8n
