Make AI Agents (New)
Create AI agents for different triggers
3 min
in this guide, you'll create ai agent scenarios using common triggers chat messages, emails, forms, and webhooks use the guided examples to build new ai agents or troubleshoot existing ones once done, you'll have the basic {{scenario singular lowercase}} structure, which you can tailor to your needs by adding agent tools, knowledge, and specific instructions before you begin a trigger module is the first module in the scenario it determines how the agent receives its requests or information slack trigger this slack triggered {{scenario singular lowercase}} watches a slack channel for new user messages and the agent replies to them prerequisites a slack account with a private channel for interacting with the agent while a private channel is more convenient for testing, you can use either a private or public channel add a watch new events module the slack > watch new events module watches your slack channel for new messages, so the agent receives them when they arrive to add a watch new events module in the {{scenario singular}} builder, click the giant plus in the app search, search for and click slack click watch new events in webhook name , name your webhook to identify it later in event type , select the following from the dropdown new private channel message (for a private channel) new channel message (for a public channel) in connection , click add to create a new slack connection or select an existing one from the dropdown in channel , select the channel that you set up earlier click save test the slack > watch new events module click run once on the {{scenario singular}} toolbar in slack, send a message in your channel in the {{scenario singular}} builder, click the output bubble next to the module to view the data items in an output bundle for example, the text value is the user message if you've sent a message to your slack channel, but the module hasn't received data yet wait a few minutes slack webhooks sometimes delay in detecting messages stop the {{scenario singular lowercase}} run and click the down arrow next to run once to run the {{scenario singular lowercase}} using data from a previous run you've now added the slack > watch new events module to your {{scenario singular lowercase}} add a send a message module now that you've added a module that sends new slack messages to your agent, add a slack > send a message module to allow the agent to reply to them to add a slack > send a message module in the {{scenario singular}} builder, click the plus icon next to the slack > watch new events module in the app search, click slack search for and click send a message in connection , select your slack connection in channel id or name , click the field and map the channel value from the slack > watch new events module in text , configure the reply click the field and map the text value from the slack > watch new events module before the text value, enter custom text, such as "agent ", to specify that the reply is from an agent without this text, the agent won't distinguish user and agent messages, causing it to reply to itself in an infinite loop later, you'll filter messages with the "agent " text, so the agent only processes user messages optionally, to distinguish between agents and users most clearly, https //apps make com/slack#obtain your client credentials in slack and create a bot connection this way requires a more complex setup toggle advanced settings in thread message id (time stamp) , enter a function for slack timestamps click the field, and search for and click the ifempty function in the function, before the semicolon, map the thread timestamp value from the slack > watch new events module after the semicolon, map the timestamp value from the slack > watch new events module you use a function here so that the agent replies in the slack thread after receiving the first message the function covers two types of slack timestamps timestamp the identifier of the first message of the slack thread thread timestamp the identifier of the slack thread once the thread has a reply (unavailable for the first message) click save click save on the {{scenario singular}} toolbar right click the route between the modules and select set up a filter set up a filter that allows only user messages to pass through, so the agent doesn't reply to itself in an infinite loop in label , name your label "only user messages " in condition , map the text value from the slack > watch new events module, select text operators does not contain , and enter "agent " click save test the slack > send a message module click run once on the {{scenario singular}} toolbar in slack, send a message in your channel check if you see a reply in the same thread beginning with "agent " in the same thread this means the module works toggle immediately as data arrives on the {{scenario singular}} toolbar to activate the {{scenario singular lowercase}} , so that the {{scenario singular lowercase}} automatically receives new messages from slack click save click save on the {{scenario singular}} toolbar you've now added your slack modules to your {{scenario singular lowercase}} add a run an agent (new) module to finish your {{scenario singular lowercase}} , add the make ai agents (new) > run an agent (new) module to add the run an agent (new) module right click the route between the slack modules and select add a module in the app search, search for and click make ai agents (new) select the run an agent (new) module in the module settings, in connection , select an existing ai provider connection from the dropdown or click add to create 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 small model smaller models react quickly to new data, which is ideal for this chat based ai agent in instructions , describe who the agent is and what it does for example, "you are a helpful agent answer with a warm and friendly tone " for now, the sample instructions provided are sufficient later, you can tailor them to the agent's workflow in input , map the text value from the slack > watch new events module this action gives the agent access to incoming slack messages in conversation id, enter the same function that you added to the thread message id (time stamp) field in the add a send a message module step this action allows the agent to remember previous exchanges with a user, and provide contextual responses when the user asks follow up questions in the same thread click save click the slack > send a message module in text , keep the custom "agent " text and replace the text value with the response value from the run an agent (new) module this action allows the agent to reply with its own response click save click save on the {{scenario singular}} toolbar send a message to your channel in slack to check if the agent works you've now built a slack triggered ai agent {{scenario singular lowercase}} telegram trigger this telegram triggered {{scenario singular lowercase}} watches a telegram bot chat for new user messages and the agent replies to them prerequisites a telegram account a https //core telegram org/bots/tutorial your token (you'll use this when creating a webhook in {{product name}} ) add a watch updates module the telegram bot > watch updates module watches for new messages from your bot channel in telegram to add the telegram bot > watch updates module in the {{scenario singular}} builder, click the giant plus in the app search, search for and click telegram bot click the watch updates module in webhook name , name your webhook to identify it later in connection , click add to create a new telegram bot connection in connection name , name your connection to identify it later in token , paste the token you received when you created the telegram bot click save click save click save on the {{scenario singular}} toolbar you've now added the telegram bot > watch updates module to your {{scenario singular lowercase}} add a route to reply to /start or non text messages when you start a conversation with a telegram bot, the bot sends a /start message to your {{scenario singular lowercase}} as /start isn't a unique user message, you don't want it to trigger your agent additionally, this example slack {{scenario singular lowercase}} only accepts text, excluding non text media, such as images, videos, or audio files add a route that sends a welcome message in response to /start , or requests text only messages in response to non text messages to add a route click the plus icon next to the telegram bot > watch updates module in the app search, search for and click flow control click router click the 1st route in label , enter welcome response in condition , configure the fields based on the following map the message text value from the telegram bot > watch updates module text operators equal to /start make sure you've selected message\ text here, rather than a similar value, such as edited channel post text click add or rule to add a second condition for non text messages map the message text value from the telegram bot > watch updates module basic operators does not exist click save click save on the {{scenario singular}} toolbar click the giant plus next to the 1st route in the app search, search for and click telegram bot click the send a text message or a reply module in connection , select the same telegram bot connection that you used earlier in chat id , map the message chat id value from the telegram bot > watch updates module in text , enter the following function, so when the message is /start , the agent replies "welcome!", and when it's anything else, the agent replies that it only accepts text click save click save on the {{scenario singular}} toolbar test the module click run once on the {{scenario singular}} toolbar in your telegram bot chat, click start this triggers the correct message as a reply you've now added a route that replies to /start or non text messages add a route to reply to user messages to add a route to reply to all other user messages click the 2nd route in label , enter " all other user messages " select yes to set the route as a fallback click save right click the telegram > send a message or a reply module and select clone move the cloned module down until it links to the empty giant plus, then unclick right click the empty giant plus and select delete module in the cloned module, in text , delete the function enter "hello" and map the message text value from the telegram bot > watch updates module click save click save on the {{scenario singular}} toolbar toggle immediately as data arrives on the {{scenario singular}} toolbar to activate the {{scenario singular lowercase}} to test the {{scenario singular lowercase}} , go back to your telegram bot chat and send a message to receive an agent reply you've now added a route to reply to user messages add a run an agent (new) module to add the run an agent (new) module to the user message route right click the 2nd route and select add a module in the app search, search for and click make ai agents (new) click the run an agent (new) module in connection , select an existing ai provider connection from the dropdown or click add to create a new one in model , select a small model smaller models react quickly to new data, which is ideal for this chat based ai agent in instructions , describe who the agent is and what it does for now, enter "you are a friendly agent " in input , map the message text value from the telegram bot > watch updates module in conversation id , map the message chat id value from the telegram bot > watch updates module in telegram, each user has their own message chat id the agent uses it to remember the conversation history with the user and answer any follow up questions as users chat more with your telegram triggered agent, storing all past messages can get expensive to reduce tokens, you can set this field to start fresh conversations periodically (like using a timestamp), so the agent remembers less you've now added the make ai agents (new) > run an agent (new) module to the {{scenario singular lowercase}} add the agent response to finish this {{scenario singular lowercase}} , map the agent response in the telegram bot > send a text message or a reply module to allow the agent to reply to the user message to add the agent response in the telegram bot > send a text message or a reply module on the 2nd route, in text , delete the existing text and map the response value from the make ai agents (new) > run an agent (new) module click save click save on the {{scenario singular}} toolbar you've now created a telegram triggered ai agent {{scenario singular lowercase}} email trigger this email triggered scenario 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 you can later tailor the watch criteria to your needs prerequisites a gmail account a test email, with any text and subject, sent to your personal email 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}} add the run an agent (new) module to add the make ai agents (new) > run an agent (new) 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 (new) 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 (new) module to your {{scenario singular lowercase}} add a reply to an email module next, 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 (new) 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 (new) 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}} form trigger this form triggered scenario watches new form responses and the agent replies to form questions in an email prerequisites a gmail account a tally account a tally form configured with the following fields your first name your last name your email your question a test form submission with your personal email address while this example uses tally, you can use any forms service add a watch new responses module the tally > watch new responses module is a https //help make com/webhooks that watches all new form responses to add the watch new responses module in the {{scenario singular}} builder, click the giant plus in the app search, search for and click tally click the watch new responses module click create a webhook in webhook name , name your webhook to identify it later in connection , select an existing tally connection alternatively, click add to create a new one and select oauth in form id , select the form that you created earlier click save click save click save on the {{scenario singular}} toolbar test the module click run once on the {{scenario singular}} toolbar click the output bubble to view your responses from the test form you submitted earlier you've now added a tally > watch new responses module to your {{scenario singular lowercase}} add a run an agent (new) module to add the make ai agents (new) > run an agent (new) module click the plus icon next to the tally > watch new responses module in the app search, search for and click make ai agents (new) click the run an agent (new) 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 your agent is and what it does you can copy paste the below you are a friendly agent who answers general questions always use html for your answers you request html here so that the agent provides its answers in an email in a structured format in input , map the fields by id your question value from the tally > watch new responses module, so the agent receives the question from the tally form click save click save on the {{scenario singular}} toolbar you've now added the make ai agents (new) > run an agent (new) module to your {{scenario singular lowercase}} add a send an email module with the gmail > send an email module, the agent answers the form question directly to the user's email address to add a send an email module click the plus icon next to the run an agent (new) module in the app search, search for and click gmail click the send an email module in connection , select an existing gmail connection from the dropdown or click add to create a new one in to , click add recipient in recipient email address 1 , map the fields by id your email value from the tally > watch new responses module, so the agent replies to the email address specified in the tally form in subject , specify the subject of the agent's email reply, for example, "thanks for your question!" in body type, select raw html from the dropdown in content , map the response value from the run an agent (new) module click save click save on the {{scenario singular}} toolbar test the {{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 email to see if the agent replied to your question you've now created a form triggered ai agent {{scenario singular lowercase}} webhook trigger this webhook triggered {{scenario singular lowercase}} watches for new data sent to the docid 6npti6yvzkftbszmdl9ey and the agent sends a reply back to the webhook it is ideal for sending data from third party services to {{product name}} prerequisites a https //www postman com/ add a custom webhook the webhooks > custom webhook module allows the agent to automatically receive new data from any third party service to add the custom webhook module in the {{scenario singular}} builder, click the giant plus in the app search, search for and click webhooks click the custom webhook module in webhook , click add to create a new one in the create a webhook dialog, in webhook name , name your webhook to identify it later optionally, in api keys , create an api key that consists of characters of your choice for additional security copy the webhook url to your clipboard you've now added a webhooks > custom webhook module to your {{scenario singular lowercase}} test the webhook in postman to check that your webhook works, send a sample request to it from postman this action mimics a real request from a third party service to send the request in postman paste your webhook url and select post in body , add the following configuration { "request" "test", "conversationid" "333333" } in authorization , if you have an api key in key , enter x make apikey in value , enter your api key click send to send the request to the webhook go back to your webhook {{scenario singular lowercase}} to check if you have a successfully determined status below the webhook url this means that the webhook works click save you've now tested your webhook url in postman add a run an agent (new) module to add a make ai agents (new) > run an agent (new ) module in the {{scenario singular}} builder, click the plus icon next to the webhooks > custom webhook module in the app search, search for and click make ai agents (new) click the run an agent (new) module in connection , select an existing ai provider connection or click add to create 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 for example, "you are a helpful agent who answers questions " in input , map the request value from the webhooks > custom webhook module in conversation id , map the conversationid value from the webhooks > custom webhook module the agent uses this id to remember previous exchanges in the conversation, allowing it to provide contextual responses when the user asks follow up questions the agent treats each new value as a new conversation in postman, you set a random conversation id value click save click save on the {{scenario singular}} toolbar you've now added a make ai agents (new) > run an agent (new) module to your scenario add a webhook response module the webhooks > webhook response module allows the agent to reply to the webhook request to add the webhooks > webhook response module in the {{scenario singular}} builder, click the plus icon next to the make ai agents (new) > run an agent (new) module in the app search, click webhooks click webhook response in body , enter a simple json response { "response" "\<response>" } to replace the \<response> placeholder, map the response value from the make ai agents (new) > run an agent (new) module toggle advanced settings in custom headers , click add item to define the type of data returned in key , enter content type in value , enter application/json click save click save on the {{scenario singular}} toolbar toggle immediately as data arrives to activate the {{scenario singular lowercase}} , so it's ready to receive incoming data as soon as it comes click save you've now built a webhook triggered {{scenario singular lowercase}} , so any third party service can send data to the webhook and pass it into the agent while these examples show user triggered agents, other agent types can run autonomously based on a schedule and respond to any data to build other types of ai agent {{scenario plural lowercase}} using pre built templates, see https //www make com/en/ai agents library