A beautiful, modern web application for building card-based workflow JSON configurations with a visual interface.
- Visual Workflow Builder: Intuitive tree-based interface for managing workflows
- 10+ Card Types: Support for all action types including SEND_TEMPLATE, SEND_TEXT, SET_TIMER, CONDITIONAL, and more
- Dynamic Forms: Type-specific forms that show only relevant fields
- Live JSON Preview: Real-time syntax-highlighted JSON output
- Import/Export: Save and load workflow configurations
- Modern UI: Dark mode with glassmorphism effects and smooth animations
- No Build Required: Pure HTML/CSS/JavaScript - just open and use
- Open
index.htmlin your web browser - Configure workflow metadata (name, channel ID, execution mode)
- Add departments using the ➕ button
- Add steps to departments
- Add actions to steps
- Configure each action with the dynamic form editor
- Export your workflow JSON
- SEND_TEMPLATE: Send WhatsApp template messages with buttons
- SEND_TEXT: Send plain text messages with variable support
- SEND_ESCALATION: Send escalation messages to supervisors
- SET_TIMER: Create a timer that triggers after specified minutes
- CANCEL_TIMER: Cancel a previously set timer
- WAIT_FOR_EVENT: Wait for user actions or timer events
- CONDITIONAL: Execute different actions based on conditions
- MOVE_NEXT: Move to the next department
- TRIGGER_DEPARTMENT_STEP: Trigger a specific step in another department
- UPDATE_TICKET_FIELD: Update ticket field values
The builder generates JSON matching this structure:
{
"workFlowConfig": {
"uid": "...",
"channelId": 1265,
"workflowName": "My Workflow",
"executionMode": "SEQUENTIAL",
"active": true,
"metaData": { ... }
},
"departmentConfigs": [
{
"uid": "...",
"departmentName": "Department Name",
"departmentOrder": 1,
"metaData": { "actions": [] },
"departmentSteps": [
{
"uid": "...",
"stepKey": "STEP_KEY",
"stepOrder": 1,
"metaData": {
"actions": [
{
"type": "SEND_TEMPLATE",
"templateKey": "...",
"payload": {
"sendTo": "{{variable_mobileNumber}}"
},
"templateTexts": [ ... ]
}
]
}
}
]
}
]
}The payload.sendTo field supports:
- Static phone numbers:
"919095613252" - Variables:
"{{variable_mobileNumber}}"or"{{initiator_mobile_number}}"
When configuring SEND_TEMPLATE or SEND_ESCALATION:
- Use
componentType: "body"for message body variables - Use
componentType: "QUICK_REPLY"for interactive buttons - Add
metaDatawitheventandbuttonNamefor buttons
Map events to next steps:
- Button clicks:
"ACK_CLICKED" → "ACKNOWLEDGE_SUCCESS" - Timer events:
"TIMER_TASK_TIMEOUT" → "TIMEOUT_STEP"
Use CONDITIONAL actions to branch logic:
- Set
conditionwith field, operator, value, and module - Define
onTrueandonFalseactions (can be nested actions)
Use double curly braces for variables:
{{variable.ticket.patient_name}}{{variable.ticket.patient_id}}{{variable_mobileNumber}}
- Left Panel: Workflow structure tree (departments → steps → actions)
- Center Panel: Dynamic editor for selected item
- Right Panel: Live JSON preview with syntax highlighting
- Top Bar: Workflow metadata and action buttons
This is a standalone web application with no dependencies or build process.
workflowJsonBuilder/
├── index.html # Main HTML file
├── styles.css # All styles and design system
├── js/
│ ├── cardSchemas.js # Card type definitions
│ ├── workflowState.js # State management
│ ├── uiManager.js # UI rendering
│ ├── cardEditor.js # Dynamic form generation
│ └── app.js # Application entry point
├── examples/
│ └── sample-workflow.json # Example workflow
└── README.md # This file
- Export: Downloads workflow as JSON file
- Import: Load existing workflow JSON
- Copy: Copy JSON to clipboard
- Clear: Reset entire workflow
- Naming: Use clear, descriptive names for departments and steps
- Step Keys: Use UPPERCASE_WITH_UNDERSCORES for step keys
- Timer Keys: Use descriptive timer keys to avoid conflicts
- Events: Document event names in your workflow design
- Testing: Test exported JSON in your workflow engine
- JSON not updating: Make sure to save changes after editing
- Import fails: Verify JSON structure matches expected format
- Missing fields: Check that all required fields are filled
This project is open source and available for use.
Built with ❤️ for workflow automation