Build your first AI email assistant in under 5 minutes
In this guide, you'll learn how to build your first AI email assistant. This will take less than five minutes, and after you're done, you'll have an email responder (because no one loves to answer emails themselves). You'll create an AI agent that:
Here's exactly what we'll do:
Create a new UnicornSurf agent and add a Gmail trigger to monitor incoming emails
Add a condition to filter for business inquiries
Add your website as a knowledge base and configure Gmail actions for automated replies
Test your agent with a real email and monitor its performance
Let's get started!
Follow the steps below to build your first AI agent.
Click the "New Agent" button below Home in the top left of your workspace to begin building your AI agent.
Click "Start from scratch" to create a new AI agent.
Now let's add the trigger. Triggers wake up your AI agent when something happens, like getting a new email.
Steps:
Conditions let you define different paths in your automation based on specific criteria. They help your AI agent make smart decisions about which emails to respond to.
Now that your AI agent wakes up with every email, let's set a condition to define which emails deserve a response. Click the Condition step underPerform an action andSearch knowledge base.
UnicornSurf will only proceed to the next step if the condition is met. Each condition begins withGo down this path if...Set your condition prompt to:
the emailer is asking a question about my service, product, or companyWith this prompt, your AI agent will only continue if it receives relevant business inquiries.
The Knowledge Base is a repository of data from which your AI agent retrieves information. AI agents search through knowledge bases semantically, finding results whose meaning is similar, even if the exact text doesn't match. For example, searching for "refunds" will also find entries related to "returns."
Now we'll give your AI agent knowledge about your business so it knows how to respond accurately.
Click "Add step" and select "Search knowledge base"
Click "Website"
Enter your company website URL and click "Crawl"
Your agent will now have access to all your website content to answer questions accurately.
Actions are tasks your AI agent performs, such as replying to emails, updating a HubSpot CRM, or creating a Notion page.
Your AI agent now receives emails and searches your website for relevant information. The final step is configuring how it responds. Click "Add step" (the blue plus sign beneath the Knowledge Base) and select "Perform an action."
Click the Gmail action in the 'Linked Actions' section to ensure your AI agent responds in the same email thread. Select "Gmail Send Reply" to configure your response action.
Now customize how your AI agent crafts responses using your knowledge base.
1. Ensure the Body field is set to "Prompt AI"
2. Add this prompt to instruct your AI agent:
You are a competent email responder that will use context from a knowledge base
to succinctly respond to emailers' questions about my service, product, or company.
ONLY respond with exact information extracted from the knowledge base and keep
emails friendly and informative. Never more than 3 sentences.The "Reply To" field defaults to "All," ensuring your AI agent responds to the sender and anyone else included in the email thread.
Pro tip: BCC yourself on responses to monitor your AI agent's performance. Set the BCC field to "Set Manually" and enter your email address. This gives you visibility into all responses without cluttering the recipient's inbox.
Time to see your AI agent in action!
Click the Save button to save your workflow
Send yourself a test email from a different address (personal email works great) with a question about your business
Click "Test Mode" and select your test email
Remember: Improve your agent over time by reviewing its responses regularly and adjust the prompt to better match your communication style.
Give your AI agent a memorable name that reflects its purpose. Once enabled, click "Tasks" to view your AI agent's activity history and monitor its performance.
Monitor your agent's performance and activity
You've successfully built your first AI agent! Here's what you accomplished:
Your email assistant is just the beginning. AI agents can triage emails, pre-draft responses, alert you on Slack, create reminders, send follow-ups, and much more.
Advanced email automation with triage and smart responses
Automate meeting coordination and calendar management
Build a complete support ticket system