Make AI Agents (New)
Create AI agents for different...
Email-triggered AI agent
4 min
this email triggered ai agent {{scenario singular lowercase}} watches new emails in your gmail account, and the agent replies to them the watched emails are ones you've sent to yourself with a specific subject later, you can tailor the watch criteria to your needs prerequisites a gmail account a test email, with any text and subject, sent to your personal email step 1 add watch emails module the gmail > watch emails module watches your gmail account for new emails to add a watch emails module in the {{scenario singular}} builder, click the giant plus in the app search, search for and click gmail select the watch emails module in connection , select an existing gmail connection from the dropdown or click add to add a new one optionally, in label , you can filter the emails by label toggle advanced settings in sender email address , enter your personal email address so that the module only watches emails from that address optionally, in subject , add the specific subject to watch for click save in the dialog that prompts you to choose where to start processing data, click the link in the choose where to start dialog, select choose manually and select the first option (the email you sent yourself earlier) click save on the {{scenario singular}} toolbar click run once on the {{scenario singular}} toolbar to retrieve your test email and have data to map in other modules click the output bubble to view the output items that you can share with the agent for example, the full text body value is the content of the email you've now added the gmail > watch email module to the {{scenario singular lowercase}} step 2 add the run an agent module to add the make ai agents (new) > run an agent module click the plus icon next to the gmail > watch emails module in the app search, search for and click make ai agents (new) click the run an agent module in connection , select an existing ai provider connection from the dropdown or click add to add a new one if you don't want to set up an account with an ai provider, select make's ai provider in model , select a model from your chosen ai provider in instructions , describe who the agent is and what it does you can copy paste the below you are a customer service agent that answers questions from customers read the content of the email and answer in html format directly reply to the email don't provide any email signature in input , map the full text body value from the gmail > watch emails module so that the agent accesses the email content later, you can add other values that the agent needs, such as date and from (name) in conversation id , map the thread id value from the gmail > watch emails module this action retrieves the email history so the agent remembers previous emails in case the user replies click save click save on the {{scenario singular}} toolbar you've now added the make ai agents (new) > run an agent module to your {{scenario singular lowercase}} step 3 add a reply to an email module add a gmail > reply to an email module so the agent replies to incoming emails to add a reply to an email module click the plus icon next to the make ai agents (new) > run an agent module in the app search, click gmail click the reply to an email module in connection , select your existing gmail connection in thread id , map the thread id value from the gmail > watch emails module this action allows the agent to reply directly to the initial user email in body contents , click add body content in text , map the response value from the run an agent module, so the agent sends its response as the email reply click save click save on the {{scenario singular}} toolbar test your {{scenario singular lowercase}} click the down arrow next to run once on the {{scenario singular}} toolbar in scenario run , select the previous scenario run to use its trigger data as test data click run once check your inbox for a reply from the agent you've now created an email triggered ai agent {{scenario singular lowercase}}