Fetch First GDELT News Article Text
Manual workflow that fetches public GDELT news and returns the extracted text of the first article.
Download ZIP · 1.1 KB
Before You Import
The URLs in this example use a https://<your-gdelt-proxy> placeholder that you must replace with a service you host:
- Step 1 calls
<your-gdelt-proxy>/docwith GDELT DOC 2.0 query parameters (query,mode=artlist,maxrecords,format=json) and expects a JSON response with anarticlesarray where each article has aurl. This matches what GDELT's publichttps://api.gdeltproject.org/api/v2/doc/docendpoint returns, so your proxy can forward this call as-is. - Step 2 calls
<your-gdelt-proxy>/doc/contentwith aurlparameter and expects a JSON response with atextfield containing the extracted article body. GDELT's public API has no article-text-extraction endpoint, so your service must implement this part itself (for example, by fetching the article URL and extracting its readable text).
If you only need the article listing without full text, see Fetch GDELT Public News (Encoded String), which calls GDELT's public API directly.
Full JSON
Click to expand
{
"description": "Manual workflow that fetches public GDELT news and returns the extracted text of the first article.",
"tags": [
"manual",
"http",
"news",
"gdelt",
"article-text",
"two-step"
],
"document": {
"name": "Fetch First GDELT News Article Text",
"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 to consider (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://<your-gdelt-proxy>/doc\", {\"query\": query, \"mode\": \"artlist\", \"maxrecords\": coalesce(max_records, \"50\"), \"format\": \"json\"})",
"onFailure": "throw",
"resultType": "any"
},
"headers": [],
"returnBuffer": false,
"cache": true
}
}
},
{
"condition": {
"expr": "step_ok(0) && present(step_data(0, \"articles.0.url\"))",
"onFailure": "throw",
"resultType": "any"
},
"action": {
"actionType": "actions/network/http/request/send",
"actions/network/http/request/send": {
"method": "GET",
"url": {
"expr": "url_params(\"https://<your-gdelt-proxy>/doc/content\", {\"url\": step_data(0, \"articles.0.url\")})",
"onFailure": "throw",
"resultType": "any"
},
"headers": [],
"returnBuffer": false,
"cache": true
}
}
}
],
"returnExpression": {
"expr": "step_data(1, \"text\", \"\")",
"onFailure": "throw",
"resultType": "any",
"strict": false,
"useSimpleCel": false
},
"customAttributes": {}
}
}