# Jinba Workflow Automator

> Given a natural-language description of an enterprise workflow, emit a structured JSON automation definition with trigger, ordered steps, conditional branching, and tool/integration mappings — ready to wire into n8n, Temporal, or Zapier.

- Skill: `riteshkew/jinba-workflow-automator` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add riteshkew/jinba-workflow-automator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/riteshkew/jinba-workflow-automator/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: riteshkew (https://skillmd.com/u/riteshkew)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/riteshkew/jinba-workflow-automator

---


# Workflow

When this skill is invoked, the user provides a plain-English description of an enterprise automation they want to build. Your job is to parse that description and emit a complete, structured JSON automation definition that a developer can import into a real execution engine.

This skill produces the definition only. Runtime execution, credential provisioning, and deployment to an engine like n8n, Temporal, or Zapier are out of scope for v1 — that is the productionization gap the developer bridges after receiving this scaffold.

## Step 1 — Parse the natural-language workflow description

Read the user's description carefully and extract every distinct component:

- **Trigger:** What event starts the workflow? Identify the source system (e.g., Google Sheets row added, webhook POST, cron schedule, form submission) and the specific event type.
- **Steps:** List every distinct action in order. Each sentence or clause describing an action is typically one step.
- **Conditions / branching:** Identify any "if X then Y" logic. Note the condition expression and which steps it gates.
- **Tools and integrations:** For each step, identify the third-party service or API it requires (e.g., Clearbit for enrichment, HubSpot for CRM, Slack for notification, SendGrid for email).
- **Data flow:** Note which outputs from earlier steps feed into later steps as inputs.

If the description is ambiguous, resolve it conservatively: create a step, mark the field `"{{PLACEHOLDER}}"`, and add a comment in the step's `name` field noting the assumption.

## Step 2 — Map each step to a named tool and action

For every step identified in Step 1, assign:

- `tool`: the named integration (use the canonical service name in snake_case, e.g., `google_sheets`, `hubspot`, `slack`, `sendgrid`, `clearbit`, `salesforce`, `jira`, `github`)
- `action`: the specific API operation (e.g., `crm_create_contact`, `slack_post_message`, `send_email`, `http_request`)
- `inputs`: the parameters the action requires, using `{{trigger.row.field_name}}` for trigger data, `{{step_N.outputs.field}}` for upstream step outputs, and `{{env.VAR_NAME}}` for secrets/config

Use `on_error` values from this set: `halt_and_notify` (hard failure, stop the run), `continue` (soft failure, proceed), `continue_with_empty` (treat output as empty and continue), `retry_3x` (retry up to 3 times before halting).

## Step 3 — Construct the JSON automation definition

Emit a single JSON object with this top-level shape:

```
{
  "name": "<human-readable workflow name>",
  "version": "1.0.0",
  "description": "<one-sentence summary>",
  "trigger": { "type", "source", "event", "config": { ... } },
  "steps": [
    {
      "id": "step_N_<slug>",
      "name": "<human-readable name>",
      "action": "<action_type>",
      "tool": "<tool_id>",
      "depends_on": ["<step_id>", ...],
      "condition": "<optional expression — omit if unconditional>",
      "inputs": { ... },
      "outputs": { ... },
      "on_error": "<policy>"
    }
  ],
  "conditions": [
    {
      "id": "cond_<slug>",
      "description": "<plain-English explanation of the condition>",
      "expression": "<template expression>",
      "applied_to_steps": ["<step_id>", ...]
    }
  ],
  "tools": [
    {
      "id": "<tool_id>",
      "type": "<trigger_source | enrichment | crm | notification | email | storage | ...>",
      "auth_env_var": "<ENV_VAR_NAME>",
      "docs": "<canonical API docs URL>"
    }
  ],
  "env_vars_required": ["VAR_1", "VAR_2", ...],
  "execution_note": "This is a scaffold definition only. Wire it to n8n, Temporal, or Zapier to execute."
}
```

The output must be pure valid JSON — no Markdown fences, no prose before or after, no comments inside the JSON.

## Step 4 — Self-check before emitting

Before outputting, verify:

- Every step referenced in `conditions[].applied_to_steps` has a matching `id` in `steps[]`
- Every `depends_on` entry references a real step `id` defined earlier in the array
- Every `{{env.VAR}}` used in `inputs` is listed in `env_vars_required`
- Every tool used in a step has an entry in the `tools` array
- The `trigger.source` value matches the `id` of a tool in `tools[]` (type `trigger_source`)
- The document is syntactically valid JSON — no trailing commas, no single-quoted strings

If any check fails, fix it before emitting.

## Example

See `examples/input.md` for a sample natural-language workflow request (Google Sheets → Clearbit enrichment → HubSpot contact + deal → Slack notification → conditional VP email).

See `examples/output.md` for the complete JSON automation definition that faithfully encodes that workflow.

The example demonstrates:
- A row-added trigger on Google Sheets
- A `continue_with_empty` enrichment step (Clearbit may not match every domain)
- Two sequential CRM steps with `depends_on` chaining
- A Slack notification with inline template expressions combining trigger data and upstream step outputs
- A conditional email step gated on `estimated_deal_size > 50000`
- Full `tools[]` manifest and `env_vars_required` list for developer handoff

