docs

Make: send saved affiliates to your CRM

Every morning, Make picks up the affiliates you saved in RecruitAffiliates.ai and adds each one to your CRM.

Save affiliates in RecruitAffiliates.ai as you find them. Every morning, Make copies the new ones into your CRM and tags them, so nobody gets added twice. A CRM is the tool where you track the people you're talking to, like HubSpot or Pipedrive.

This recipe only reads and tags. It never spends a credit.

What you need

  • A plan that includes the API, and a key with the finder:write scope. Writing a tag needs write.
  • A Make account, and your CRM connected to Make.

Build the scenario

  1. In Make, create a scenario. Start it with the "HTTP" app and the module "Make a request".
  2. Fill in the request:
SettingValue
URLhttps://api.affiliaterail.com/v1/finder/saved
MethodGET
Query stringview = saved, limit = 100
HeaderAuthorization = Bearer rail_test_...
Parse responseYes
  1. Add an "Iterator" module. Map its array to data from the HTTP module. Each saved affiliate now runs through the rest of the scenario one at a time.
  2. Add a filter after the iterator. Let a row through only when tags doesn't contain in-crm.
  3. Add your CRM's "Create a contact" module. Map the affiliate's details across. The email is only there if you've revealed it.
  4. Add a second "Make a request" module to tag the affiliate:
SettingValue
URLhttps://api.affiliaterail.com/v1/finder/prospects/{{id}}
MethodPOST
HeadersAuthorization = Bearer rail_test_..., Content-Type = application/json, Idempotency-Key = crm-{{id}}
Body typeRaw, JSON
Request content{"tags": ["in-crm"]}

Use the id from the iterator in both places.

  1. Set the schedule to once a day, at a time that suits you.
  2. Press "Run once" in Make to test it with your test key. Then swap in a live key.

Tags, not a memory

The in-crm tag is how the scenario remembers who it's already sent. You'll see it on each affiliate in the app too. Take the tag off and that person goes to your CRM again the next morning.

The tags you send replace the ones already there. If you use other tags, read tags from the iterator and send them back along with in-crm.

More than 100 saved

One request returns up to 100 people. If the answer says has_more is true, you have more. Add a "Repeater" and call again with cursor set to next_cursor from the last answer, until has_more is false. The API guide explains how cursors work.

If something goes wrong

  • A 402 means your plan doesn't include the API.
  • A 403 means the key only has finder:read. Make a key with finder:write.
  • A 429 means you've hit the rate limit. Turn on "Allow storing of incomplete executions" in the scenario settings, and Make retries later.

Get events the moment they happen

The scenario above checks on a schedule. A webhook tells Make the moment something happens instead, like a reply or a finished search. Webhooks explains the events. You need a plan that includes webhooks.

  1. Start a scenario. Add the "Webhooks" module, then "Custom webhook".
  2. Add a webhook, name it, and copy the address Make gives you.
  3. In RecruitAffiliates.ai, go to Settings, then the Webhooks tab. Add the address as an endpoint and pick your events.
  4. Press Send a test. Make learns the shape of the body from it.

Keep the address private. Anyone who has it can post to your scenario. Checking the signature is what stops a fake.

Ready-made scenarios

Two scenarios you can import as they are. In Make, create a scenario, press the three dots at the bottom, choose Import Blueprint and pick the file.

After you import one:

  1. Open the webhook module and add a new webhook. Copy its address into the Webhooks tab.
  2. Put a Read only key in place of rail_live_REPLACE_WITH_A_READ_ONLY_KEY in the module that gets the affiliate.
  3. Put your Slack address in the last module, or connect Google and pick your sheet. The sheet needs columns for name, website, email, date and source, in that order.

Make passes the body on already parsed, so these scenarios can't check the signature. The webhook's address is long and random, and that's what keeps a stranger out. If you need the signature checked, use the n8n version or your own code.

Was this page helpful?