import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
const workflow = await client.workflows.create({ name: 'x' });
console.log(workflow.id);{
"id": "wf_abc123def456",
"tenantId": "tenant_123",
"name": "User Onboarding Workflow",
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"subTenantId": "sub_tenant_456",
"description": "Automated workflow for new user onboarding"
}Creates a new workflow for the tenant.
import Triglit from 'triglit';
const client = new Triglit({
apiKey: 'My API Key',
});
const workflow = await client.workflows.create({ name: 'x' });
console.log(workflow.id);{
"id": "wf_abc123def456",
"tenantId": "tenant_123",
"name": "User Onboarding Workflow",
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"subTenantId": "sub_tenant_456",
"description": "Automated workflow for new user onboarding"
}Chave de API do tenant (publishable key ou secret key)
Chave de API do tenant (publishable key ou secret key)
Sub-tenant identifier
Workflow created successfully
Unique workflow identifier
"wf_abc123def456"
Tenant identifier
"tenant_123"
Workflow name
"User Onboarding Workflow"
Whether the workflow is active
true
Creation timestamp
"2024-01-15T10:30:00.000Z"
Last update timestamp
"2024-01-15T10:30:00.000Z"
Sub-tenant identifier
"sub_tenant_456"
Workflow description
"Automated workflow for new user onboarding"
Was this page helpful?