Tutorials
Item Created In Monday -> AI Agent
12 min
this guide shows how to use an ai agent to automate lead management from monday to salesforce the agent determines whether to create a new lead or update an existing one and sends an email notification via gmail this workflow helps prevent duplicate records, maintain clean crm data, and streamline lead communication prerequisites before you begin, ensure the following connection between engini and monday learn how to connect https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#79cmn connection between engini and salesforce learn how to connect salesforce to engini connection between engini to a llm learn how to connect https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o5qm90hhwykusy9lvkxoa#j1o2y or https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview g z8jtgw1cz jkub mp3n#5a8zg to engini connection between engini and gmail learn how to connect https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview m0w2e1ybsqvivrmx fpg0#4wvgz to engini create a new workflow to learn how to create a workbook, click on https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview 4s9fvgvlfs4cbd6eepi94#5nwu2 item created to get started, add a monday trigger board choose the monday board that contains your leads add conditions choose field if you want to be more specific you can add conditions (e g , status = "in progress") ai agent add the ai agent to the workflow proceed to fill the fields prompt enter a prompt that defines the task the ai agent should perform "process the newly created lead from monday com retrieve the item details, check if a salesforce lead with the same company already exists, and decide whether to create or update the lead accordingly after completing the salesforce action, send an email to the lead if the lead was created, notify that a new lead was created and details were updated if the lead was updated, notify that the account details were successfully updated " add field choose the system message field and define the rules and execution flow for the ai agent "always start by calling monday get item (item created trigger has no payload) and treat its response as the source of truth extract the lead’s email and name, if email is missing or invalid, stop search salesforce by email (or name if needed), create a lead only if none exists, otherwise mark as existing " json structured output for this tutorial you wont need to use this option add model choose the chat model action of anthropic claude choose the model sonnet/haiku/opus of the anthropic claude add storage for this tutorial you wont need to use this option add tools click add tool to define which actions the ai agent is allowed to use during execution in this step, you add all the actions from monday com, salesforce, and gmail that the agent may need in order to complete the workflow add agent tools get records choose the get records activity from salesforce tool description for this tutorial, leave the set automatically option object type choose leads filter add the company name filter and let the agent decide to which field it should match we will explain the different options, for this tutorial please use the conditional filter main filter the agent decides which filter should be applied based on the prompt and the instructions you provided this is useful when multiple filters exist and you want the ai to choose the most relevant one at runtime conditional filter – you define the field and condition , but select “let ai decide” for the value the agent determines which value to use for the filter based on the context and your instructions ai description adjust the agent search to the match the field name to the company name by inserting a short description "the company name is from the get item activity of monday" add filter add another filter if you want to be more specific add sorting for this tutorial, you won't need this option get item choose the get item activity from monday tool description for this tutorial, leave the set automatically option board choose the board in monday that corresponds to you leads item id map the item id to the item id field from the trigger note the ai agent is powerful if you choose to enable “let ai decide” , the agent can also determine which type of id is most suitable to use, based on the prompt and the available context create record choose the create record activity from salesforce tool description for this tutorial, leave the set automatically option object type choose the table in salesforce that corresponds to the leads last name let the agent decide which name to assign to this field based on the item response from monday ai description "the last name is from the get item of monday" company let the agent decide which name to assign to this field based on the item response from monday ai description "the company name is from the get item of monday " fields to our new record in our salesforce table we added this two fields choose the desired fields that you want to apply to a new lead in your salesforce table update record choose the update record activity from salesforce tool description for this tutorial, leave the set automatically option object type choose the table in salesforce that corresponds to the leads record id let the agent decide which record id to assign to this field based on the record response from salesforce ai description "this field is the id from the get records response of salesforce insert the correct one " fields to our new record in our salesforce table we added this field choose the desired fields that you want to apply to a new lead in your salesforce table send email choose the send email activity from gmail tool description for this tutorial, leave the set automatically option, what means without description for the agent to you have two options let the agent decide which mail address to assign to this field based on the item response from monday ai description "insert the mail address from the get item of monday" accurate prompt / system message – a well written prompt or system message can replace the ai description and guide the agent’s decisions automatically subject you have two options let the agent decide the subject according to conclusion of the process ai description "according to the prompt add the correct subject feel free to fill here " accurate prompt / system message a clear and accurate prompt or system message can replace this description and guide the agent to generate the correct subject automatically body you have two options let the agent decide the body text according to conclusion of the process ai description "after completing the salesforce action, send an email via gmail to the lead if a record was created let the lead know their details were received successfully and that they’re officially on the radar if a record was updated confirm that their information was refreshed and everything is up to date skip sending the email if no email address is available" accurate prompt / system message when the prompt or system message precisely defines the behavior and messaging rules, there is no need to add an ai description here—the agent will generate the appropriate email content on its own add field for this tutorial you won't need another field output at the end of the run, the workflow completes successfully the ai agent is triggered by a new item created in monday, retrieves the lead details, checks salesforce to see whether the lead already exists, and then either identifies an existing lead or creates a new one based on the result, an automatic email is sent to the lead with a message that matches the situation a new record was created in salesforce the mail was sent to the right addrerss