“Create a workflow that calls a weather API and sends a notification, then run it.”
conductor --version. Verify CONDUCTOR_SERVER_URL (or that a local server is running). See setup.md.See workflows/weather-notification.json. Two HTTP tasks: fetch weather, then post a notification using the result.
{
"name": "send_notification", "taskReferenceName": "send_notification", "type": "HTTP",
"inputParameters": {
"http_request": {
"uri": "https://api.notify.example.com/send",
"method": "POST",
"body": {
"to": "${workflow.input.notifyEmail}",
"message": "Weather in ${workflow.input.city}: ${fetch_weather.output.response.body.temperature}°F"
}
}
}
}
conductor workflow create examples/workflows/weather-notification.json
conductor workflow start -w weather_notification -i '{"city": "San Francisco", "notifyEmail": "user@example.com"}'
# → returns workflowId
conductor workflow get-execution {workflowId} -c
Expected status: COMPLETED. Output: ${fetch_weather.output.response.body} and ${send_notification.output.response.statusCode}.
${workflow.input.x}.${taskRef.output.x}.outputParameters for aggregating results.