Brief the AI Operator

Dinosaur Park Emergency Response - Challenge 3 of 5
Difficulty
2/10
Tags
EssentialsHTTP RequestopenaiAPIAI AgentsExpressionsJSONimages

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

  1. 1Copy the exercise below
  2. 2Paste into your n8n editor (Ctrl+V)
  3. 3Solve it — use hints if you get stuck
  4. 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.

  1. Start with the workflow from Challenge 2 (already provided)
  2. Add another OpenAI node after "Analyze image"
  3. Configure it for chat (Message a Model)
  4. Add a System Message defining the operator's role as a control room operator
  5. 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.

Hints

  1. Add an OpenAI node after "Analyze image"
  2. Set the operation to "Message a Model"
  3. In the Messages section, click "Add message" to add messages

Understanding Message Type and Role:

  • Type defines the data format: is this message text, a file, or an image?
  • Role defines interpretation: is this a System message (personality/instructions the AI always follows) or a User message (input that varies each time)?
  1. Add a System message (Role: System, Type: Text): "You are the operator in the control room of a dinosaur theme park with 7 areas. Acknowledge briefings and summarize the situation clearly."
  2. Add a User message (Role: User, Type: Text) that combines data: The current time is: {{ $('Control Room Map Screen').item.json.incidentReport.timeOfDay }}. {{ $json.content[0].text }} {{ $('Control Room Map Screen').item.json.incidentReport.severity }} dinosaur(s) escaped.
  3. The $json.content[0].text references the vision analysis from the previous node

Explanation

System Prompts Define Behavior:

The system message tells the AI who it is and how to behave. Without it, the AI is a generic assistant. With it, the AI becomes a specialized park control room operator.

Combining Data from Multiple Nodes:

In n8n, you can reference data from any previous node using expressions:

  • $json - current node's input
  • $('Node Name').item.json - specific node's output

This lets you build rich context by pulling data from different sources.

The Briefing Structure:

A good briefing includes:

  1. Time - when the event occurred
  2. Situation - what the AI vision detected
  3. Severity - how many dinosaurs escaped

What's Next:

The AI Operator is ready to receive briefings, but it can't do anything yet. In the next challenge, you'll give it a tool to log emergencies.

Copy the Solution

Paste into n8n with Ctrl+V to compare with your approach.

Login to see the exercise

Create an account to access challenges and track your progress.

Log in to see exercise
Step 3 of 5

Next up

Create Emergency Logging Tool

Related Content

Continue your learning journey with these related challenges and guides: