Skip to main content

Execute Operations

executeWorkflow

Executes a workflow (multiple APIs or Endpoints) in a single call. Returns detailed step-by-step results. Parameters:
  • input: WorkflowInputRequest! - Either a workflow configuration or saved workflow ID
  • payload: JSON - Input data for the workflow (optional)
  • credentials: JSON - Runtime credentials for integrations (optional)
  • options: RequestOptions - Execution options (optional, see RequestOptions defaults)
Returns: WorkflowResult with individual step results and final output
mutation ExecuteWorkflow($input: WorkflowInputRequest!, $payload: JSON, $credentials: JSON, $options: RequestOptions) {
  executeWorkflow(input: $input, payload: $payload, credentials: $credentials, options: $options) {
    id
    success
    data
    error
    startedAt
    completedAt
    config {
      id
      version
      instruction
    }
    stepResults {
      stepId
      success
      data
      error
    }
  }
}

buildWorkflow

Builds a workflow automatically based on instructions and available integrations. Uses AI to determine the optimal sequence of API calls and data transformations. Supports both API-based workflows and transform-only workflows for data processing. Parameters:
  • instruction: String! - Natural language description of what the workflow should do (required)
  • payload: JSON - Sample input data to help with workflow generation (optional, supports file upload data)
  • integrationIds: [ID!] - List of integration IDs to use in the workflow (optional - omit for transform-only workflows)
  • responseSchema: JSONSchema - Desired output format (optional, auto-generated if not provided)
Returns: Complete Workflow configuration ready for execution
mutation BuildWorkflow(
  $instruction: String!,
  $payload: JSON,
  $integrationIds: [ID!],
  $responseSchema: JSONSchema
) {
  buildWorkflow(
    instruction: $instruction,
    payload: $payload,
    integrationIds: $integrationIds,
    responseSchema: $responseSchema
  ) {
    id
    version
    instruction
    steps {
      id
      apiConfig {
        id
        urlHost
        urlPath
        method
        instruction
      }
      integrationId
      executionMode
      inputMapping
      responseMapping
    }
    finalTransform
    responseSchema
    inputSchema
  }
}

generateStepConfig

Generates or refines an API configuration for a single workflow step using AI. Supports creating configurations from scratch, editing existing ones, or fixing failed configurations. Can work with or without an integration context. Use Cases:
  • Create: Generate a new API config from an instruction (e.g., “Get all active users from the database”)
  • Edit: Modify an existing config with new requirements (e.g., “Add pagination”)
  • Fix: Automatically repair a failed config when errors occur
Parameters:
  • integrationId: String - Integration to use for context/documentation (optional)
  • currentStepConfig: JSON - Existing API config to edit or fix (must include an instruction field)
  • stepInput: JSON - Sample input data available to the step (optional)
  • credentials: JSON - Available credentials for variable context (optional)
  • errorMessage: String - Error from failed execution (triggers fix mode, min 100 chars)
Returns: ApiConfig - The generated or updated API configuration
mutation GenerateStepConfig(
  $integrationId: String,
  $currentStepConfig: JSON,
  $currentDataSelector: String,
  $stepInput: JSON,
  $credentials: JSON,
  $errorMessage: String
) {
  generateStepConfig(
    integrationId: $integrationId,
    currentStepConfig: $currentStepConfig,
    currentDataSelector: $currentDataSelector,
    stepInput: $stepInput,
    credentials: $credentials,
    errorMessage: $errorMessage
  ) {
    id
    urlHost
    urlPath
    method
    instruction
    queryParams
    headers
    body
    responseSchema
    responseMapping
  }
}

Configuration Management

upsertWorkflow

Creates or updates a workflow configuration.
mutation UpsertWorkflow($id: ID!, $input: JSON!) {
  upsertWorkflow(id: $id, input: $input) {
    id
    version
    instruction
    steps {
      id
      apiConfig {
        id
        urlHost
        urlPath
        method
        instruction
      }
      integrationId
      executionMode
      inputMapping
      responseMapping
    }
    finalTransform
    responseSchema
    inputSchema
  }
}

deleteWorkflow

Deletes a workflow configuration. Returns true if successful.
mutation DeleteWorkflow($id: ID!) {
  deleteWorkflow(id: $id)
}

upsertWorkflowSchedule

Creates or updates a workflow schedule for recurring execution. Parameters:
  • schedule: WorkflowScheduleInput! - Schedule configuration (required)
mutation UpsertWorkflowSchedule($schedule: WorkflowScheduleInput!) {
  upsertWorkflowSchedule(schedule: $schedule) {
    id
    workflowId
    cronExpression
    timezone
    enabled
    payload
    options
    lastRunAt
    nextRunAt
    createdAt
    updatedAt
  }
}

deleteWorkflowSchedule

Deletes a workflow schedule. Returns true if successful.
mutation DeleteWorkflowSchedule($id: ID!) {
  deleteWorkflowSchedule(id: $id)
}

upsertIntegration

Creates or updates an integration configuration. Integrations represent connections to external APIs or databases. Parameters:
  • input: IntegrationInput! - Integration configuration (required)
  • mode: UpsertMode - CREATE, UPDATE, or UPSERT (default: UPSERT)
mutation UpsertIntegration($input: IntegrationInput!, $mode: UpsertMode = UPSERT) {
  upsertIntegration(input: $input, mode: $mode) {
    id
    name
    type
    urlHost
    urlPath
    credentials
    documentationUrl
    documentation
    documentationPending
    specificInstructions
    icon
    version
    createdAt
    updatedAt
  }
}

deleteIntegration

Deletes an integration configuration. Returns true if successful.
mutation DeleteIntegration($id: ID!) {
  deleteIntegration(id: $id)
}
See also: