TypeWorkflow
Rules1
Channelany
Version1.0.0
workflow-manual-gdelt-news-json-string1.0 KB
Fetch GDELT Public News (Encoded String)
Manual workflow that fetches public news from GDELT and returns toon-encoded articles.
Download ZIP · 1.0 KB
Full JSON
Click to expand
{
"description": "Manual workflow that fetches public news from GDELT and returns toon-encoded articles.",
"tags": [
"manual",
"http",
"news",
"gdelt",
"toon-encode",
"encoded-output"
],
"document": {
"name": "Fetch GDELT Public News (Encoded String)",
"enabled": true,
"log_level": "info",
"trigger": {
"type": "manual"
},
"workflowInput": [
{
"name": "query",
"description": "Search terms for GDELT public news (e.g., climate change, elections, ai policy)",
"schema": {
"type": "string",
"required": true
}
},
{
"name": "max_records",
"description": "Optional max number of news articles (default: 50)",
"schema": {
"type": "string",
"required": false
}
}
],
"steps": [
{
"condition": {
"expr": "true",
"onFailure": "throw",
"resultType": "any"
},
"action": {
"actionType": "actions/network/http/request/send",
"actions/network/http/request/send": {
"method": "GET",
"url": {
"expr": "url.params(\"https://api.gdeltproject.org/api/v2/doc/doc\", {\"query\": query, \"mode\": \"ArtList\", \"maxrecords\": values.coalesce(max_records, \"50\"), \"format\": \"json\"})",
"onFailure": "throw",
"resultType": "any"
},
"headers": [],
"returnBuffer": false,
"cache": true
}
}
}
],
"returnExpression": {
"expr": "toon.encode(workflow.stepData(0, \"articles\", []))",
"onFailure": "throw",
"resultType": "any",
"strict": false
},
"customAttributes": {}
}
}