Appearance
Advanced Example: Weather Briefing
This tutorial builds a playbook that:
- Calls the Open-Meteo public weather API (no API key required)
- Passes the raw JSON response to an
ai_promptstep for a human-readable summary - Exports the result as HTML
Time: ~20 minutes
What you'll use: local_api_get, ai_prompt, export_output
The full YAML
You can paste this into provision to deploy it immediately (see Provision & CLI):
yaml
name: Weather Briefing
slug: weather-briefing
description: Fetches current weather for Amsterdam and writes a human-readable briefing
trigger_type: manual
output_key: briefing_html
enabled: true
steps:
- name: Fetch weather data
step_type: local_api_get
output_key: weather_raw
config:
url: "https://api.open-meteo.com/v1/forecast?latitude=52.37&longitude=4.90¤t_weather=true&hourly=temperature_2m,precipitation_probability&forecast_days=1&timezone=Europe%2FAmsterdam"
- name: Summarise weather
step_type: ai_prompt
output_key: briefing_text
config:
provider: anthropic
model: claude-haiku-4-5-20251001
max_tokens: 300
instruction: |
You are writing a weather briefing for Amsterdam, Netherlands.
Today is {{.Date}}.
Here is the raw API response:
{{.step_outputs.weather_raw}}
Write a friendly 2-sentence weather briefing. Include the current temperature,
whether it will rain today, and what to wear. Keep it conversational.
- name: Format as HTML
step_type: export_output
output_key: briefing_html
config:
input_key: briefing_text
format: htmlStep-by-step: build it in the Studio UI
1. Create the playbook
- Go to Playbooks → New Playbook
- Name:
Weather Briefing - Trigger type:
manual - Output key:
briefing_html
2. Add the local_api_get step
- Click Add step, choose
local_api_get - Output key:
weather_raw - URL:
https://api.open-meteo.com/v1/forecast?latitude=52.37&longitude=4.90¤t_weather=true&hourly=temperature_2m,precipitation_probability&forecast_days=1&timezone=Europe%2FAmsterdam- Method:
GET(default)
Public APIs only
local_api_get is for public APIs that require no authentication. For APIs that require keys or tokens, store the credential in Studio and use webhook_action with an Authorization header instead.
3. Add the ai_prompt step
- Click Add step, choose
ai_prompt - Output key:
briefing_text - Prompt:
You are writing a weather briefing for Amsterdam, Netherlands.
Today is {{.Date}}.
Here is the raw API response:
{{.step_outputs.weather_raw}}
Write a friendly 2-sentence weather briefing. Include the current temperature,
whether it will rain today, and what to wear. Keep it conversational.- Model:
claude-haiku-4-5-20251001(fast and cheap for this task)
4. Add the export_output step
- Click Add step, choose
export_output - Output key:
briefing_html - Input key:
briefing_text - Format:
html
5. Run it
Click Run. No inputs needed — the URL is hardcoded.
Open the run to see:
weather_raw: the raw JSON from Open-Meteobriefing_text: the AI-generated paragraphbriefing_html: the HTML-wrapped output
How step chaining works
Notice how ai_prompt uses {{.step_outputs.weather_raw}} — this is how data flows between steps:
Step 1 output_key: weather_raw → stored in step_outputs["weather_raw"]
Step 2 instruction: "...{{.step_outputs.weather_raw}}..." → replaced at runtime
Step 3 input_key: briefing_text → reads step_outputs["briefing_text"]The playbook's output_key: briefing_html means the final result is the value of the step with output_key: briefing_html.
What's next?
- Add a schedule: set
trigger_type: scheduleand a cron expression to get daily briefings - Add a
validate_gate: assert the briefing is non-empty before exporting - Send to Slack: replace
export_outputwithwebhook_actionpointing at a Slack webhook - Write a test: see Testing