Building an auto-reply email bot with no-code

Introduction

I'm going to try and do live demo as well. This is one of the things we do. Live demos, very specifically, don't always go well. You saw some stuff go not perfectly before. Probably some of the stuff I'm going to try and do is not going to go perfectly, but we're trying specifically not to do just talking to slides because that's what you see everywhere else.

The Goal of Live Demos

What I'm going to try and do is I'm going to use Zapier. How many of you have used Zapier before or know about Zapier? OK, not that many. You're going to be interestingly surprised on how easy this is going to be.

So Zapier, it's just zapier.com. I am not paid by them in any way. They don't sponsor us. I am trying to, if you know anyone in that company, because I end up demoing their product way too often.

Building a Bot with Zapier

But what I'm going to try and do is build a bot whose only purpose is going to be to look at email coming in. and then answer questions. So look at email coming in, send that to a chat GPT bot, or in this case called an OpenAI assistant, which is the same thing, and then answer automatically without me having to do anything.

So I'm going to glance over some of it because I don't look, we have pizza coming and we've got Catherine doing an amazing talk afterwards. I don't want you to be here for two hours.

Uh, so I'm going to glance over some of it, but please come and talk to me if there's anything particular that you want to know more about.

Creating a Zap with AI Tools

So left hand side here, I'm going to hit, create, hit, create a zap. Zapier recently released this AI creation tool as well, which is a little bit gimmicky, more a solution looking for a problem here, I would think, but it's an interesting starting point, so I'll use it. So I'm going to just describe what I'm trying to automate here.

When an email hits my Gmail account, send it to chat GPT and take the response or what? take the response and send an email back from my account.

All right, so this is basically what I just described.

Recording and Access to the Demo

I forgot to say, by the way, all of this is being filmed. All of it is recorded. It will all be uploaded on MindStone. So if you signed up to the event, you will all get a notification in about two days or something like this with all the recordings. It'll be high quality with the actual stuff that you see on screen. So anything you're doing on your phones, you can get way better footage and audio in two days or so.

Okay, so here I'm gonna see what happened. So it executed. You can see that it did decently well.

It got step one right, which is when new email arrives. Then it, however, it duplicated the chat dpt step, which is probably something that I did.

So I'm just going to try this. And I'm gonna remove the superfluous step here.

Configuring Email Triggers

Now, here I'm gonna configure the first step. So when I get new email, it's asking me to choose an account. I've got this account set up, which is demos at mindstone.com. I'm going to select that.

1Then absolutely critical step is to select only new emails that hit my inbox. 1First time I did this demo, I didn't do that and I forgot that there's a send inbox, a send box in your Gmail account, which meant that when I did the demo, Well, email came in, the bot replied that got put in my sent email box, which triggered the bot again, which sent another email. By the end of the demo, I had sent more than 10,000 emails and my Gmail account was locked, um, which is not quite what you want to do.

So definitely select only stuff that hits your inbox. Then click Continue, test the trigger. When you're testing this, it just takes whatever kind of first emails that you have in your account, and it allows you to then use that test data in the other steps. It just makes the creation process a little bit easier.

So here it found an email from Ashley. Great question. I would suggest that it's OK to trust someone of your colleagues, even if you think, OK, well, this is an email that came in. I'm just going to use this as a test record because it populates everything going forward.

Integration with OpenAI's Chatbot

Now the other thing here is, so I just hit continue and it's automatically putting me in step two. So I've now done the step where it triggers every time an email hits my account. Now I want it to send that email to a chat GPT bot. Now I'm going to use, you have a whole bunch of different configurations, but the event I want to use here is called conversation with an assistant.

How many people here know what an assistant is for OpenAI? OK, there are three, four.

OK, well, so maybe those of you that have a paid ChatGPT account, there's this concept called GPTs. The Assistant is basically the API equivalent of GPTs in the user interface. So it's a pre-configured version of ChatGPT that has a little bit more context that you can set up in advance.

And the way you do that, by the way, and this is the most technical this will get, which is you can go to platform.openai.com. You can create an account. It's free to create the account. Actually, when you sign up, I think you get $20 of credit that you can use as well, which gets you thousands of requests.

In the left-hand side, you have these assistants. And then here you can see these assistants that I've set up.

So the one that I'm gonna be using today was this one, which is the AI Mastery Lead demo. So you can see it has a few configurations that are already loaded in. It's as if you started a chat with ChatGPT with a few instructions at the beginning, so it has that context. You're not starting from zero.

So that's what I'm gonna select here. Start a conversation with an assistant.

Connecting OpenAI to Zapier

I'm gonna select my OpenAI account. Again, in order to link your OpenAI account is very simple. Once you are on platform.openai.com, you have this API keys bit here. You just have to generate a new key and Zapier asks you to copy paste it and you're done. There's nothing else to it.

I hit continue and I'm going to say the message that I'm going to send to this assistant, the email thread is I'm going to select here the body of the email of the first step. So this is the body. The body of the email is basically the text that is in the email that I got on step one and the assistant I'm going to use is what I just mentioned.

The AI mastery lead demo. and everything else I'm going to just keep as it is.

Now it's allowing me to test this step as well. So when I test this step, it takes a few seconds generally. When I do this demo in Europe, the later in the day I do it, the longer it takes because in Europe we have a little bit of an advantage. When we do it early in the day, the US hasn't woken up and OpenAI is faster. Later in the day, the whole world is using it, or at least Europe and the US is using it, or North America is using it, and so you have more load. But sometimes it can take a few seconds, even up to a minute sometimes.

Now I tested this step and this is a little bit finicky. You get so much data back on each step because Zapier breaks it up in a way that you can really use very specific data points at each step. So you have to look for the very specific data that you want from that particular step. So here I know, for example, I want to look at what is called full response. And here you get the reply from the actual assistant.

I forgot to walk you through in detail. what this actual assistant does. So there are a whole bunch of things here.

Explaining the Assistant's Role

So at a high level for MindStone, we actually do AI mastery training. So we go into companies to train them how to use ChatGPT, how to use these tools for their work. And so there's a whole bunch of stuff here in terms of how you create the template to talk to ChatGPT.

But the most important bit that you want to look at today is the process here, which is you inspect the email threat you're given. You consult your uploaded knowledge PDF documents about our service offering. Based on the email thread you have and the information you have about our service offering, think about two key questions that help you qualify the user while at the same time moving them along the spectrum to being more ready to buy. And then respond to the query by writing an email using the template. And then the template I have here is very simple hey whatever first name give a one-line introduction answer the user's query if it has an answer and then would you mind answering the following question so i can best help direct you to someone that can i best help you or direct you to someone that can so that's what this bot does right yep

The very good point. Yeah.

So the, uh, that was the process process and there's a template. So the only thing that this email, this bot does or this specific assistant does is it looks at an email thread that is a question about AI mastery and then it will construct a reply. That reply is both an answer to the question and two qualifying questions that help the individual think about the offer that we have in a way that they might not have before.

Testing the Chatbot's Response

Okay, so I just configured step two, right? I tested it and then I got the answer back.

Setting Up Email Responses

I'm going to hit continue. And now what I want to do is I want to send an email with the text that I got back from ChatGPT. So I'm going to use the same demos account. In the to field, I'm going to put the from field, the from email from step one, right? So whoever sent me the very first email.

Then where do we have it in the from name? I'm just going to put Joshua in the subject. I'm going to put re and then the topic subject of the email there and then the body of the email. I'm going to use the full response. I got back in the last step.

So where is it again? Because you get so much information here, you'd sometimes get lost. So here you can see this is the full response that I'm getting here.

So what this now does is it sends an email from my account to the person that sent an email in the first place. It's popular. It's populating the subject with the re of the top. So re plus the subject line that the email came in with and it's using the text. I go back from chat to PT to populate in the body of the email to send out.

Okay, I'm going to hit continue. I'm not going to test this step, um, simply because that would actually trigger the email and I'm going to hit publish.

Interactive Audience Participation

And now I would ask you all to get out your phones and send an email to demosatmindstone.com. So I hear this particular email, demosatmindstone.com, with a question about how to use AI in your work, how to help your teams, get better at using AI to be more productive, whatever the question is, or about how we engage with customers, whatever the thing, whatever question you might have.

Whilst you do that, I'm going to be refreshing this here. So this is the thing that I always have to wait a little bit for is Zapier is not instant. So once you, well, one, the first thing is when you sent an email, it might take a few seconds or a minute or two before it actually hits my inbox. But second, once it hits my inbox, it might take a minute or two for Zapier to actually start triggering. So this, this might take just a little bit.

mind demos with an S demos with an S at mind stone.com.

Yeah. I'm just going to refresh this pitch to see if this is coming in.

So what I'm doing here on the left-hand side, you have zap runs, and that allows you to see the history of how many times that zap has actually run, so how many times it has executed. Right now it hasn't executed yet, so it's waiting for emails to come in.

There we go.

Monitoring the Zap's Execution

So now you can start to see it populating. So when I click on this now, you can actually live see what is happening. So here I can see an email hit my account. I can see the email.

Ah, quite a few of you have actually sent emails. Where is the email? Uh, tip in inbox, the output here of this step. What was the actual email?

Let's see where it is. Uh, It's not actually, let me just see. Hmm, I'll actually see in this step here, data in.

All right, there's some data missing on this one. I'm just going to look at the next step. Maybe it was just erroring out there.

Okay, here you can see. How can my team be more productive with AI? Sam, very good. You can see the second step.

So it went to ChatGPT. ChatGPT answered. The answer that ChatGPT gave was, hey, Samuel, I noticed you're interested in how your team can be more productive with AI. The MindSign AI Mastery Program offers comprehensive solutions for enterprises looking to harness the power of AI, blah, blah, blah.

It gives a whole bunch of, it actually gives references as well, because it, I forgot to show one thing, which is in this assistant, I did upload, we just had a talk about vector databases and how all of that works, so I uploaded two presentations on MindStone and what we are about, and it's actually using those presentations as reference material as it's answering, but you You can see that the answer came through, and then it asked two questions.

To better understand how we can meet your needs and ensure that our master program is the right fit for you, please could you answer the following questions? What are your current challenges or goals? And can you provide some insight into the scale of your team and the industry you operate in?

So you should all have received a reply at this point. Can you look at your emails and see if you got something? Okay, so within a few minutes, literally what we just did here is an auto reply bot that just automatically answers questions on AI mastery.

And so you can imagine how many use cases you can have for just setting up an email, whether it's internally, because you have questions on policy documents, or you have questions on on simple legal questions that you might want to answer or in this case AI mastery like we have the materials that are there doesn't I don't have to manually write all of those emails it can just be answered by a bot and people can email that bot whenever they want to but

Adding Control to the Process

1The problem you have there is that you have nothing to control it with. So I don't know what really is going out. And also, I don't know how much it is hallucinating and how much bad information is going out and how much good information is going out.

So I'm going to add one more step. I'm going to edit this up.

And most importantly, one of the things like if you think about the scenario for us here is I'm interested in figuring out who actually wants to talk to us to help their team be more productive, who is actually interested in potentially having a commercial deal, actually buying the product that we have to offer. 1So what I'm going to do is I'm going to insert another step.

I created another assistant here, which is called the AI mastery lead demo qualifier. And the qualifier, what it does is very simple. It inspects the email thread.

It's the same step one, the same step two, which is it looks at the knowledge documents that it has. But then what it does is it rates the exchange of the email from zero, where the user is not ready to order and doesn't have the information they need to place an order, to 100 being the user seems ready to place an order and they have the information they need. So it's just going to try and put those two on a spectrum based on the thread it has.

It's going to give me a judgment call on this user is ready to place an order, this user is not, or wherever they are on that spectrum. So I'm going to insert another chat2pt step here. And I'm going to do exactly the same. So I'm going to actually rename this one and say rate

Willingness to buy. I'm going to again do conversation with an assistant. Continue. The assistant, I'm going to.

Use a mass really demo qualifier, the message. This is the threat. I'm going to again give it the body of the email. not do anything else.

Differentiating User's Willingness to Buy

So I'm sending that same thread this time to the lead qualifier, which is the different assistant. Um, um, yeah, I can test the step whilst it's testing that step. Actually I can now wait for it to stop. Now what I'm going to do is I want to insert a choice, which is if the lead qualifier thinks that this user is on a range from 0 to 100, say over 80, ready to buy, I want it to insert me in the thread.

And if it's under 80, I just want it to continue having the conversation. I don't want to be involved.

So what I do is I add a step. Add a path. You can see path A and path B. I am going to do, I'm going to move some of these around.

So I'm going to do send email to path A. I'm going to put conversation, path B, path A. I'm going to delete these initial steps here. This path, path A here, I'm going to name Not are not yet willing to buy.

Path B. Willing to buy. The path rules are going to be on Path A. Continue to Path A if the willingness to buy. I'm going to select full response here.

is greater than or is greater than. Seventy nine. And then path to.

I'm going to say continue with path to how we actually did, but I put them the wrong way around. This one should be lower than. So less than 80.

And this one. This one is going to be. Greater than.

OK, so what I'm going to do now is I'm going to finish these up.

So I'm going to duplicate the send email step. I'm going to put that. Put that here.

I'm going to move this actually a little bit further. So the reason I'm moving this ahead is I want to reuse that in both trees, the actual answer that comes back from Tag2BT.

So you can see here, just to recap what is happening, the email comes in, it rates the willingness to buy, it creates an answer, it then goes down one of these two. Here it sends an email directly.

In the second one here, I'm going to rename Had me in copy and I'm just going to modify. I just copied the step before.

The only thing I'm going to do is in the action in CC, I'm going to add Joshua at mindstone.com hit continue. Uh, I can actually do one more thing here. I could, if I want to actually just for the demo, I'm going to add

At the end, I've added Joshua in CC in case you have any more questions. Continue. I'm going to skip the test and I'm going to hit publish.

And I'm now going to say added a tree on willingness to buy or triage. And we hit publish now.

Email Triage Based on Enthusiasm

So now if I can ask you all to email once more, uh, and maybe whichever way you end up at. So basically make the email sound like you are interested in actually buying AI mastery at, at engaging, engaging with us in a, in a contract. And um, as you're sending that email, you should now, if the email is enthusiastic enough, it should automatically detect that and then go down path B, which would be willingness to buy, which will put me in copy.

And if it is not enthusiastic enough, it ends up in path A, and then it just goes back and forth with the bot. You can make this much more refined so you can add the whole thread here. In this case, for example, I always directly answered the email, but I didn't actually add the context of the previous emails, which means the thread doesn't build up over time.

You can have a whole bunch of other decision mechanisms, so you could have triage if this is customer support, where if the query is in relation to X, then direct here. If it's in relation to wide and direct there, If you are confident about, like you can have an assistant that rather than rates on willingness to buy, it can rate on confidence level. How confident are you that you can actually answer this question?

If the bot is not confident that it can answer the question based on the material it has, it can put you in CC. If it is confident, it answers itself. So many different things you can do here, and the key is that you now have this chat GPT step that you can use not just to generate content, that goes out, but actually to become a decision mechanism, a decision center at the core of your entire flow.

Concluding the Demo and Q&A

So let's actually see how, if, if, well, I imagine some of you will have sent an email. I'm not going to wait for that. I'm going to go into questions at this point.

Does anyone have any questions before we go into Catherine?

Yes. Yes.

That's exactly what I did. So I basically what you can do is you can upload files, um, uh, through the open AI assistant and that will, you can, you can put any proprietary files you want in there. So stuff that is not accessible to public. And no, open AI does not train on your data. That is an interesting myth. Um, if you have a paid account, all of that is totally fine.

Um, now any, yes. How is, how is this different from other algorithms? So, OK, how is this different from from other tools that do this?

It is not that different, to be fair, like UiPath can do this. It's just that Zapier for this room and people that are not very technical, I'd say Zapier is probably the easiest to use that I know of. Most people will have been able to follow what I was doing here. I was literally just clicking a few buttons and it was done within 15 minutes, 20 minutes. So that's the main thing why I like Zapier, but UiPath will be a little bit more powerful. There's also make.com for anyone that knows them. They're also very good. Yeah, so no particular preference. It's just that Zapier is easier.

Yep? Have you tested it with integrating multiple AI apps in the same kind of automation? So like, for example, using Jasper correctly, using for the onboarding, Yeah, they work very well together. Zapier has 5,000 different integrations. I just used email and ChatGPT in this one. You can use a Zapier bot that goes to Google Sheets. You can have it populate your CRM. You can have it use Anthropics API versus OpenAI's API, which I used here. Yeah, 5,000 apps or so.

On that note, I'm going to leave the floor to Catherine. So if you have any more questions, come and talk to me after that talk. Thank you very much. Thank you.

Finished reading?