Prompt
I'm building a low-code workflow engine with APIs, what should I look at?
Latest observation
If you’re building a low-code workflow engine with APIs, I’d focus on these areas:
1) Workflow model
Decide what a workflow “is” in your system:
- DAG vs state machine vs BPMN-like model
- Sequential, parallel, conditional, and event-driven steps
- Human tasks vs fully automated steps
- Long-running workflows and durable state
A good question: do you need simple automation, or full business-process orchestration?
2) API design
Your API should make it easy to:
- Create/update workflow definitions
- Start workflow instances
- Query instance state
- Retry, cancel, pause, resume
- Inspect execution history/logs
- Handle variables/input/output schema
Important patterns:
- Versioned workflow definitions
- Idempotency keys for start/retry operations
- Pagination/filtering for execution history
- Webhook callbacks or subscriptions for completion/failure events
3) Execution engine
The engine needs to reliably run workflows:
- Step scheduling and orchestration
- Retries with backoff
- Timeouts
- Compensation/saga support for rollback-like behavior
- Concurrency control
- Durable persistence of state
If workflows can run for minutes/hours/days, persistence and resumability are critical.
4) Visual builder / low-code experience
For low-code, the UX matters a lot:
- Drag-and-drop designer
- Forms to configure each step
- Conditional branches and expressions
- Reusable components/templates
- Validation in the editor
Also think about:
- How non-developers debug workflows
- How they test with sample data
- How changes are promoted from dev to prod
5) Extensibility
You’ll want custom step types:
- HTTP/API calls
- Database actions
- Script/code steps
- Human approval tasks
- Integrations with SaaS tools
- Event triggers and timers
Make sure custom steps have:
- Clear input/output contracts
- Secure sandboxing for code execution
- Versioning and dependency management
6) Reliability and observability
You’ll need:
- Execution logs
- Step-level metrics
- Tracing/correlation IDs
- Dead-letter handling
- Alerting on failures/SLA breaches
- Replay/debug mode
Without this, workflow engines become hard to operate.
7) Security and governance
Especially important in low-code:
- Authentication and authorization per workflow/step
- Secret management
- Tenant isolation if multi-tenant
- Audit logs
- Approval for publishing workflows
- Rate limiting and abuse protection
- Safe expression evaluation to prevent injection
8) Data model and storage
Consider:
- Definition storage
- Runtime execution state
- Version history
- Variables/context payloads
- Execution logs/events
- Human task assignments and approvals
Also watch payload size, schema evolution, and encryption of sensitive data.
9) Integration model
Your engine will probably live or die by integrations:
- Webhooks
- REST/gRPC connectors
- Message queues/events
- Database connectors
- OAuth-based SaaS integrations
- Triggering from external systems
Consider whether integrations are synchronous, async, or both.
10) Testing and simulation
Provide:
- Unit testing for steps/expressions
- End-to-end workflow test runs
- Mock connectors
- Dry-run/simulation mode
- Deterministic replay
This helps users trust the system before production.
What to look at for inspiration
Depending on your goals, study:
- Temporal — durable workflow orchestration
- Camunda / Zeebe — BPMN and process orchestration
- n8n — low-code automation and integrations
- Zapier / Make — user-friendly automation patterns
- AWS Step Functions — state-machine style orchestration
- Netflix Conductor — microservice workflow orchestration
A practical starting point
If you want to keep scope manageable:
- Start with state-machine or DAG workflows
- Support HTTP, timer, and human approval steps
- Add versioned definitions
- Persist instance state + execution history
- Build basic UI + API
- Add retries, branching, and webhooks
- Expand into custom steps/integrations later
If you want, I can also give you:
- a recommended architecture
- a database schema
- a REST API design
- or a MVP feature list for the first version.