Show examples in:
    Retrieve a workflow

    Returns

    Returns a workflow resource object.

    Examples

    Example code:
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const workflowId = '439239';
    const workflow = await client.workflows.find(workflowId);
    console.log(workflow);
    }
    run();
    Returned output:
    {
    id: '439239',
    name: 'Approval by editors required',
    api_key: 'approval_by_editors',
    stages: [
    {
    id: 'waiting_for_review',
    name: 'Waiting for review',
    initial: true
    }
    ]
    }