{ "name": "Grants.gov Opportunity Monitor - daily alerts", "nodes": [ { "parameters": { "content": "# Monitor Grants.gov opportunities daily with Apify\n\n## Who is this for?\n\nThis workflow is for small-business teams, nonprofits, grant consultants, and research staff who need a factual daily feed of new or changed U.S. federal grant opportunities.\n\n## How it works\n\nThe Schedule Trigger runs every morning. An authenticated HTTP Request calls the Grants.gov Opportunity Monitor Actor with a bounded query. The Actor stores a baseline for the stable `monitorId`; the Code node keeps `new` and `changed` rows and formats an alert with the official source URL. The final placeholder is where you connect Slack, email, Teams, Notion, or a database.\n\n## How to set up\n\nCreate an n8n Header Auth credential with header name `Authorization` and value `Bearer YOUR_APIFY_API_TOKEN`, then attach it to **Run Grants.gov Monitor**. Run once to create the baseline, replace the final placeholder with your private destination, and activate the workflow.\n\n## Requirements\n\n- An Apify account and API token stored in n8n's credential manager.\n- Sufficient Apify balance for the Store's current pay-per-event price.\n- A notification or storage destination that you control.\n\n## How to customize the workflow\n\nEdit the HTTP Request JSON to change the keyword, status, agency, eligibility, funding category, or ten-result limit. Use a new lowercase `monitorId` when the filters change and keep it stable afterward. An empty response is a healthy no-change result. Always verify eligibility and the current notice on Grants.gov before making an application decision.\n\nAt the current prices, the maximum result/start event charge for this bounded template is `$0.15005` per successful run (`10 * $0.015 + $0.00005`), before tax or account-level charges. This export contains no token, cookie, webhook, or payment data, and it does not run until you manually execute or activate it with your own token.", "height": 600, "width": 1240, "color": 5 }, "id": "d8dfc8ea-45c1-4fb7-bb09-59e3f13022e2", "name": "Setup notes", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -700, -640 ] }, { "parameters": { "rule": { "interval": [ { "field": "cronExpression", "expression": "0 8 * * *" } ] } }, "id": "8dc46240-0ce7-4a86-bc26-00c968e8fc17", "name": "Every morning", "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ -620, 80 ] }, { "parameters": { "method": "POST", "url": "https://api.apify.com/v2/actors/ai-coding-radar~grants-gov-opportunity-monitor/run-sync-get-dataset-items?clean=1", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Accept", "value": "application/json" } ] }, "sendBody": true, "contentType": "json", "specifyBody": "json", "jsonBody": "{\n \"keyword\": \"artificial intelligence\",\n \"statuses\": [\"posted\", \"forecasted\"],\n \"agencyCodes\": [],\n \"eligibilityCodes\": [],\n \"fundingCategoryCodes\": [],\n \"limit\": 10,\n \"monitorId\": \"n8n-ai-grants\"\n}", "options": { "timeout": 120000 } }, "id": "71f699f5-84cb-4082-bf5f-4171a3cd4fd3", "name": "Run Grants.gov Monitor", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ -340, 80 ] }, { "parameters": { "jsCode": "const entries = $input.all();\nconst rows = entries.flatMap(({ json }) => {\n if (Array.isArray(json)) return json;\n if (json && Array.isArray(json.body)) return json.body;\n if (json && Array.isArray(json.data)) return json.data;\n if (json && Array.isArray(json.items)) return json.items;\n return json && typeof json === 'object' ? [json] : [];\n});\nreturn rows\n .filter(row => row && (row.changeType === 'new' || row.changeType === 'changed'))\n .map(row => {\n const prefix = row.changeType === 'changed' ? 'Grant update' : 'New grant';\n const closing = row.closeDate || 'no close date published';\n return {\n json: {\n ...row,\n alertType: row.changeType === 'changed' ? 'grant_change' : 'grant_opportunity',\n alertText: `${prefix}: ${row.title} (${row.opportunityNumber}) - ${row.agency}; closes ${closing}\\n${row.sourceUrl}`\n }\n };\n });" }, "id": "3e5fd4be-f97e-45ab-ab78-c77a613aacb8", "name": "Format grant alerts", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ -60, 80 ] }, { "parameters": {}, "id": "fb431eee-fbe3-41ae-9c9b-02678a17816e", "name": "Connect Slack, email, or database here", "type": "n8n-nodes-base.noOp", "typeVersion": 1, "position": [ 260, 80 ] } ], "pinData": {}, "connections": { "Every morning": { "main": [ [ { "node": "Run Grants.gov Monitor", "type": "main", "index": 0 } ] ] }, "Run Grants.gov Monitor": { "main": [ [ { "node": "Format grant alerts", "type": "main", "index": 0 } ] ] }, "Format grant alerts": { "main": [ [ { "node": "Connect Slack, email, or database here", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1", "timezone": "Asia/Shanghai", "saveManualExecutions": true }, "versionId": "10edb8c9-50d2-46b4-a4f1-eedfc7c6ea38", "meta": { "templateCredsSetupCompleted": false }, "tags": [] }