Grantlas API guide

Get new grant matches in Slack or email

Each morning, an automation checks one of your saved grant searches and sends the new matches to Slack or email. You need a Grantlas Pro API key, and a Zapier account on a paid plan (Webhooks by Zapier isn't on Zapier's free plan) or a Make account. A read-only key is enough.

Before you start

You need two ids. Your organization's id is shown under API keys in Settings (it starts with org_). For the saved search's id, set up the request step below (Webhooks by Zapier or HTTP) with this address first and test it: the result lists each saved search with its id, which starts with srch_. Then change the address. Only grant searches work here.

Saved searches address
https://api.grantlas.com/v1/orgs/ORG_ID/saved-searches

In Zapier

  1. Trigger: Schedule by Zapier → Every Day, early morning.
  2. Action: Formatter by Zapier → Date / Time → Add/Subtract Time. Input: the time from step 1. Expression: -24 hours. To format: YYYY-MM-DDTHH:mm:ssZ. This is the time exactly 24 hours ago, so no match is sent twice.
  3. Action: Webhooks by Zapier → GET. URL: the address below, with your two ids and, for SINCE, the time from step 2. Headers: Authorization with the value Bearer, a space, then your key.
  4. Filter by Zapier: only continue if Total (Number) is greater than 0.
  5. Action: send a Slack message or an email. In the message, insert Data Title, Data Deadline and Data Url from step 3; each lists every match.
New matches address
https://api.grantlas.com/v1/orgs/ORG_ID/saved-searches/SEARCH_ID/matches?since=SINCE&per_page=100

In Make

  1. Add HTTP → Make a request. Method: GET. URL: the address above, with your two ids and, for SINCE, the first formula below. Add a header Authorization with the value Bearer, a space, then your key. Turn on Parse response.
  2. Add a filter after it: continue only if Data: total is greater than 0.
  3. Add Flow Control → Iterator. Array: Data: data from the HTTP module. It passes on one match at a time.
  4. Add Tools → Text aggregator. Source module: the Iterator. Text: the second line below. It uses the Iterator's title, deadline and url; if your Iterator isn't module 2, map those three from it instead. Row separator: New row. This joins every match into one message.
  5. Add a Slack or email module, and put the Text aggregator's text in the message.
  6. Set the scenario's schedule to Every day, early morning, and turn it on.
The time 24 hours ago, in Make
{{formatDate(addDays(now; -1); "YYYY-MM-DDTHH:mm:ssZ")}}
One line per match, in the Text aggregator
{{2.title}} · due {{ifempty(2.deadline; "no deadline")}} · {{2.url}}

Good to know

Each match is a grant Grantlas first saw at or after the time you send, with your exclusions applied. Webhooks are planned. Until then, a daily check like this is the way to hear about new matches.

Other recipe: Keep your Tracker in a Google Sheet · API reference