← Back to docs

Actions

Actions define what a workflow does after a trigger fires. SyncToScale supports create, update, search, transformation, and multi-step logic across connected applications.

Overview

When a workflow runs, the incoming payload is passed through a sequence of steps called actions. Each action uses the authenticated connection to perform an operation in the target system.


Common Action Types


POST Create / Update Example

POST /actions/run
{
  "provider": "hubspot",
  "action": "create_record",
  "object": "contact",
  "payload": {
    "email": "test@example.com",
    "first_name": "Jordan",
    "last_name": "Doe"
  }
}

The action executes using the authenticated HubSpot connection, applying object-specific validations and required fields.


Upsert Logic

{
  "provider": "bamboohr",
  "action": "upsert_employee",
  "lookup": { "email": "jordan@example.com" },
  "payload": {
    "first_name": "Jordan",
    "last_name": "Doe",
    "department": "Engineering"
  }
}

SyncToScale determines whether the employee already exists, then performs the appropriate action.


Search Actions

{
  "provider": "google_workspace",
  "action": "search_user",
  "criteria": {
    "email": "jordan@example.com"
  }
}

Search results can be used to drive conditional branching inside the workflow.


Transformation Actions

{
  "action": "transform",
  "expression": {
    "full_name": "payload.first_name + ' ' + payload.last_name"
  }
}

Nova AI can optionally infer missing fields or recommend mapping corrections.


Error Handling in Actions

SyncToScale retries certain actions automatically using exponential backoff.


Action Execution Flow

{
  "step": "create_record",
  "provider": "slack",
  "object": "user",
  "status": "success",
  "attempts": 1,
  "timestamp": "2025-01-20T14:22:00Z"
}

This log entry shows the executed step and metadata for debugging.