Workflow

From stahura/domo-ai-vibe-rules · View interactive version

Workflow is an AI agent skill from the GitHub repository stahura/domo-ai-vibe-rules. Start and monitor workflows via WorkflowClient with strict input variable matching.

How to use this skill

Skill file

Rule: Domo App Platform Workflows (Toolkit-First)

This rule is toolkit-first. Use WorkflowClient for workflow operations in apps.

Canonical Client

yarn add @domoinc/toolkit
import { WorkflowClient } from '@domoinc/toolkit';

const startResponse = await WorkflowClient.startModel('myWorkflow', {
  inputVar: 'value',
  anotherVar: 123
});
const instance = startResponse.body;

Check status:

const statusResponse = await WorkflowClient.getInstance('myWorkflow', instance.id);
const status = statusResponse.body.status;

Correct method usage (aliases, not UUIDs)

WorkflowClient workflow methods use the workflow alias from manifest.json workflowMapping, not the UUID.

await WorkflowClient.startModel('myWorkflow', { inputVar: 'value' });
await WorkflowClient.getAllModels();          // or getAllModels(true)
await WorkflowClient.getModelDetails('myWorkflow');
await WorkflowClient.getInstance('myWorkflow', 'instance-id');

Manifest Requirements

Workflows still require workflowMapping entries in manifest.json.

{
  "workflowMapping": [
    {
      "alias": "sendReport",
      "modelId": "d1373fa7-9df8-45d3-80ba-f931dda169b4",
      "parameters": [
        { "aliasedName": "reportType", "type": "string", "list": false, "children": null },
        { "aliasedName": "recipients", "type": "string", "list": true, "children": null }
      ]
    }
  ]
}

Card mapping and input contract reminder

Error Handling Pattern

async function runWorkflow(workflowAlias: string, payload: Record<string, unknown>) {
  try {
    const response = await WorkflowClient.startModel(workflowAlias, payload);
    return response.body;
  } catch (error) {
    console.error(`WorkflowClient.startModel failed for ${workflowAlias}`, error);
    throw error;
  }
}

Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.