POST
/
api
/
v1
/
insights
/
workflows
import os
from syllable_sdk import SyllableSDK
from syllable_sdk.utils import parse_datetime


with SyllableSDK(
    api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:

    res = ss_client.insights.workflows.create(request={
        "name": "summary-workflow",
        "source": "transfer",
        "description": "Default workflow - generates a summary of the call",
        "insight_tool_ids": [
            1,
        ],
        "conditions": {
            "min_duration": 120,
            "max_duration": 600,
            "sample_rate": 2,
            "agent_list": [
                866324,
                826325,
            ],
            "prompt_list": [
                "123324",
            ],
            "folder_list": [
                16754,
                67535,
            ],
        },
        "start_datetime": parse_datetime("2025-05-07T00:00:00Z"),
        "end_datetime": parse_datetime("2025-05-08T00:00:00Z"),
    })

    # Handle response
    print(res)
{
  "name": "summary-workflow",
  "source": "agent",
  "description": "Default workflow - generates a summary of the call",
  "insight_tool_ids": [
    1
  ],
  "conditions": {
    "min_duration": 120,
    "max_duration": 600,
    "sample_rate": 2,
    "agent_list": [
      866324,
      826325
    ],
    "prompt_list": [
      123324
    ],
    "folder_list": [
      16754,
      67535
    ]
  },
  "start_datetime": "2025-05-07T00:00:00Z",
  "end_datetime": "2025-05-08T00:00:00Z",
  "id": 1,
  "insight_tools": [
    {
      "name": "summary-tool",
      "description": "This tool uses GPT4.1 to generate a summary of the call",
      "version": 1,
      "tool_arguments": "<any>",
      "insight_tool_definition_id": 1,
      "id": 1,
      "insight_tool_definition": {
        "id": 1,
        "name": "llm_tool",
        "type": "<string>",
        "description": "An LLM tool evaluates a transcript with a given prompt",
        "tool_parameters": "<any>",
        "tool_result_set": "<any>"
      },
      "created_at": "2025-05-07T00:00:00Z",
      "updated_at": "2025-05-08T00:00:00Z",
      "last_updated_by": "user@email.com"
    }
  ],
  "status": "ACTIVE",
  "estimate": {
    "backfill_count": 100,
    "backfill_duration": 1000,
    "estimated_daily_count": 10,
    "estimated_daily_duration": "3674.11",
    "estimated_daily_cost": "45.25",
    "estimated_backfill_cost": "4561.00"
  },
  "created_at": "2025-05-07T00:00:00Z",
  "updated_at": "2025-05-08T00:00:00Z",
  "last_updated_by": "user@email.com"
}

Authorizations

Syllable-API-Key
string
header
required

Body

application/json

Request model to create/update an insight workflow.

Response

200
application/json
Successful Response

Response model for an insight workflow.