Deep Dive

Mini's World
Import / Export System

Portable workflows, triggers, and schedules. Pack them into a JSON envelope, share them between companies, and automate anything.

01Overview

The portable workflow system lets you export any workflow — including its trigger and schedule configuration — as a self-contained JSON file. Import it into any company to instantly replicate automations.

Workflow + trigger + schedule Export .json mw_schema 2.0 Share Import validate + create New Company PENDING state

Workflow → Export → JSON file → Import → New Company

02The mw_schema Envelope

Every exported artifact is wrapped in a versioned envelope. The schema version allows forward-compatible parsing.

JSON
  • mw_schema string required
    Schema version. Currently "2.0".
  • exported_at string optional
    ISO 8601 timestamp of when the export was created.
  • type string required
    "workflow" or "trigger".
  • payload object required
    The exported content. Structure depends on type.

03What Can Be Imported / Exported

Not everything is portable. Here is what travels with the JSON file and what stays behind.

ObjectExportImportNotes
WorkflowYESYESFull step definitions, brief, settings
Trigger ConfigYESYESType, mode, config (once/continuous)
Schedule ConfigYESYESCron expression, timing, saved workflow ref
Mini AssignmentsYESWARNImported by miniId — must exist in target
Tool AssignmentsNONOPer-company, not portable
CredentialsNONOSecurity — never exported
Chat HistoryNONOToo large, privacy concerns
ContactsNONOPer-company, use CSV import instead

04Workflow Spec

Every field in the workflow payload, documented with types and defaults.

  • title string required
    Display name for the workflow. Shown in the UI and used for identification.
  • brief string required
    What the workflow does. Passed to the AI agent as context for execution.
  • steps array required
    Array of step objects. Each step assigns a task to a Mini.
    • miniId string — Agent ID (e.g. "ops", "marketing"). Must exist in the target company.
    • task string — What this step should do. Natural language instruction.
  • requireHumanApproval boolean optional default: true
    Gate before final action. When true, workflow pauses for human review before executing.
  • pauseBetweenSteps boolean optional default: false
    Pause execution between each step for review.
  • autoApprove boolean optional default: false
    Skip human review entirely. Use with caution.
  • initiatedBy string optional
    Origin of the workflow: "user", "trigger", or "schedule".
  • trigger object optional default: null
    Trigger configuration. When present, the workflow listens for external events.
    • type string"email" | "call" | "message" | "form" | "payment" | "webhook"
    • name string — Display name for the trigger
    • mode string"once" (fire once, auto-delete) | "continuous" (keep listening)
    • config object — Trigger-type-specific configuration (eventType, filters, etc.)
  • schedule_config object optional default: null
    Schedule configuration. When present, the workflow runs on a cron schedule.
    • type string"hourly" | "daily" | "weekly" | "custom"
    • cron string — Standard cron expression
    • timing string — Natural language description (e.g. "Every day at 9:00 AM")
    • timezone string — IANA timezone (e.g. "America/New_York")

05Complete Examples

Five real-world workflow JSONs ready to import.

06Trigger Configurations

Select a trigger type to see its configuration schema.

07Schedule Configurations

Common schedule patterns with cron expressions.

08How to Export

Step-by-step guide to exporting a workflow.

  1. Open the workflow

    Navigate to the company workspace and open the workflow you want to export.

  2. Click "Export"

    Use the Export button in the workflow detail view, or call GET /api/import-export/export/workflow/:id directly.

  3. JSON file downloads

    The browser downloads a .json file wrapped in the mw_schema 2.0 envelope with all workflow, trigger, and schedule data.

  4. Share the file

    Send the JSON file to a teammate, upload it to a shared drive, or commit it to version control.

09How to Import

Step-by-step guide to importing a workflow into a new company.

  1. Open the Import panel

    In the company workspace, click the Import button to open the import interface.

  2. Upload or paste JSON

    Drag and drop a .json file, click to browse, or paste the JSON directly into the text area.

  3. Review the workflow

    The import panel shows you the title, steps, trigger configuration, and schedule. Verify everything looks correct.

  4. Select target company

    Choose which company to import the workflow into. Mini IDs must exist in the target company.

  5. Click Import

    The workflow is created in PENDING state. If it has a trigger, the trigger starts listening. If it has a schedule, the schedule is activated.

10Validation Rules

Every imported JSON is validated before creation. Here are the rules.

mw_schema
Must be "2.0"
type
Must be "workflow" or "trigger"
payload.title
Required string, 1–200 characters
payload.brief
Required string, 1–2000 characters
payload.steps
Array with at least 1 step
steps[].miniId
Must be a valid agent ID
steps[].task
Required non-empty string
trigger.type
Must be: email, call, message, form, payment, or webhook
trigger.mode
Must be "once" or "continuous"
schedule_config.cron
Must be a valid cron expression (5 fields)

11API Endpoints

REST endpoints for programmatic import/export. All return JSON.

Export a single workflow

# Export single workflow
GET /api/import-export/export/workflow/:workflowId

Export all workflows for a company

# Export all for company
GET /api/import-export/export/company/:companyId

Import a workflow

# Import workflow
POST /api/import-export/import/workflow
Content-Type: application/json

# Body: full mw_schema envelope
{ "mw_schema": "2.0", "type": "workflow", "payload": { ... } }

Export a trigger

# Export trigger
GET /api/import-export/export/trigger/:triggerId

Import a trigger

# Import trigger
POST /api/import-export/import/trigger
Content-Type: application/json

# Body: full mw_schema envelope with type: "trigger"