Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

Import & export

Move workflows between installations or share them with your team. Both import and export use a documented JSON format.

Exporting a workflow

REST: GET /pfw/v1/workflows/{id}/export Admin: Workflow editor → top bar → Export

The export JSON includes:

  • name — the workflow name
  • status — forced to draft (exported workflows never auto-activate)
  • graph — full node graph with connections, positions, and studio variables
  • pluginVersion — the WP-PFWorkflow version that created the export
  • exportedAt — ISO-8601 timestamp

Importing a workflow

REST: POST /pfw/v1/workflows/import (JSON body) Admin: Workflow editor → top bar → Import → paste JSON

Import creates a new workflow in draft status. It does NOT overwrite an existing workflow. To update an existing one, export the target, merge your changes into the JSON, delete the old workflow, then import.

Validation during import

  • Node keys are validated against the installed catalog
  • Connections are validated (type compatibility, no orphaned links)
  • If validation fails, the import is rejected with a list of errors

Bulk export / import

The REST API supports exporting and importing individual workflows. For bulk operations, script the REST endpoints:

# Export all
curl -H "X-WP-Nonce: $NONCE" "$SITE/wp-json/pfw-workflow/v1/workflows" | jq '.[] | .id' | while read id; do
  curl -H "X-WP-Nonce: $NONCE" "$SITE/wp-json/pfw-workflow/v1/workflows/$id/export" -o "workflow-$id.json"
done

Migrating between sites

  1. Export workflows from the source site
  2. Import workflows on the target site
  3. Re-create the workflows' connections in WP-PFManagement on the target site
  4. Activate imported workflows
Connection credentials (API keys, OAuth tokens) are NOT
included in workflow exports, and they live in WP-PFManagement, not in the
workflow graph. You must re-create the connections in WP-PFManagement on the
target site.