Skip to content

Instantly share code, notes, and snippets.

@pratik-dani
Created August 31, 2025 15:55
Show Gist options
  • Select an option

  • Save pratik-dani/51086bda25519ec8520021580b0a5e85 to your computer and use it in GitHub Desktop.

Select an option

Save pratik-dani/51086bda25519ec8520021580b0a5e85 to your computer and use it in GitHub Desktop.
Google News Search Query
{
"name": "Google News Search Query",
"nodes": [
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "domain"
}
]
}
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
-1344,
192
],
"id": "5d8eb827-b4a5-4b1d-9785-8d46e37a209f",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"actorId": {
"__rl": true,
"value": "nFJndFXA5zjCTuudP",
"mode": "list",
"cachedResultName": "Google Search Results Scraper (apify/google-search-scraper)",
"cachedResultUrl": "https://console.apify.com/actors/nFJndFXA5zjCTuudP/input"
},
"customBody": "={\n \"queries\": \"{{ $json.domain }} company news\",\n \"maxPagesPerQuery\": 2,\n \"resultsPerPage\": 5,\n \"focusOnPaidAds\": false,\n \"searchLanguage\": \"\",\n \"languageCode\": \"\",\n \"forceExactMatch\": false,\n \"wordsInTitle\": [],\n \"wordsInText\": [],\n \"wordsInUrl\": [],\n \"mobileResults\": false,\n \"includeUnfilteredResults\": false,\n \"saveHtml\": false,\n \"saveHtmlToKeyValueStore\": true,\n \"includeIcons\": false\n}",
"authentication": "apifyOAuth2Api"
},
"type": "@apify/n8n-nodes-apify.apify",
"typeVersion": 1,
"position": [
-1120,
192
],
"id": "306bc32b-fd6a-4981-bc87-11ffeabd2516",
"name": "Run an Actor",
"credentials": {
"apifyOAuth2Api": {
"id": "8KUF9J0i1scMWZ84",
"name": "Apify account"
}
}
},
{
"parameters": {
"resource": "Datasets",
"datasetId": "={{ $json.defaultDatasetId }}",
"authentication": "apifyOAuth2Api"
},
"type": "@apify/n8n-nodes-apify.apify",
"typeVersion": 1,
"position": [
-896,
192
],
"id": "a45c70da-624b-4f0b-8d5b-ff2614173b20",
"name": "Get dataset items",
"credentials": {
"apifyOAuth2Api": {
"id": "8KUF9J0i1scMWZ84",
"name": "Apify account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "7d3c054a-db4d-447c-b540-526de1d1cfaa",
"name": "organicResults",
"value": "={{ $json.organicResults }}",
"type": "array"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-672,
192
],
"id": "54642b09-6885-422e-aecd-f12d26a0dddd",
"name": "Edit Fields"
},
{
"parameters": {
"batchSize": "={{ 10 }}",
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
-224,
192
],
"id": "0efb8bef-16b5-447b-823e-f07ac8d175b4",
"name": "Loop Over Items"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"name": "Replace Me",
"typeVersion": 1,
"position": [
224,
264
],
"id": "d9ef16d7-d5fd-4837-beb1-49de4626520a"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "ffc21d3d-feee-4a53-bb93-489474c0c9b5",
"name": "title",
"value": "={{ $json.title }}",
"type": "string"
},
{
"id": "ffa0eb52-ac6c-4f1a-907c-906e7105947c",
"name": "description",
"value": "={{ $json.description }}",
"type": "string"
},
{
"id": "afec16d0-3845-4951-825f-c8991d1b8c2d",
"name": "emphasizedKeywords",
"value": "={{ $json.emphasizedKeywords }}",
"type": "array"
},
{
"id": "57943808-366b-4f57-bdbb-ec1a0fe01488",
"name": "url",
"value": "={{ $json.url }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
0,
192
],
"id": "037b343e-2e68-48cb-a536-f02a73a669b1",
"name": "Edit Fields1"
},
{
"parameters": {
"fieldToSplitOut": "organicResults",
"options": {}
},
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
-448,
192
],
"id": "2fdf50e1-bf34-430f-b939-cabf5e183ea7",
"name": "Split Out1"
},
{
"parameters": {
"aggregate": "aggregateAllItemData",
"options": {}
},
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
0,
0
],
"id": "0804152c-e6bd-4957-95d0-4e6b8cfce22c",
"name": "Aggregate"
}
],
"pinData": {
"When Executed by Another Workflow": [
{
"json": {
"domain": "microsoft.com"
}
}
]
},
"connections": {
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Run an Actor",
"type": "main",
"index": 0
}
]
]
},
"Run an Actor": {
"main": [
[
{
"node": "Get dataset items",
"type": "main",
"index": 0
}
]
]
},
"Get dataset items": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Split Out1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Replace Me": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "Replace Me",
"type": "main",
"index": 0
}
]
]
},
"Split Out1": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "4959dc6f-0c5e-4e5b-9089-39f680f86123",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "4b2ada92eac5fa9c8485e82fc999c531ceecbe4766408fa5795a0a1a333d5b3c"
},
"id": "JfP8qb6fQmbsRPPB",
"tags": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment