Deduplicate Scraping AI Grants for Eligibility using AI n8n Workflow Template

n8n workflow template · 16 nodes · OpenAI

Deduplicate Scraping AI Grants for Eligibility using AI is a free n8n workflow template that runs on a schedule and works with OpenAI, Airtable and Gmail. It has 16 nodes, 4 of them AI nodes (OpenAI Chat Model and Information Extractor). The notes inside the workflow say: “Scheduled triggers are a great way to run this template automatically in the morning ready for your team before they start their working day.” To run it, you add your own credentials for Airtable API, Gmail OAuth2 and OpenAI API.

At a glance

Trigger
Schedule Trigger (Everyday @ 9am)
Nodes
16
Apps
OpenAI, Airtable and Gmail
AI nodes
4
Credentials
3 types
Category
Email automation

Apps and integrations

  • OpenAI
  • Airtable
  • Gmail

Node types used

  • Split Out
  • HTTP Request
  • OpenAI Chat Model
  • Information Extractor
  • Merge
  • Airtable
  • Remove Duplicates
  • HTML
  • Schedule Trigger
  • Gmail

How it works

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

Scheduled Triggers

Learn more about Scheduled Triggers

Scheduled triggers are a great way to run this template automatically in the morning ready for your team before they start their working day.

Feel free to adjust the interval to a time which suits you!

1. Fetch Latest AI Grants, Ignore Those Already Seen

Learn more about the Remove Duplicates node

A cool feature of n8n's remove duplicates node is that it works across executions. What this means for this template is that the node will help us keep track of grant IDs to know if we've already processed them and if so, filter them out so we won't have duplicate alerts.

4. Generate Latest AI Grants Alert Email

Learn more about the HTML Template node

Using our freshly collected AI grants, it would be nice if we can share them with our team members via email. A nicely formatted email digest can be generated using the HTML template node, with added links for greater impact.

Here in this demonstration, we will loop through all eligible new grants and compile them into a newsletter format using the HTML node.

5. Send to a list of Subscribers

Learn more about the Gmail node

Finally, we can source a list of subscribers to send our generated email newsletter.

Here, our subscriber list is another table alongside our grants table that we can import that list using the Airtable node. You can use any email provider that supports HTML but for this demonstration, we're using Gmail for simplicity sake.

3. Save Results to Grant Tracker

Learn more about the Airtable Node

In n8n, it's easy to send your data anywhere to manage yourself, share with your team or reuse with other workflows. Here for demonstration purposes, we'll just store each grant as a row in our Airtable database.

Check out the sample Airtable here

Setup notes

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

Try It Out!

This n8n templates demonstrates how to automatically ingest a source of leads at regular intervals and take advantage of n8n's remove duplicates node to simplify duplicate detection.

Additionally after the leads are captured, a simple alerts notification can be generated and shared with team members.

How it works

  • A scheduled trigger is set to fetch a list of AI grants listed on the grants.gov website in the past day.
  • A Remove Duplicates node is used to track Grant IDs to filter out those already processed by the workflow.
  • New grants are summarized and analysed by AI nodes to determine eligibility and interest which is then saved to an Airtable database.
  • Another scheduled trigger starts a little later than the first to collect and summarize the new grants
  • The results are then compiled into an email template using the HTML node, in the form of a newsletter designed to alert and brief team members of new AI grants.
  • This email is then sent to a list of subscribers using the gmail node.

How to use

  • Make a copy of sample Airtable here
  • The filters for fetching the grants is currently set to the "AI" category. Feel free to change this to include more categories.
  • Not interested in grants, this template can works for other sources of leads just change the endpoint and how you're defining the item ID to track.

Need Help?

Join the Discord or ask in the Forum!

2. Quickly Determine Eligibility Using AI

Learn more about the Information Extractor node

Qualifying Leads requires a lot of contextual reasoning taking into account many factors such as commercials, location and eligibility criteria. Whilst it's not guaranteed AI can or will solve this for your particular requirements, it can however get you a good distance of the way there!

AI in this template intends to reduce time (and therefore cost) for a team member needs to spend per grant listing or increase their coverage of grants which they would otherwise miss due to capacity.

Add your company details here!

Company details are added in the system prompt to help the AI determine eligibility. The more details the better!

Nodes in this workflow

The 16 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. Grants to List (Split Out)
  2. Get Grant Details (HTTP Request)
  3. OpenAI Chat Model (OpenAI Chat Model)
  4. Summarize Synopsis (Information Extractor)
  5. Eligibility Factors (Information Extractor)
  6. OpenAI Chat Model1 (OpenAI Chat Model)
  7. Merge (Merge)
  8. Save to Tracker (Airtable)
  9. Only New Grants (Remove Duplicates)
  10. AI Grants since Yesterday (HTTP Request)
  11. Get New Eligible Grants Today (Airtable)
  12. Generate Email (HTML)
  13. Everyday @ 9am (Schedule Trigger)
  14. Everyday @ 8.30am (Schedule Trigger)
  15. Get Subscribers (Airtable)
  16. Send Subscriber Email (Gmail)

Credentials you need

  • Airtable API – used by Get New Eligible Grants Today, Get Subscribers and Save to Tracker
  • Gmail OAuth2 – used by Send Subscriber Email
  • OpenAI API – used by OpenAI Chat Model and OpenAI Chat Model1

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
  3. Open each node that shows a warning and select or create its credential.
  4. Read the notes on the canvas, test the workflow with sample data, then activate it.

Do you need somewhere to run it? Read our guide to self-hosted n8n.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us