Skip to main content
PropOps embeds n8n as its workflow automation engine. You can trigger workflows from external systems, list and manage workflows from the PropOps API, and subscribe to PropOps events.
n8n integration must be enabled and configured in Admin → Settings → Integrations → n8n. A self-hosted or n8n Cloud instance URL and API key are required.

n8n Workflows API

All workflow endpoints are restricted to Staff users with the page.settings.configuration permission.

List workflows

GET /api/n8n/workflows?action=list Returns all workflows registered in the connected n8n instance. Required permission: page.settings.configuration
Account types: Staff only
curl -X GET "https://propops.yourcompany.com/api/n8n/workflows?action=list" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": [
    {
      "id": "wf_001",
      "name": "New Job Notification",
      "active": true,
      "trigger": "webhook",
      "last_executed": "2024-06-14T09:45:00Z",
      "execution_count": 142
    }
  ]
}

Get a workflow

GET /api/n8n/workflows?action=get&workflow_id=<id> Returns full details for a specific workflow including node configuration. Required permission: page.settings.configuration
action
string
required
Must be get.
workflow_id
string
required
n8n workflow ID.

Get workflow executions

GET /api/n8n/workflows?action=executions&workflow_id=<id> Returns the execution history for a specific workflow. Required permission: page.settings.configuration
action
string
required
Must be executions.
workflow_id
string
required
n8n workflow ID.
limit
integer
default:"20"
Maximum executions to return.
curl -X GET "https://propops.yourcompany.com/api/n8n/workflows?action=executions&workflow_id=wf_001&limit=10" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": [
    {
      "execution_id": "exec_88",
      "status": "success",
      "started_at": "2024-06-14T09:45:00Z",
      "finished_at": "2024-06-14T09:45:02Z",
      "duration_ms": 1840
    }
  ]
}

Toggle a workflow

GET /api/n8n/workflows?action=toggle&workflow_id=<id> Enables or disables a workflow. A disabled workflow will not execute even if triggered. Required permission: page.settings.configuration

Trigger a workflow manually

POST /api/n8n/workflows Manually triggers a workflow with optional payload data. Required permission: page.settings.configuration
Requires CSRF token.
action
string
required
Must be trigger.
workflow_id
string
required
n8n workflow ID to trigger.
payload
object
Optional JSON payload passed to the workflow trigger node.
csrf_token
string
required
CSRF token from GET /api/security/csrf-token.
curl -X POST "https://propops.yourcompany.com/api/n8n/workflows" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "trigger",
    "workflow_id": "wf_001",
    "payload": {
      "job_id": 1050,
      "event": "job_created"
    },
    "csrf_token": "<csrf-token>"
  }'
{
  "success": true,
  "data": {
    "execution_id": "exec_89",
    "status": "running"
  },
  "message": "Workflow triggered"
}

Test a workflow

POST /api/n8n/workflows Runs a workflow in test mode — executes the logic but suppresses external side-effects (email sending, third-party API calls) if the workflow supports test mode. Required permission: page.settings.configuration
Requires CSRF token.
action
string
required
Must be test.
workflow_id
string
required
n8n workflow ID.
csrf_token
string
required
CSRF token.

Get workflow stats

GET /api/n8n/workflows?action=stats Returns aggregate execution statistics — total runs, success rate, and average duration. Required permission: page.settings.configuration
curl -X GET "https://propops.yourcompany.com/api/n8n/workflows?action=stats" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "data": {
    "total_workflows": 8,
    "active_workflows": 6,
    "total_executions_30d": 4812,
    "success_rate_percent": 98.7,
    "avg_duration_ms": 940
  }
}

Webhook events

When n8n is connected, PropOps publishes the following events to configured webhook workflows. You can build n8n workflows that listen for these events and forward them to Slack, email, third-party CRMs, or any HTTP endpoint.
EventDescription
job.createdA new job has been raised
job.updatedA job field has been changed
job.status_changedA job’s status has moved to a new stage
job.completedA job has been marked as completed
job.recalledA completed job has been recalled
job.assignedA contractor or agent has been assigned to a job
case_note.createdA case note has been added to a job
document.uploadedA document or photo has been uploaded to a job
invoice.createdAn invoice has been raised for a job
invoice.paidAn invoice has been marked as paid
user.createdA new user account has been created
tenant.createdA new tenant record has been created
certification.expiringA contractor certification expires within 30 days
security.alertA security event has been triggered

Example event payload

{
  "event": "job.status_changed",
  "timestamp": "2024-06-14T09:45:00Z",
  "instance": "https://propops.yourcompany.com",
  "data": {
    "job_uuid": "550e8400-e29b-41d4-a716-446655440001",
    "job_ref": "JOB-1050",
    "previous_status": "Open",
    "new_status": "In Progress",
    "changed_by": {
      "user_id": 12,
      "name": "Jane Smith",
      "account_type": "staff"
    }
  }
}

Cron webhook

GET /api/cron/webhook Internal endpoint called by the PropOps cron job to trigger scheduled workflow executions. Not intended for direct API use — the platform calls this endpoint automatically.
To configure scheduled automations, use n8n’s built-in Schedule trigger node rather than calling the cron endpoint directly.