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_stepshas a matchingidinsteps[] - Every
depends_onentry references a real stepiddefined earlier in the array - Every
{{env.VAR}}used ininputsis listed inenv_vars_required - Every tool used in a step has an entry in the
toolsarray - The
trigger.sourcevalue matches theidof a tool intools[](typetrigger_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_emptyenrichment step (Clearbit may not match every domain) - Two sequential CRM steps with
depends_onchaining - 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 andenv_vars_requiredlist for developer handoff