# Demonstrates two T1 nodes: http_request fetches JSON, set extracts a field.
# Run: cargo run --bin r8r -- run examples/http-to-set.toml

[workflow]
name = "http-to-set"

[[nodes]]
name = "Fetch"
type = "http_request"
[nodes.parameters]
method = "GET"
url = "https://httpbin.org/json"

[[nodes]]
name = "Extract"
type = "set"
[nodes.parameters]
keep_only_set = true
fields = { slideshow_title = "{{ $json.body.slideshow.title }}" }

[[edges]]
from = "Fetch"
to = "Extract"
