n8n-nodes-remote-desktop
v2.0.24
Published
n8n node for Remote Desktop automation - single Action node with auto-session
Maintainers
Readme
n8n-nodes-remote-desktop
Custom n8n nodes for automating remote desktops via the Remote Desktop Client API.
Nodes
Remote Desktop Session
Manages the lifecycle of remote desktop sessions.
Operations:
- Start: Create a new session with optional configuration
- Info: Get session details, status, and executed actions
- Close: Close session and cleanup resources (stops recordings, kills processes)
Remote Desktop Action (Sync)
Execute a single action immediately within a session.
- Waits for the action to complete
- Returns the action result
- Supports all available actions (app, screen, system, playwright)
Remote Desktop Action (Async)
Build and execute action workflows using a builder pattern.
Operations:
- Add Action: Queue an action for later execution (accumulated in workflow data)
- Execute: Run all queued actions, optionally waiting for completion
Installation
For Development
cd n8n_nodes
npm install
npm run buildLink to n8n
# In this directory
npm link
# In your n8n installation
npm link n8n-nodes-remote-desktopFor Production
# In your n8n custom nodes directory
npm install /path/to/n8n_nodesUsage
Sync Workflow Example
[Session: Start] → [Action Sync: app.launch] → [Action Sync: screen.screenshot] → [Session: Close]- Session (Start): Creates a new session, outputs
sessionId - Action Sync: Picks up
sessionIdautomatically, executes action - Action Sync: Chains another action in the same session
- Session (Close): Closes session and cleans up resources
Async Builder Workflow Example
[Session: Start] → [Action Async: Add] → [Action Async: Add] → [Action Async: Execute] → [Session: Close]- Session (Start): Creates session
- Action Async (Add): Adds first action to queue
- Action Async (Add): Adds second action to queue
- Action Async (Execute): Sends all queued actions, waits for completion
- Session (Close): Cleanup
Available Actions
Actions are fetched dynamically from the API. Categories include:
app.*: Application management (launch, close, list)screen.*: Screen recording and screenshotssystem.*: System info, stats, waitplaywright.*: Browser automation (navigate, click, fill, etc.)
Configuration
Credentials
Set up the Remote Desktop API credentials:
- In n8n, go to Credentials → New
- Search for "Remote Desktop API"
- Enter your API URL (e.g.,
http://localhost:8000) - Test the connection (calls
/healthendpoint)
Session Options
When starting a session, you can configure:
- Max Action Retries: Number of retry attempts per action (default: 3)
- Retry Delay: Seconds between retries (default: 1)
- Action Timeout: Default timeout per action in seconds (default: 60)
Data Flow
Each node preserves data from previous nodes and adds its own output:
// After Session (Start)
{ sessionId: "abc123", status: "idle" }
// After Action Sync (app.launch)
{ sessionId: "abc123", pid: 1234, success: true, lastAction: {...} }
// After Action Sync (screen.screenshot)
{ sessionId: "abc123", pid: 1234, filename: "shot.png", lastAction: {...} }The sessionId flows through automatically, so you don't need to manually wire it.
Development
# Install dependencies
npm install
# Generate action properties (requires API to be running)
# Set REMOTE_DESKTOP_API_URL if API is not on localhost:8000
REMOTE_DESKTOP_API_URL=http://your-api:8000 npm run generate:properties
# Build (automatically runs generate:properties first)
npm run build
# Watch mode
npm run dev
# Lint
npm run lint
npm run lint:fixBuilding Action Properties
The nodes use build-time property generation to create dynamic form fields for each action. This means:
- At build time, the
generate:propertiesscript fetches all actions from your API - Generates TypeScript code with properties for each action parameter
- Properties are shown/hidden based on selected action using
displayOptions
To regenerate properties:
# With API running on localhost:8000
npm run generate:properties
# With custom API URL
REMOTE_DESKTOP_API_URL=http://your-api:8000 npm run generate:propertiesThe generated file nodes/RemoteDesktop/generated-action-properties.ts is committed to git so builds work without requiring the API to be available.
License
MIT
