Quick overview
This workflow hosts an n8n chat-based role-play coach that uses OpenAI to simulate workplace conversation scenarios, provides on-demand hints, and generates multi-judge scored feedback saved to n8n Data Tables.
How it works
- Receives each trainee message through an n8n Chat trigger and loads configured language, turn limit, rubrics, and coaching principles.
- Looks up an active role-play session in an n8n Data Table, and if none exists, shows a scenario menu or starts a new session when the trainee sends 1–4.
- If the trainee sends /hint during an active session, uses OpenAI to return a context-aware coaching tip without consuming a turn.
- For normal role-play turns, uses OpenAI to reply in character as the selected persona with short workplace-style responses, and appends the trainee/persona exchange to the session transcript in the Data Table.
- When the turn limit is reached or the trainee sends /end, closes sessions with no trainee dialogue without scoring, otherwise prepares the final transcript for evaluation.
- Sends the transcript to three separate OpenAI judge prompts to score Listening & Empathy, Questioning & Clarity, and Outcome & Next Steps, then computes an average score.
- Uses OpenAI to write a short markdown feedback summary and a first-person persona debrief, saves results to a second Data Table, closes the session, and returns the feedback in the chat.
Setup
- Add an OpenAI API credential and select it in all OpenAI chat model nodes used for the persona, hints, judges, coach summary, and persona debrief.
- Create two n8n Data Tables—one for sessions (chatId, practiceId, scenario, persona, transcript, status, turns) and one for results (chatId, practiceId, scenario, listening, questioning, outcome, average, feedback, personaDebrief)—and select their IDs in the Data Table nodes.
- Review the Settings values (language, maxTurns, rubrics, and coaching principles) and update them to match your training standard before activating the workflow.