Combine Context for AI Chat
You're the control room operator at Isla Dino. Your AI vision system can now detect danger zones on the park map. But detection is just the first step - someone needs to act on this information.
Enter the AI Operator: an AI agent that receives briefings about the park status and can take appropriate action. Your job is to configure this agent with the right persona and provide it with all the context it needs.
What you'll practice:
- Configuring OpenAI chat models
- Writing system prompts to define AI behavior
- Combining data from multiple nodes in a message
- Using expressions to reference earlier nodes
Your Task
- 1Copy the exercise below
- 2Paste into your n8n editor (Ctrl+V)
- 3Solve it — use hints if you get stuck
- 4Check the solution when done
Add an AI Operator that receives a briefing about the current park status.
Prerequisite: This challenge assumes you have an OpenAI API key configured in n8n. If not, read this guide first.
- Start with the workflow from Challenge 2 (already provided)
- Add another OpenAI node after "Analyze image"
- Configure it for chat (Message a Model)
- Add a System Message defining the operator's role as a control room operator
- Add a User Message that combines data from previous nodes:
- The current time from the incident report
- The AI vision analysis result
- The severity (number of escaped dinosaurs)
Hint: Use expressions to reference data from earlier nodes. You can pull values from any previous node in your workflow.
Expected output: The AI Operator acknowledges the briefing and is ready to take action.
Get the exercise workflow
Create a free account to copy exercises into your n8n editor.