{ "nodes": [ { "id": "c17e444e-0a5e-4bfe-8de6-c3185de4465d", "name": "Grants to List", "type": "n8n-nodes-base.splitOut", "position": [ -240, -180 ], "parameters": { "options": {}, "fieldToSplitOut": "oppHits" }, "typeVersion": 1 }, { "id": "9251d39c-6098-42fa-aadd-3a22464dee64", "name": "Get Grant Details", "type": "n8n-nodes-base.httpRequest", "position": [ 280, -280 ], "parameters": { "url": "https://apply07.grants.gov/grantsws/rest/opportunity/details", "method": "POST", "options": {}, "sendBody": true, "contentType": "form-urlencoded", "bodyParameters": { "parameters": [ { "name": "oppId", "value": "={{ $json.id }}" } ] } }, "typeVersion": 4.2 }, { "id": "ade994d6-a1f8-45bf-a82e-83eb38da08d6", "name": "OpenAI Chat Model", "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "position": [ 440, -120 ], "parameters": { "options": {} }, "credentials": { "openAiApi": { "id": "8gccIjcuf3gvaoEr", "name": "OpenAi account" } }, "typeVersion": 1 }, { "id": "4d81b20e-0038-48d3-840c-3fcf8b798a0d", "name": "Summarize Synopsis", "type": "@n8n/n8n-nodes-langchain.informationExtractor", "position": [ 460, -280 ], "parameters": { "text": "=Agency: {{ $json.synopsis.agencyName }}\nTitle: {{ $json.opportunityTitle }}\nSynopsis: {{ $json.synopsis.synopsisDesc }}", "options": { "systemPromptTemplate": "You've been given a grant opportunity listing. Help summarize the opportunity in simple terms." }, "schemaType": "manual", "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n \"goal\": { \"type\": [\"string\", \"null\"] },\n \"duration\": { \"type\": \"string\" },\n \"success_criteria\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n },\n \"good_to_know\": {\n\t\t \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n\t}\n}" }, "typeVersion": 1 }, { "id": "71e1a2e9-6690-4247-aae3-f5bd61019553", "name": "Eligibility Factors", "type": "@n8n/n8n-nodes-langchain.informationExtractor", "position": [ 640, -120 ], "parameters": { "text": "=Agency: {{ $json.synopsis.agencyName }}\nTitle: {{ $json.opportunityTitle }}\nSynopsis: {{ $json.synopsis.synopsisDesc }}\nEligibility: {{ $json.synopsis.applicantEligibilityDesc }}", "options": { "systemPromptTemplate": "Help determine if we are eligible for this grant.\n\nWe are AI Consultants Limited (“Company”) and are the controllers of your personal data. Our registered office is Unit 29, Intelligent Park, Milton Road, Cambridge Cambridgeshire CB9 RDW, and our registered company number is 1234567.\n\nWe are part of a group of companies which provides consultancy services across the globe. Our other group companies are:\n\nAI Consultants Inc. of 2 Drydock Avenue, Suite 1210, Boston, MA 02210, USA\nAI Consultants (Singapore) Pte Ltd of 300 Beach Road, Singapore 199555\nAI Consultants Japan Inc, of 3-1-3 Minamiaoyama, Minato-ku, Tokyo, 107-0062\nIn the UK we are registered with the Information Commissioner’s Office under registration number Z9888888.\n\nIn the US we are registered with the Data Privacy Framework Program (DPF). To view the Company’s certification, please visit https://www.dataprivacyframework.gov/list.\n\nWe are a leading, worldwide product development service provider. We specialise in design engineering services, professional technical services and product technical support services (“Services”).\n\nAs the deep tech powerhouse of Capgemini, CC spearheads transformative projects to solve the toughest scientific and engineering challenges. Ambitious clients collaborate with us to create new-to-the-world technologies, services and products that have never been seen before. Our unique combination of technical, commercial and market expertise yields market-leading solutions that are hard to copy. This creates valuable intellectual property that generates protectable long-term value.\n\nWe work with some of the world’s biggest brands and most ambitious technology start-up ventures across a wide range of markets. From aerospace to agritech, consumer to industry, communications to healthcare, our knowledge of one sector can often be applied to another to create new breakthroughs. We focus on our clients’ success and we are trusted as integral partners in the future of their businesses.\n\nWe do important, difficult, radical and impactful things that benefit society. We helped develop the world's first 24/7 wrist-worn activity monitor, wireless pacemaker and wireless patient monitor, as well as the first connected drug inhaler. Our work led to the most densely packed cellular network in the world – orchestrating swarms of bots across highly automated warehouses. It produced the Bluetooth chip that connects your phone to your car and the latest satellite technology that lets people in remote locations across the world keep in touch." }, "schemaType": "manual", "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"eligibility_matches\": {\n\t\t \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n\t}\n}" }, "typeVersion": 1 }, { "id": "d741ef63-dcf3-452d-978c-8cbc27f55a33", "name": "OpenAI Chat Model1", "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "position": [ 600, 20 ], "parameters": { "options": {} }, "credentials": { "openAiApi": { "id": "8gccIjcuf3gvaoEr", "name": "OpenAi account" } }, "typeVersion": 1 }, { "id": "7354ed6d-50f5-4234-90d8-2d9d0c7eccd4", "name": "Merge", "type": "n8n-nodes-base.merge", "position": [ 1000, -120 ], "parameters": { "mode": "combine", "options": {}, "combineBy": "combineByPosition" }, "typeVersion": 3 }, { "id": "2dffda98-18c6-4c7b-8fc3-0e6539642ea2", "name": "Save to Tracker", "type": "n8n-nodes-base.airtable", "position": [ 1420, -20 ], "parameters": { "base": { "__rl": true, "mode": "list", "value": "appiNoPRvhJxz9crl", "cachedResultUrl": "https://airtable.com/appiNoPRvhJxz9crl", "cachedResultName": "US Grants.gov Tracker" }, "table": { "__rl": true, "mode": "list", "value": "tblX93C9MNzizhibd", "cachedResultUrl": "https://airtable.com/appiNoPRvhJxz9crl/tblX93C9MNzizhibd", "cachedResultName": "Table 1" }, "columns": { "value": { "URL": "=https://grants.gov/search-results-detail/{{ $('Get Grant Details').item.json.id }}", "Goal": "={{ $json.output.goal }}", "Notes": "={{ $json.output.good_to_know.join('\\n') }}", "Title": "={{ $('Get Grant Details').item.json.opportunityTitle }}", "Agency": "={{ $('Get Grant Details').item.json.synopsis.agencyContactName }}", "Status": "New", "Funding": "={{ $('Get Grant Details').item.json.synopsis.estimatedFunding }}", "Duration": "={{ $json.output.duration }}", "Award Floor": "={{ $('Get Grant Details').item.json.synopsis.awardFloor }}", "Posted Date": "={{ $('Get Grant Details').item.json.synopsis.postingDate }}", "Agency Email": "={{ $('Get Grant Details').item.json.synopsis.agencyContactEmail }}", "Agency Phone": "={{ $('Get Grant Details').item.json.synopsis.agencyContactPhone }}", "Eligibility?": "={{ $json.output.eligibility_matches.length > 0 ? 'Yes' : 'No' }}", "Award Ceiling": "={{ $('Get Grant Details').item.json.synopsis.awardCeiling }}", "Response Date": "={{ $('Get Grant Details').item.json.synopsis.responseDate }}", "Success Criteria": "={{ $json.output.success_criteria.join('\\n') }}", "Eligibility Notes": "={{ $json.output.eligibility_matches.join('\\n') }}", "Opportunity Number": "={{ $('Get Grant Details').item.json.opportunityNumber }}" }, "schema": [ { "id": "Opportunity Number", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Opportunity Number", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Status", "type": "options", "display": true, "options": [ { "name": "New", "value": "New" }, { "name": "Under Review", "value": "Under Review" }, { "name": "Interested", "value": "Interested" }, { "name": "Not Interested", "value": "Not Interested" } ], "removed": false, "readOnly": false, "required": false, "displayName": "Status", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Title", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Title", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "URL", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "URL", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Goal", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Goal", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Success Criteria", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Success Criteria", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Notes", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Notes", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Eligibility?", "type": "options", "display": true, "options": [ { "name": "Yes", "value": "Yes" }, { "name": "No", "value": "No" } ], "removed": false, "readOnly": false, "required": false, "displayName": "Eligibility?", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Eligibility Notes", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Eligibility Notes", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Duration", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Duration", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Agency", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Agency", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Agency Email", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Agency Email", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Agency Phone", "type": "string", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Agency Phone", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Posted Date", "type": "dateTime", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Posted Date", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Response Date", "type": "dateTime", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Response Date", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Funding", "type": "number", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Funding", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Award Ceiling", "type": "number", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Award Ceiling", "defaultMatch": false, "canBeUsedToMatch": true }, { "id": "Award Floor", "type": "number", "display": true, "removed": false, "readOnly": false, "required": false, "displayName": "Award Floor", "defaultMatch": false, "canBeUsedToMatch": true } ], "mappingMode": "defineBelow", "matchingColumns": [] }, "options": {}, "operation": "create" }, "credentials": { "airtableTokenApi": { "id": "Und0frCQ6SNVX3VV", "name": "Airtable Personal Access Token account" } }, "typeVersion": 2.1 }, { "id": "f0712788-b801-4070-a5c2-2f7ed620588e", "name": "Only New Grants", "type": "n8n-nodes-base.removeDuplicates", "position": [ -60, -180 ], "parameters": { "options": {}, "operation": "removeItemsSeenInPreviousExecutions", "dedupeValue": "={{ $json.id }}" }, "typeVersion": 2 }, { "id": "fb4ac14d-0bdd-40f7-9b31-3a23450b1f0b", "name": "AI Grants since Yesterday", "type": "n8n-nodes-base.httpRequest", "position": [ -420, -180 ], "parameters": { "url": "https://apply07.grants.gov/grantsws/rest/opportunities/search", "method": "POST", "options": {}, "jsonBody": "{\n \"keyword\": \"ai\",\n \"cfda\": null,\n \"agencies\": null,\n \"sortBy\": \"openDate|desc\",\n \"rows\": 5000,\n \"eligibilities\": null,\n \"fundingCategories\": null,\n \"fundingInstruments\": null,\n \"dateRange\": \"1\",\n \"oppStatuses\": \"forecasted|posted\"\n}", "sendBody": true, "specifyBody": "json" }, "typeVersion": 4.2 }, { "id": "0446c882-764a-4c94-8c49-f368c50586a0", "name": "Get New Eligible Grants Today", "type": "n8n-nodes-base.airtable", "position": [ -400, 500 ], "parameters": { "base": { "__rl": true, "mode": "list", "value": "appiNoPRvhJxz9crl", "cachedResultUrl": "https://airtable.com/appiNoPRvhJxz9crl", "cachedResultName": "US Grants.gov Tracker" }, "table": { "__rl": true, "mode": "list", "value": "tblX93C9MNzizhibd", "cachedResultUrl": "https://airtable.com/appiNoPRvhJxz9crl/tblX93C9MNzizhibd", "cachedResultName": "Table 1" }, "options": {}, "operation": "search", "filterByFormula": "=AND(\n {Status} = 'New',\n {Eligibility?} = 'Yes',\n IS_SAME(DATETIME_FORMAT(Created, 'YYYY-MM-DD'), DATETIME_FORMAT(TODAY(), 'YYYY-MM-DD'))\n)" }, "credentials": { "airtableTokenApi": { "id": "Und0frCQ6SNVX3VV", "name": "Airtable Personal Access Token account" } }, "typeVersion": 2.1 }, { "id": "70bca43a-d00e-4ee6-828a-9926ba1d8fdb", "name": "Generate Email", "type": "n8n-nodes-base.html", "position": [ -160, 500 ], "parameters": { "html": "\n\n
\n\n \n \n \n \n\n \n \n \n \n \n \n \n\n\n \n \n\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n
\n \n \n\n\n \n \n\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n
\n \n \n\n\n \n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n
| \n