This tutorial demonstrates how to build a complete multi-AI agent workflow that generates YouTube titles and descriptions, allows user approval with iterative editing, and sends the approved content via email.
Learning Objectives
- Building multi-agent workflows with specialized agents
- Using variables to pass data between agents
- Implementing Human-in-the-Loop with iterative refinement
- Concatenating outputs for downstream processing
- Integrating email automation
Step-by-Step Guide
Step 1: Add the YouTube Title Generator Agent
- Click to add a new workflow action
- Select "Invoke agent"
- Name the action "YT title gen"
- Select the YouTube title generator agent
- Input message is set to system last message by default
- Save the workflow
Step 2: Add Description Generator and Editor Agents
- Add second Invoke agent: "youtube description action"
- Add third Invoke agent: "YouTube title description edit action"
- Switch to vertical layout for easier viewing
Step 3: Implement Variables for Parallel Input
Ensure both generators receive the initial user input, and the editor receives both outputs.
- Add a Set Variable action after the start section
- Create variable "local userinput"
- Set value to system.last message.text
- Update both generators to use local userinput as input
- Capture outputs: YouTube Title output, YouTube Description output
Step 4: Concatenate Output for the Editor
- Add Set Variable action
- Create variable "YouTube title description output"
- Set value to concatenation of Title + Description outputs
- Update Editor input to use this concatenated variable
Step 5: Adding Human-in-the-Loop (Conditional Approval)
- Add "Ask a Question" action
- Display the editor output in the question
- Ask: "Do you approve? Type YES or describe what changes you want."
- Save response to "approval input" variable
Step 6: Implement If/Then/Else and Loop
- Add If/Then/Else block
- IF condition: user response equals "yes" -> proceed to email
- ELSE: Set variable combining outputs + user feedback
- Use Go To action to loop back to title generator
- Workflow re-runs with new context until approval
Step 7: Email Integration
- Add Set Variable for "email prompt"
- Concatenate: recipient address + subject + body (approved content)
- Add Invoke Agent for email agent
- Use email prompt variable as input
Key Concepts
Variables carry context: Each loop iteration adds user feedback to the context, so the AI "remembers" what was tried before.
Go To creates loops: The workflow cycles back to regenerate content until the user types "yes" to approve.
Concatenation combines outputs: Multiple agent outputs are combined into single variables for downstream processing.
Human approval gates: The workflow pauses and waits for user input before proceeding.