Job alerts with n8n or Zapier
This recipe builds a weekly job alert with no server of your own: a scheduled call to POST /v1/listings/posted-this-week from an n8n HTTP Request node or a Zapier webhook action. The call is synchronous, the matching roles come back in the same response, so the flow simply maps them into Slack or email.
How does the pipeline fit together?
- Schedule: an n8n Schedule Trigger or Zapier “Every Week” trigger fires once a week.
- Submit: an HTTP node calls RolesAPI with your search; the matching roles are in the response body.
- Notify: the next node maps the roles into Slack or email.
Step 1: Submit the weekly search
In your scheduled HTTP Request node (n8n) or a Webhooks by Zapier POST action:
curl -X POST "https://api.rolesapi.com/v1/listings/posted-this-week" \ -H "Authorization: Bearer rk_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "keyword": "backend engineer", "location": "Austin, TX", "country": "us", "max_pages": 2 }'The call responds synchronously with the matching roles in data and costs 1 credit per page fetched (2 here).
Step 2: Map the response fields
Each item in the response’s data array is a role. Map these fields into your Slack message or email:
| Notification field | Role field |
|---|---|
| Title line | title at company.name |
| Location | location (plus remote) |
| Salary | salary.min–salary.max salary.currency |
| Posted | posted_at |
| Link | url |
A Slack message template for an n8n Slack node:
New this week: {{ $json.title }} at {{ $json.company.name }}{{ $json.location }} - posted {{ $json.posted_at }}{{ $json.url }}In Zapier, feed the webhook action’s data output into a Slack “Send Channel Message” or Gmail action with a Looping step for multiple roles.
What about async jobs and signatures?
If you graduate to async work (big batches via POST /v1/roles/batch or deep searches), register a hook URL once with POST /v1/webhooks and RolesAPI will POST signed job.succeeded / job.failed events to it (see the Webhooks guide). Every delivery carries x-rolesapi-signature, and the secret returned at registration verifies it. In n8n, drop a Function node between the Webhook node and the rest of the flow:
const crypto = require("crypto");
const secret = $env.ROLESAPI_WEBHOOK_SECRET;const header = $json.headers["x-rolesapi-signature"] || "";const rawBody = $json.rawBody; // enable "Raw Body" on the Webhook node
const parts = Object.fromEntries(header.split(",").map(p => p.split("=")));const t = Number(parts.t);if (Math.abs(Date.now() / 1000 - t) > 300) { throw new Error("Signature timestamp outside tolerance");}
const expected = crypto .createHmac("sha256", secret) .update(`${parts.t}.${rawBody}`) .digest("hex");
if (!crypto.timingSafeEqual(Buffer.from(expected, "hex"), Buffer.from(parts.v1, "hex"))) { throw new Error("Bad signature");}
return $input.all();For a lighter-weight guard on Zapier, use a hard-to-guess Catch Hook URL and a Filter step that checks event equals job.succeeded.
What does this cost?
Two credits a week (one per page) comes to about 8 or 9 credits a month, well inside the free plan’s 100 credits while you evaluate.