Documentation
Learn how to use Compozy
Learn how to break down and compose Compozy workflows into reusable pieces.
workflow: tasks: - id: process_document workflow: ./workflows/document-processor.yaml with: document: "{{ trigger.document }}"
with
workflow: tasks: - id: validate_data workflow: ./workflows/validator.yaml with: data: "{{ trigger.payload }}" options: strict: true
# workflows/document-processing.yaml name: "Document Processing" version: "1.0.0" workflow: tasks: - id: validate use: task(schema_validator) - id: process use: task(content_processor)
workflow: tasks: - id: handle_document workflow: ./workflows/document-processing.yaml with: document: "{{ trigger.document }}"
workflow: tasks: - id: first_workflow workflow: ./workflows/first.yaml with: context: "{{ trigger.context }}" - id: second_workflow workflow: ./workflows/second.yaml with: previous_results: "{{ tasks.first_workflow.output }}"
workflow: env: API_KEY: "{{ env.SHARED_API_KEY }}" ENVIRONMENT: "production" tasks: - id: sub_workflow workflow: ./workflows/sub-workflow.yaml # Environment variables are automatically available