32dots HEIDELBERG AI
Session 2

Voice to Lab AI via Mattermost

easy
USE 0 - 15 min

Talk to the lab — get an answer in the chat

Login: use the email you signed up with at curriculum.32dots.de/signup + password cos2026. No account? Use demo@cos.uni-heidelberg.de / cos2026.
https://n8n.32dots.de ↗
  1. 1 Open https://mattermost.32dots.de in a second tab, log in with the same email + cos2026, and join the channel #lab-ai if you are not already in it.
  2. 2 Type any lab question in #lab-ai, e.g. 'What is PCR in two sentences?' and send it.
  3. 3 Wait 2–5 seconds. The lab-bot replies in the channel with your question quoted and the answer below.
  4. 4 On your phone or laptop: tap the microphone icon in Mattermost's message box, record a question out loud, send the voice clip.
  5. 5 Watch the bot transcribe your speech and answer the transcribed question.
  6. 6 Now click 'Copy credentials + open workflow in n8n' above — that's where the Mattermost webhook, Whisper call, AI Agent, Groq model, Simple Memory, and Post-to-Mattermost step are all wired together. You'll adapt it in the Build phase.

You see a reply from lab-bot with '> **Input (text):**' or '> **Input (voice):**' followed by an answer — for both a typed and a spoken question.

UNDERSTAND 15 - 60 min

One agent, two input modes — voice and text through a single pipeline

📥Mattermost WebhookTriggerTRIGGER🎙️Whisper STT (Groq)Pre-process (voice pat…PRE-PROCESS🧠AI AgentOrchestratorORCHESTRATOR📤Post to MattermostPost-process (reply)POST-PROCESSGroq gpt-oss-120bChat ModelCHAT MODEL🧵Simple Memory (per…Short-term memoryMEMORY

The solid arrows show the main flow; the dashed lines are how Model, Memory, and Tools plug into the Agent on its three input ports. This is the same shape n8n draws on its canvas.

Key concept

The Agent is the same shape you learned in Card 01. What changes between sessions is the plumbing around it: where input comes from (chat box → Mattermost channel), how input is prepared (typed → transcribed), where output lands (chat pane → channel post). Swap voice for images and you only touch pre-process. Swap Mattermost for Slack and you only touch trigger + post-process. A good Agent is portable because you isolated its context from the IO.

  1. ?Open the AI Agent node. Read its system prompt. Find the sentence that specifically addresses voice input. Why is that sentence there — and what would break without it?
  2. ?Open the Simple Memory node. The sessionKey is set to the Mattermost channel_id. What would break if you left it as the default — and what is the correct key for a 1:1 DM bot instead of a channel bot?
  3. ?Open the Whisper HTTP Request node. It POSTs to Groq's audio/transcriptions endpoint, while the Agent uses Groq's chat/completions. Why are these two different endpoints even though both are hosted by Groq?
  4. ?Now imagine you need to accept PDFs too. Where in this workflow would the PDF-reading step go — and which existing nodes would you leave completely untouched?
BUILD 60 - 90 min

Extend the agent — personality, memory scope, one new capability

Duplicate the shared workflow. Personalise the Agent. Prove memory works. Add one small upgrade of your choice (details in steps).

  1. 1 In n8n, open 'cos2-voice-to-lab-ai'. Click ⋯ → Duplicate. Work in your copy only.
  2. 2 Open the AI Agent node. Rewrite the system prompt using the four-part anatomy from Card 01 (role / constraints / style / output format). Add one constraint specific to your field, e.g. 'Always mention at least one relevant technique when discussing protocols.' Keep under 150 words.
  3. 3 Save. Open #lab-ai in Mattermost. Post a question (text or voice — voice comes from the microphone icon in the message bar). Wait for the reply. Then post a follow-up that only makes sense if the bot remembers turn 1 (e.g. 'What about the second step you mentioned?'). Confirm it answers without you re-explaining.
  4. 4 Now post that same follow-up in a DIFFERENT Mattermost channel. The bot should have NO memory of the previous conversation there — that proves memory is correctly scoped to channel_id.
  5. 5 Pick ONE small upgrade: (a) add an IF node in front of the Agent that drops messages containing a forbidden word of your choice; or (b) add a second pre-process step, e.g. detect the language of the input and pass it as context to the Agent; or (c) change the system prompt so the bot always ends its reply with a specific structured footer (⚠ Uncertainty / 📚 Suggested reading / 🔗 Related concept).
  6. 6 Send five questions. Confirm your upgrade fires on every one.
Deliverable

Screenshot of: (1) your Agent system prompt, (2) the two-turn memory test in one channel, (3) the empty-memory proof from the second channel, (4) three replies showing your chosen upgrade in action.

This session integrated three services. Real labs run on ten or more. If your PI asked you to add Slack support alongside Mattermost tomorrow, what is the smallest change to this workflow that would make it work? What is the biggest risk?