Skip to content

Latest commit

 

History

History
136 lines (103 loc) · 5.24 KB

File metadata and controls

136 lines (103 loc) · 5.24 KB

Generated Workflows

This page documents how generated workflow templates work in the Open Workflow Library, starting with Expansion Pack V0.

What generated templates are

Generated workflow templates are reusable, framework-agnostic workflow starting points. They are produced by a deterministic generator from a small set of vetted patterns and per-category topic lists.

They are not:

  • Production-tested workflows.
  • Workflows that have been imported and executed in n8n by the project team.
  • Workflows that contain real credentials, URLs, or business data.

They are:

  • Structurally valid n8n JSON exports with placeholder credentials only.
  • Accompanied by a Universal Workflow IR file that describes the same workflow in a framework-agnostic shape.
  • Accompanied by a README with purpose, trigger, steps overview, integrations, and a documented validation status.

Where they live

workflows/generated/<pack-name>/<category>/<workflow-slug>/
    workflow.json        # n8n-style workflow export
    workflow.ir.json     # Universal Workflow IR record
    README.md            # template purpose, setup, safety notes

The current pack is open-workflow-library-v0, with 420 templates across 21 categories.

How they are created

tools/generate_expansion_pack.py is a deterministic, standard-library-only Python script. It:

  1. Defines a small set of vetted patterns (e.g. webhook-intake-validate, schedule-fetch-aggregate, schedule-status-alert).
  2. Defines per-category lists of topics — short business scenarios that map naturally onto a pattern (e.g. "New Lead Intake Router" → webhook-intake).
  3. For each topic it builds:
    • the n8n nodes and connections,
    • the corresponding Universal IR step list,
    • a README that documents trigger, integrations, placeholders, and risk.
  4. Writes a per-pack catalog (catalog/generated-workflows.index.json) and a pack manifest (MANIFEST.json).

Re-running the script with the same inputs produces byte-identical output: IDs are derived from a stable UUIDv5 namespace and content is sorted deterministically.

How to validate them

tools/validate_generated_pack.py runs a self-contained check pass and writes:

  • reports/expansion-pack-v0.json
  • reports/expansion-pack-v0.md

It checks:

  • every workflow has all three files,
  • workflow.json and workflow.ir.json parse as JSON,
  • the pack has ≥ 400 workflows,
  • no duplicate IDs or slugs,
  • no secret-like patterns (api keys, JWTs, bearer tokens, private keys),
  • every workflow has ≥ 4 nodes and ≥ 4 IR steps,
  • every workflow has category metadata,
  • the generated catalog count matches the number of workflow folders.

It does not run the workflows. Structural validity is not behavioural validity.

You can also run the repository-wide audit:

python tools/audit_workflows.py

This walks all workflow JSON files (including the generated pack), redacts any secret-like strings, and refreshes catalog/workflows.index.json and reports/workflow-audit.md.

catalog/generated-workflows.index.json is the pack-specific catalog and is written only by the generator. The repository-wide catalog at catalog/workflows.index.json is written by the audit tool and includes generated workflows alongside imported ones.

How to review before import

Before importing any template into a live n8n instance:

  1. Read README.md in the template folder. Confirm category, trigger, risk level, and integrations match what you want.
  2. Open workflow.json and replace every https://api.example.com/... placeholder URL with your real endpoint.
  3. Replace every REPLACE_WITH_YOUR_VALUE placeholder with the right field value.
  4. Configure authentication on each HTTP node — none is embedded.
  5. If the template has a webhook trigger, secure the webhook (auth header or signed URL) before exposing it publicly.
  6. If the template has an inline code node, review and replace the placeholder transform before running.
  7. Import into a sandbox n8n instance first. Do not enable the template until you have observed it behave correctly with non-production data.

How they feed the LLM Wiki and prompt-to-workflow generator

Generated templates are designed to be seed data for two future systems:

  • LLM Wiki retrieval (wiki/) — the generator's pattern names and IR step graphs are intended to be extracted into pattern entries under wiki/patterns/. This is not automated yet; the wiki still needs to be authored or curated by humans before promotion.
  • Prompt-to-workflow generation (docs/prompt-to-workflow.md) — the Universal IR records here are the same shape the future generator will produce. Treating them as in-distribution examples is intentional.

Neither of these claims means the LLM has learned anything yet. The pack is a structured corpus; the wiki and generator pipelines that consume it are still to be built.

Safety notes

  • No real API keys, bearer tokens, JWTs, private keys, phone numbers, emails, or private URLs are embedded.
  • Healthcare and homecare templates carry an explicit administrative-only notice in their READMEs. They do not provide medical diagnosis, treatment advice, or replace licensed clinical judgment.
  • The templates are not legal, financial, or clinical advice.