HomeDocsWorkflows › JSON Format

Workflow JSON Format

Technical reference for the workflow definition format.

Overview

Every workflow is stored as a JSON definition that describes a directed graph of PDF operations. You can export any workflow as a .json file and import it into another account or environment. This page documents the JSON schema so you can also create or modify workflow definitions programmatically.

Top-Level Schema

A workflow definition is a JSON object with the following fields:

FieldTypeRequiredDescription
namestringNoDisplay name for the workflow (max 100 characters).
descriptionstringNoA short description of what the workflow does (max 500 characters).
categorystringNoCategory label (e.g., “Conversion”, “Security”).
nodesarrayYesAn array of node objects representing the workflow steps.
connectionsarrayYesAn array of connection objects linking nodes together.

Nodes

Each node represents a single PDF operation in the workflow pipeline. Nodes are objects with the following fields:

FieldTypeRequiredDescription
idstringYesUnique identifier for the node within this workflow (e.g., "node-1").
typestringYesThe operation type. Must match one of the valid operation types.
labelstringYesDisplay label shown on the canvas (e.g., "Compress PDF").
xnumberYesHorizontal position on the builder canvas.
ynumberYesVertical position on the builder canvas.
parametersobjectNoKey-value pairs of operation-specific parameters. Omitted or empty means use defaults.

Connections

Connections define how data flows between nodes. The output of the source node is passed as input to the target node.

FieldTypeRequiredDescription
idstringYesUnique identifier for the connection (e.g., "edge-1").
sourceIdstringYesThe id of the source node.
targetIdstringYesThe id of the target node.
sourcePortstringNoSource port name (for operations with multiple outputs). Usually omitted.
targetPortstringNoTarget port name (for operations with multiple inputs). Usually omitted.

Valid Operation Types

The type field on each node must be one of the following values. These are case-sensitive and use PascalCase.

Conversion

TypeDescription
ConvertToWordPDF to Microsoft Word
ConvertToExcelPDF to Excel spreadsheet
ConvertToPowerPointPDF to PowerPoint slides
ConvertToImagesPDF pages to image files
ConvertToPdfAConvert to PDF/A compliance
ConvertToPdfXConvert to PDF/X compliance
ConvertJpegToPdfJPEG images to PDF
ConvertPdfColorsConvert colour space
ConvertXfaToAcroFormXFA forms to AcroForm
OcrPdfRecognise text in scanned PDFs

Security

TypeDescription
ProtectPdfAdd password and permission restrictions
RedactPdfRemove or mask sensitive information

Page Manipulation

TypeDescription
MergePdfsCombine multiple PDFs into one (accepts multiple inputs)
SplitPdfSplit a PDF into multiple files
ExtractPagesExtract specific pages
RemovePagesDelete selected pages
ReorganizePdfReorder pages
RotatePagesRotate pages by angle
ResizePageChange page dimensions
RemoveBlankPagesAutomatically remove blank pages
ClipPdfCrop a region from pages

Content

TypeDescription
AddWatermarkOverlay text or image watermark
AddPageNumbersInsert sequential page numbers
GenerateTocGenerate a table of contents
ConvertUrlsToLinksMake plain-text URLs clickable
AddEmbeddedFilesEmbed files within a PDF
UpdatePdfMetadataEdit document metadata
ApplyOpenOptionsSet initial view and layout options

Optimisation

TypeDescription
CompressPdfReduce file size
RepairPdfFix corrupted PDFs
LinearizePdfOptimise for fast web viewing
FlattenTransparenciesFlatten transparent objects
FlattenAnnotationsBurn annotations into content

Extraction

TypeDescription
ExtractTextExtract text content
ExtractImagesExtract images as a ZIP
ExtractEmbeddedFilesRetrieve embedded files
ExportFormDataExport AcroForm data
ExportXfaDataExport XFA data

Analysis

TypeDescription
AnalyzePdfAnalyse structure and contents
GetPdfVersionGet PDF specification version
GetPdfPermissionsInspect permission settings
ReadPdfMetadataRead document metadata
ComparePdfPagesCompare pages from two PDFs (accepts multiple inputs)

Examples

Simple two-step workflow

This workflow compresses a PDF and then adds password protection:

{
  "name": "Secure Document",
  "description": "Compress and password-protect a PDF.",
  "category": "Security",
  "nodes": [
    {
      "id": "node-1",
      "type": "CompressPdf",
      "label": "Compress PDF",
      "x": 200,
      "y": 150,
      "parameters": {}
    },
    {
      "id": "node-2",
      "type": "ProtectPdf",
      "label": "Protect PDF",
      "x": 200,
      "y": 300,
      "parameters": {}
    }
  ],
  "connections": [
    {
      "id": "edge-1",
      "sourceId": "node-1",
      "targetId": "node-2"
    }
  ]
}

Multi-step archival workflow

This workflow converts to PDF, compresses, and then converts to PDF/A for archival:

{
  "name": "Office to PDF Archive",
  "description": "Convert, compress, and archive as PDF/A.",
  "category": "Conversion",
  "nodes": [
    {
      "id": "node-1",
      "type": "ConvertJpegToPdf",
      "label": "Convert to PDF",
      "x": 200,
      "y": 150,
      "parameters": {}
    },
    {
      "id": "node-2",
      "type": "CompressPdf",
      "label": "Compress PDF",
      "x": 200,
      "y": 300,
      "parameters": {}
    },
    {
      "id": "node-3",
      "type": "ConvertToPdfA",
      "label": "Convert to PDF/A",
      "x": 200,
      "y": 450,
      "parameters": {
        "conformanceLevel": "PDF/A-2b"
      }
    }
  ],
  "connections": [
    {
      "id": "edge-1",
      "sourceId": "node-1",
      "targetId": "node-2"
    },
    {
      "id": "edge-2",
      "sourceId": "node-2",
      "targetId": "node-3"
    }
  ]
}

Import & Export

Exporting a workflow

You can export any workflow as a .json file in two ways:

  • From the Workflow Builder: Click the Export button in the toolbar. You will be prompted for a name, and the file will download automatically.
  • From Workflow Management: Click the Export button on any workflow or template card.

Importing a workflow

To import a workflow from a .json file:

  1. Open the Workflow Builder.
  2. Click the Import button in the toolbar.
  3. Select a .json file from your computer.
  4. The workflow loads onto the canvas. Any unrecognised operation types are skipped with a warning.
  5. Review the imported workflow and click Save to store it.
Info

Imported workflows are always created as new workflows. They do not overwrite any existing workflow.

Tip

You can use export and import to share workflows between team members, back up your workflow library, or migrate workflows between environments.

Related: Workflow Builder · Managing Workflows · Workflows Overview