Exercise 1: Upgrade the Morning Brief
Objective: Add an AI step to your existing Morning Brief workflow (from Module 2). The AI step should transform raw weather and news data into a 2-3 sentence plain-English summary that highlights what's worth your attention.
What you're starting with: - A working Morning Brief workflow that fetches weather data and news headlines - An email sent to you each morning with raw data
What you're adding: - An AI module (OpenAI or Anthropic) configured with a system prompt - The AI reads the raw weather/news data and writes a brief summary - Your morning email now contains the AI-written summary instead of raw data
Steps:
-
Get an API key. If you haven't already, sign up for OpenAI or Anthropic. Generate an API key and store it securely.
-
Add the AI module. In your workflow platform (Make, n8n, or similar):
- Add a new module/node
- Search for "OpenAI" or "Anthropic"
- Create a connection using your API key
-
Configure the model (start with GPT-4o-mini or Claude Haiku for cost)
-
Write your system prompt. This defines how the AI should think about the task. Example:
``` You are a morning briefing writer. Your job is to read raw weather and news data and write a brief, practical summary that tells someone what they need to know about the day ahead.
Rules: - Write 2-3 sentences maximum - Focus on actionable details: weather impact (umbrella? jacket?), important news - Be conversational and assume the reader is busy - If weather data is incomplete, do your best with what you have - If all data is missing, write: "No data available today" ```
- Map the data. Configure the user message to include the raw data from your weather and news steps. Example:
``` Weather data:
News headlines:
Write a brief morning summary. ```
-
Test with hardcoded data. Before connecting real data, test with sample weather and news. Run the AI step 5-10 times. Does the output look good? Adjust the prompt if needed.
-
Connect to real data. Replace the hardcoded test data with mapped fields from your previous workflow steps. Run the complete workflow and verify the email looks good.
-
Document what you learned. Write down:
- The final system prompt you settled on
- Any changes you made during iteration (e.g., "initially the AI was rambling, so I added 'maximum 3 sentences'")
- One paragraph describing the prompt iteration process: how many iterations, what went wrong, how you fixed it
Success criteria: - The workflow runs without errors - The AI-generated summary is 2-3 sentences and mentions actionable weather details - You've iterated at least twice on the prompt based on real output - You have a final system prompt you're happy with