servicechannel

n8n community node for the ServiceChannel API (work orders, invoices, proposals)

Package Information

Released: 5 mo ago
Downloads: 2 weekly / 65 monthly
Latest Version: 0.1.5
Author: Synetix Systems

Documentation

n8n-nodes-servicechannel

Custom n8n community node for the ServiceChannel API.

Supports:

  • Work Orders — list (OData), get, create, update status, complete, cancel
  • Invoices — list, get, create on a work order
  • Proposals (NTEs) — list, get, create, approve, reject

Auth: OAuth2 Resource Owner Password Credentials grant. Production and Sandbox2 environments selectable per credential.

Install

Option A — Community Nodes UI (after npm publish)

  1. cd n8n-nodes-servicechannel && npm publish (or publish to a private registry).
  2. In n8n: Settings → Community Nodes → Install → enter n8n-nodes-servicechannel → Install.

Option B — Local install on the n8n host (no npm publish)

  1. From this directory: npm run build && npm pack → produces n8n-nodes-servicechannel-0.1.0.tgz.
  2. Copy the tarball to the n8n host's custom-nodes directory:
    # Default location inside the container/host
    N8N_CUSTOM_DIR="${N8N_USER_FOLDER:-$HOME/.n8n}/custom"
    mkdir -p "$N8N_CUSTOM_DIR"
    cd "$N8N_CUSTOM_DIR"
    npm init -y                     # one-time, only if package.json missing
    npm install /path/to/n8n-nodes-servicechannel-0.1.0.tgz
    
  3. Restart n8n. The node appears in the editor as ServiceChannel.

For Docker installs, mount ~/.n8n to a host volume and run the commands above inside the container, or bake the package into a custom image.

Credential setup

Create a ServiceChannel API credential with:

Field Source
Environment Production or Sandbox2
Client ID ServiceChannel-issued OAuth client
Client Secret ServiceChannel-issued OAuth secret
Username ServiceChannel user account
Password ServiceChannel user password

The node fetches an access token via POST /oauth/token (Basic-auth client credentials, grant_type=password) and caches it. n8n re-runs preAuthentication automatically on 401, so token expiry (default 600s) is handled.

Endpoints used

Op Method URL
WorkOrder.list GET /v3/odata/workorders
WorkOrder.get GET /v3/workorders/{id}
WorkOrder.create POST /v3/workorders
WorkOrder.updateStatus POST /v3/workorders/{id}/status
WorkOrder.complete POST /v3/workorders/{id}/complete
WorkOrder.cancel POST /v3/workorders/{id}/cancel
Invoice.list GET /v3/odata/invoices
Invoice.get GET /v3/invoices/{id}
Invoice.create POST /v3/workorders/{workOrderId}/invoices
Proposal.list GET /v3/odata/proposals
Proposal.get GET /v3/proposals/{id}
Proposal.create POST /v3/workorders/{workOrderId}/proposals
Proposal.approve POST /v3/proposals/{id}/approve
Proposal.reject POST /v3/proposals/{id}/reject

Bodies are passed through as raw JSON via the Request Body (JSON) field. Schemas: see ServiceChannel Swagger at https://developer.servicechannel.com/swagger/index.html.

Build

npm install
npm run build      # tsc + gulp icons
npm run lint       # optional

License

MIT

Discussion