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
- Trigger: one run every hour.
- Read:
GET /studentswithlimit=50andsinceset to the last run. Whilehas_moreistrue, one more read followsnext_cursor. - Filter: keep the students whose
joined_atis greater than or equal to the last run.sinceapplies toupdated_at, which also moves each time a student logs in: without this filter, every student who logged in would trigger an email. - 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
- 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…. - Create the Header Auth credential from Connect n8n and name it
Fit'Distance API, or pick yours in each HTTP Request node. - 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.
- 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
- First module HTTP › Make a request (schedule on its clock: every 60 minutes):
GETonhttps://api.fitdistance.io/api/partner/v1/students,Authorizationheader,limit=50andsince={{addHours(now; -1)}}, as in Connect Make, which also reads the next page. - Iterator on
data, then a filter:joined_atlater than or equal to{{addHours(now; -1)}}. - Email › Send an Email, to your address, with
first_name,last_nameandjoined_at.
Make keeps no last run: the scenario looks at the last hour and must run every hour. Reference: students.