Create workflow
/workflow
Request Body
Workflow execution configuration.
JSONata condition evaluated before executing workflow steps.
integration.name = 'calcom'4 properties
Action executed by the step.
run_sync_jobJSONata expression evaluated at runtime to generate the step execution payload.
(
$sync_job_id := $mapValues(integration.name,{
"calcom": "51b79ace-a7b4-4077-93ba-8048a06ece2b"
});
{
"sync_job_id": $sync_job_id,
"integrated_account_id": integrated_account_id,
"webhook_id": "9fda519d-148f-4cc5-bbac-4e373b16e5d4"
}
)
Optional cron expression for scheduled execution.
0 */6 * * *Step execution type.
runrun
The environment in which this workflow is created.
05daecaf-4365-42e8-8370-8127de5dd717Optional workflow ID. If not provided, it will be generated.
4a4de828-f4c9-4bea-8ef4-2d705aec43bcThe event that triggers this workflow.
integrated_account:connectedResponse Body
Workflow execution configuration.
JSONata condition evaluated before executing workflow steps.
integration.name = 'calcom'4 properties
Action executed by the step.
run_sync_jobJSONata expression evaluated at runtime to generate the step execution payload.
(
$sync_job_id := $mapValues(integration.name,{
"calcom": "51b79ace-a7b4-4077-93ba-8048a06ece2b"
});
{
"sync_job_id": $sync_job_id,
"integrated_account_id": integrated_account_id,
"webhook_id": "9fda519d-148f-4cc5-bbac-4e373b16e5d4"
}
)
Optional cron expression for scheduled execution.
0 */6 * * *Step execution type.
runrun
05daecaf-4365-42e8-8370-8127de5dd7174a4de828-f4db-4c9e-adfd-434e0864c3c7integrated_account:connectedcurl -X POST 'https://api.truto.one/workflow' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "4a4de828-f4c9-4bea-8ef4-2d705aec43bc",
"environment_id": "05daecaf-4365-42e8-8370-8127de5dd717",
"trigger_name": "integrated_account:connected",
"config": {}
}'const body = {
"id": "4a4de828-f4c9-4bea-8ef4-2d705aec43bc",
"environment_id": "05daecaf-4365-42e8-8370-8127de5dd717",
"trigger_name": "integrated_account:connected",
"config": {}
};
const response = await fetch('https://api.truto.one/workflow', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/workflow"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
payload = {
"id": "4a4de828-f4c9-4bea-8ef4-2d705aec43bc",
"environment_id": "05daecaf-4365-42e8-8370-8127de5dd717",
"trigger_name": "integrated_account:connected",
"config": {}
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())import Truto from '@truto/truto-ts-sdk';
const truto = new Truto({
token: '<your_api_token>',
});
const body = {
"id": "4a4de828-f4c9-4bea-8ef4-2d705aec43bc",
"environment_id": "05daecaf-4365-42e8-8370-8127de5dd717",
"trigger_name": "integrated_account:connected",
"config": {}
};
const result = await truto.workflow.create(body);
console.log(result);import asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
body = {
"id": "4a4de828-f4c9-4bea-8ef4-2d705aec43bc",
"environment_id": "05daecaf-4365-42e8-8370-8127de5dd717",
"trigger_name": "integrated_account:connected",
"config": {}
}
result = await truto_api.workflows.create(body)
print(result)
asyncio.run(main())