Facebook Pixel
Fit'DistanceDocumentation
Open the app
On this page

An email for each new student

Every hour, read the students who joined since the last run and get one email per new student, with n8n or Make.

Every hour, you get an email for each student who joined since the last run. The use case only reads your students: the email is sent by the email node of your tool, not by the API. You need a key with Students › Read (students:read) and nothing else. If you do not have one, create it in the app.

What this use case does

  1. Trigger: one run every hour.
  2. Read: GET /students with limit=50 and since set to the last run. While has_more is true, one more read follows next_cursor.
  3. Filter: keep the students whose joined_at is greater than or equal to the last run. since applies to updated_at, which also moves each time a student logs in: without this filter, every student who logged in would trigger an email.
  4. Email: one message to you for each student kept, with the name and the date of arrival.
curl "https://api.fitdistance.io/api/partner/v1/students?limit=50&since=2026-10-26T08:00:00.000Z" \
  -H "Authorization: Bearer fd_live_xxxxxxxx"

A student who was waiting for your approval enters the list when you accept, but joined_at stays the date of the request. Accepted more than an hour later, the student escapes this use case.

What it costs

A page read costs one credit, debited before the call. A run usually reads one page, so 24 credits a day. The email costs nothing. A refused parameter still costs a credit; a 401, a 403 or a 429 costs nothing.

In n8n

  1. Choose Import from URL… and paste https://fitdistance.io/documentation/api/cas-pratiques/nouvel-eleve-email.n8n.json, or download the workflow and choose Import from File….
  2. Create the Header Auth credential from Connect n8n and name it Fit'Distance API, or pick yours in each HTTP Request node.
  3. In Email me, pick your SMTP account and replace the example address with yours. The subject and the text are in French: change them if you like.
  4. Run the workflow once, then activate it.

The loop is the one of Connect n8n: More pages? is the If node and Students, next page reads the next page. Save this run keeps the date of the run once every page is read, but only on an active workflow: in a test, the window is the last hour. If a run fails midway, the next one reads the same window again and you may get a duplicate email.

In Make

  1. First module HTTP › Make a request (schedule on its clock: every 60 minutes): GET on https://api.fitdistance.io/api/partner/v1/students, Authorization header, limit = 50 and since = {{addHours(now; -1)}}, as in Connect Make, which also reads the next page.
  2. Iterator on data, then a filter: joined_at later than or equal to {{addHours(now; -1)}}.
  3. Email › Send an Email, to your address, with first_name, last_name and joined_at.

Make keeps no last run: the scenario looks at the last hour and must run every hour. Reference: students.

Next pageRemind students without a check-in for 14 daysEvery Monday, send a short message to students who have sent no check-in for 14 days, with a first run that sends nothing.