Create and manage automation workflows for repetitive tasks.
# Install dependencies
pip install schedule requests
# Run a simple workflow
python scripts/workflow.py examples/simple.yaml
name: daily-report
trigger:
type: schedule
cron: "0 9 * * *" # Daily at 9am
actions:
- name: fetch-data
type: http
config:
url: https://api.example.com/data
method: GET
- name: process
type: transform
config:
template: "Report: {{results.count}} items"
- name: notify
type: telegram
config:
chat_id: "{{env.CHAT_ID}}"
message: "{{processed}}"
See references/examples.md for more.
name: daily-sales
trigger:
type: schedule
cron: "0 8 * * *"
actions:
- type: http
name: get-sales
config:
url: https://api.shop.com/sales
- type: transform
name: format
config:
template: "Sales: ${{results.total}}"
- type: telegram
name: send
config:
message: "{{formatted}}"
name: github-webhook
trigger:
type: webhook
path: /webhook/github
actions:
- type: transform
name: parse
config:
template: "New {{payload.action}} on {{payload.repository}}"
python scripts/workflow.py [OPTIONS]
Options:
--file PATH Workflow YAML file (required)
--run-once Run workflow once and exit
--daemon Run as background daemon
--env FILE Load environment variables
共 1 个版本