This article contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you.
Why Manual Onboarding Enrollment Breaks at Scale
Every time a new hire joins your company, someone on the HR or operations team has to remember to open Trainual, find the right subjects, and manually enroll that person. It sounds simple — until you have three people starting on the same Monday, the HR manager is on leave, and two of them never receive their training materials at all.
The fix is straightforward: trigger the enrollment automatically the moment an HR form is submitted. That is exactly what this workflow does. Using n8n — which offers open-source workflow automation with 400+ integrations and can be self-hosted for free or run on n8n Cloud — you can wire your HR intake form directly to Trainual, the platform that documents your SOPs and turns them into structured onboarding programs.
No more manual steps. No more missed enrollments.
What You Will Build
This workflow listens for a form submission (from tools like Typeform, Google Forms, JotForm, or a webhook-based HR system), extracts the new hire's details, and calls the Trainual API to create or invite the user and assign them to the correct subject groups based on their role or department.
- Trigger: HR form submission via webhook or native n8n form node
- Step 1: Parse and validate incoming data (name, email, role, start date)
- Step 2: Check if the user already exists in Trainual
- Step 3: Create the user via Trainual API if they do not exist
- Step 4: Assign role-specific subject groups (e.g. Sales Onboarding, IT Security SOP)
- Step 5: Send a welcome Slack message or email notification to the new hire
Prerequisites
- An active Trainual account with at least one subject or playbook created
- n8n (self-hosted or Cloud)
- A Trainual API key (found under Account Settings → Integrations)
- An HR form tool that can send a webhook on submission (Typeform, JotForm, Tally, etc.)
- Optional: Slack or an SMTP connection for notifications
Step-by-Step: Building the n8n Workflow
1. Set Up the Webhook Trigger
In n8n, create a new workflow and add a Webhook node as the trigger. Set the HTTP method to POST and copy the generated URL. Paste this URL into your HR form tool as the form submission endpoint. If you use the native n8n Form node, you can build the intake form directly inside n8n — no external tool needed.
2. Parse the Incoming Payload
Add a Set node (or use expressions directly in later nodes) to map the raw form fields to clean variables:
firstName→ form field for first namelastName→ form field for last nameemail→ form field for work emailrole→ dropdown or text field for job title / departmentstartDate→ date field
Use an IF node to validate that the email field is not empty. Route invalid submissions to a separate branch that sends an alert to HR.
3. Check for an Existing Trainual User
Add an HTTP Request node configured as follows:
- Method: GET
- URL:
https://api.trainual.com/v1/users?email={{$json.email}} - Authentication: Header Auth — Key:
Authorization, Value:Bearer YOUR_API_KEY
Connect an IF node after this to check whether the response array is empty. If the user exists, skip creation and jump straight to the assignment step.
4. Create the User in Trainual
When the user does not exist, add another HTTP Request node:
- Method: POST
- URL:
https://api.trainual.com/v1/users - Body (JSON):
{
"user": {
"first_name": "{{$json.firstName}}",
"last_name": "{{$json.lastName}}",
"email": "{{$json.email}}",
"title": "{{$json.role}}"
}
}
Trainual will send the new hire an invitation email automatically, so you do not need to handle that separately unless you want a custom message.
5. Assign Subject Groups by Role
Use a Switch node to route based on the role variable. Each branch calls the Trainual API to assign the appropriate subject group:
- Method: POST
- URL:
https://api.trainual.com/v1/group_memberships - Body (JSON):
{ "user_id": "{{userId}}", "group_id": "{{groupId}}" }
Keep a lookup table (a simple n8n Code node or a Google Sheet) that maps role names to Trainual group IDs. This makes the workflow easy to update when you add new departments.
6. Send a Welcome Notification
Add a Slack node or Send Email node at the end of each successful branch. A simple message to the new hire's manager — including their name, role, and a link to Trainual — closes the loop without any manual follow-up.
Handling Edge Cases
- Duplicate submissions: The existence check in Step 3 prevents double-enrollment. Add a flag in your HR system or a Google Sheet log to track processed submissions.
- Unknown roles: Route unmatched roles to a default group (e.g. "General Onboarding") and send an alert to HR so they can assign the correct group manually.
- API rate limits: Trainual's API is generous for typical HR volumes, but add a Wait node if you are bulk-importing many hires at once.
- Error handling: Enable Continue on Error on each HTTP Request node and add an error branch that notifies the HR team via Slack or email with the full payload for manual retry.
Extending the Workflow
Once the core enrollment works, it is easy to bolt on additional steps:
- Create a task in your project manager (Asana, ClickUp, Notion) for the hiring manager
- Add the new hire to a Google Calendar onboarding event
- Provision a user account in your identity provider (Okta, Google Workspace) via their APIs
- Log the enrollment in a Google Sheet or Airtable for HR reporting
Because n8n is modular, each of these is just an additional node connected to the existing flow — no rewriting required.
Time Saved vs. Manual Process
A typical manual enrollment takes 5–10 minutes per hire: opening Trainual, searching for the person, assigning subjects one by one, and sending a confirmation. For a company hiring 20 people a month, that is up to 3 hours of repetitive HR work eliminated every month — and zero missed enrollments.
If you want to stop manually enrolling new hires and ensure every employee gets the right training from day one, you can build this workflow via n8n — including 400+ integrations and a free self-hosted option — to connect your HR forms directly to Trainual and automate every SOP assignment.