This article contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you.
Trainual SOP Automation: Auto-Assign Training Modules When a New Employee Joins
Every time a new hire starts, someone on your team has to remember to log into your training platform, find the right modules, and manually assign them. It takes time, it gets forgotten, and it creates inconsistent onboarding experiences. If your company uses Trainual for SOPs and onboarding, this guide shows you how to wire up a fully automated workflow that assigns the right training modules the moment a new employee record is created — all in about 20 minutes.
The backbone of this automation is n8n — an open-source workflow tool with 400+ integrations that you can self-host for free or run on n8n Cloud. It connects your HR system or spreadsheet to Trainual's API without writing a full application.
What You Will Build
A trigger fires when a new employee is added to your HR system (BambooHR, HiBob, a Google Sheet, or even a Typeform submission). n8n then calls the Trainual API to:
- Create or look up the new user in Trainual
- Assign the correct subject or path based on the employee's role or department
- Send a welcome Slack message or email confirming the assignment
- Log the action to a Google Sheet or Notion page for HR records
The whole chain runs automatically, with zero manual steps.
Prerequisites
- A Trainual account with at least one subject or path already built. If you have not structured your SOPs yet, Trainual lets you document processes and turn them into role-based onboarding tracks — the perfect starting point before you automate assignment.
- An n8n instance (self-hosted or Cloud)
- API access to your HR system or a shared Google Sheet as a simple employee roster
- A Trainual API key (found under Account Settings → Integrations → API)
Step 1 — Choose Your Trigger
Open n8n and create a new workflow. The trigger node depends on where your employee data lives:
- Google Sheets: Use the Google Sheets Trigger node set to "Row Added." When HR pastes a new hire into the roster tab, the workflow fires.
- BambooHR / HiBob: Use the Webhook node and register the URL as a new-hire webhook in your HRIS settings.
- Typeform / Tally: Use the native Typeform or Webhook node so a completed onboarding intake form starts the flow.
For this walkthrough, we use the Google Sheets Trigger because it requires no HRIS admin access.
Step 2 — Parse the New Employee Data
Add a Set node after the trigger. Map these fields from your spreadsheet columns:
firstNamelastNameemailrole(e.g. "Sales Rep", "Engineer", "Support Agent")departmentstartDate
These values will be passed to the Trainual API in later nodes.
Step 3 — Create the User in Trainual
Add an HTTP Request node with these settings:
- Method: POST
- URL:
https://api.trainual.com/v1/users - Authentication: Header Auth — Key:
Authorization, Value:Bearer YOUR_API_KEY - Body (JSON):
{
"user": {
"first_name": "{{ $json.firstName }}",
"last_name": "{{ $json.lastName }}",
"email": "{{ $json.email }}",
"role": "member"
}
}
Save the response. The returned id field is the Trainual user ID you need in the next step.
Step 4 — Map Role to Trainual Subject IDs
You need to know which Trainual subject (or path) corresponds to each role. The easiest approach in n8n is a Switch node:
- Condition 1:
roleequals "Sales Rep" → setsubjectIdsto[101, 205] - Condition 2:
roleequals "Engineer" → setsubjectIdsto[102, 206] - Default → set
subjectIdsto[100](the general onboarding subject)
Get your subject IDs from the Trainual API: GET https://api.trainual.com/v1/subjects. Paste the returned IDs into the Switch node values.
Step 5 — Assign the Subjects
Add another HTTP Request node for each subject assignment. Use a Loop Over Items node to iterate over your subjectIds array, then inside the loop:
- Method: POST
- URL:
https://api.trainual.com/v1/subjects/{{ $json.subjectId }}/assignments - Body (JSON):
{
"assignment": {
"user_id": {{ $json.trainualUserId }},
"due_date": "{{ $json.startDate }}"
}
}
Trainual will immediately send the new employee a notification that training has been assigned.
Step 6 — Notify HR and Log the Event
After the assignment loop, add:
- A Slack node (or Gmail node) to post a message: "✅ [Name] has been enrolled in [X] Trainual modules. Start date: [date]."
- A Google Sheets node to append a log row: timestamp, employee name, email, modules assigned, status.
This gives HR a full audit trail without any manual data entry.
Testing the Workflow
Add a test row to your Google Sheet with a dummy employee. Click Execute Workflow in n8n. Check:
- The user appears in Trainual under People
- The correct subjects are listed under their assignments
- The Slack message fires
- The log row is appended to the sheet
If the HTTP Request returns a 422, check that the email is not already registered in Trainual. Add an error branch with a Merge node to handle existing users gracefully.
Tips to Extend This Workflow
- Probation reminder: Add a Wait node set to 30 days, then send a follow-up Slack message asking managers to review progress.
- Completion webhook: Register a Trainual completion webhook pointing back to n8n to trigger a "training complete" Slack celebration or HR task.
- Multi-language paths: Use the employee's preferred language field to assign localised Trainual paths where you have them.
- Buddy assignment: Look up a random team member from a "buddies" sheet and DM them an introduction task whenever a new hire is onboarded.
Why This Setup Beats Manual Assignment
Manual training assignment fails in predictable ways: modules get forgotten for some roles, HR spends 10–15 minutes per hire on admin, and new employees sit idle on day one waiting for access. This n8n workflow eliminates all three problems. The automation runs in seconds, applies consistent role-based logic every time, and creates a logged record automatically.
Combined with well-structured SOPs in Trainual, you get an onboarding system that scales from 2 new hires a month to 200 — without adding HR headcount.
If you want to automate your employee onboarding, you can document your SOPs and training tracks via Trainual — including role-based onboarding paths and structured process documentation — to make sure every new hire gets the right training from day one, automatically.