Members-only tutorial
Watch the video and get the practice sheet with membership.
About this Tutorial
Sheet Resources
Video Transcript
<div>00:00 We're going to create some CRM automations. We have a list of leads here and it's a very basic list with names, lead sources, status, we have a sales rep, we have the contact date, deal size, last follow-up, some notes Learn how to effectively use notes in your CRM for better tracking. Opens in new tab , but we want to make it really cool.<br>00:18 So let's first do a few things.
One, we're going to enter days since the customer entered the pipeline, we're going to identify some high-value deals, we're going to calculate the next follow-up date automatically so we don't have to fill that out by hand, and we're going to track overdue follow-ups Discover how to automate follow-up dates in your CRM. Opens in new tab ,<br>00:38 which means we can find out what have we left behind, and once things become lost, we may not want to keep them in our leads list, so we'll archive those with Apps Script Explore how Apps Script can enhance your CRM automations. Opens in new tab .<br>00:48 At the very end, watch out for that, that's going to be an awesome automation, we're going to learn Apps Script Explore how Apps Script can enhance your CRM automations. Opens in new tab along the way.<br>00:53 Let's first create a dropdown Understand data validation rules for dropdowns in Google Sheets. Opens in new tab selector for our source, first, let's select all Find out how to select all data in your Google Sheets. Opens in new tab of our sources that we've handwritten here, right-click, scroll down to dropdown Understand data validation rules for dropdowns in Google Sheets. Opens in new tab , and automatically our, on the right side, the data validation Create dropdown selectors to streamline data entry in your CRM. Opens in new tab rules will be filled in with these options.<br>01:11 Now, we're going to go ahead and create a dropdown Understand data validation rules for dropdowns in Google Sheets. Opens in new tab , and we're going to go ahead and our sources, right-click, scroll down to dropdown, and automatically our, on side, the Again, with lead status, we'll do the same.<br>01:39 We'll select all of the lead statuses, right-click, and scroll down to dropdown, and again, automatically Google Sheets does this for us.<br>01:46 We have all of the options here that we have already listed.
If we want to add another one, let's say needs follow-up, we just need to add it down here at the bottom.<br>02:00 So maybe that's right. Red there, qualified, green, good to go. New lead, maybe we'll leave that as gray. Contacted, maybe we'll leave that as gray.<br>02:07 Cold, closed one, maybe dark green. And closed loss, we'll actually get rid of this eventually. Let's click done. And now this makes it super easy to select Learn about the query select clause for advanced data manipulation. Opens in new tab this and move it through the pipeline.<br>02:22 Let's say we have here. So we've made some drop-down selectors.
Next, let's create days since the customer entered the pipeline.<br>02:35 So I have it here in the K column. I'll delete it to show you how we do this. So the contact date is this E column.<br>02:43 So days in pipeline is going to be date, diff. And our start date Understand how to set a start date for your CRM calculations. Opens in new tab is going to be the K contact date, and comma, we'll use a function Get familiar with functions to automate calculations in Google Sheets. Opens in new tab called today with parentheses.<br>02:54 And that today will always be changing every single day. So we will find out what is the difference between these two days.<br>03:02 And the unit in quotes, or double quotes, is D. This is days.
If you want months or years, you can use M or Y there.<br>03:13 Suggest autofill Use autofill to quickly populate data in your CRM. Opens in new tab this, yes. And now we have days since this contact. Let's identify some high-value deals next. High-value deals are going to be here in deal size.<br>03:30 Let's highlight everything that's above $10,000, or $10,000 or above. So we're going to select Learn about the query select clause for advanced data manipulation. Opens in new tab that. Select Learn about the query select clause for advanced data manipulation. Opens in new tab this F column format Explore formatting options to highlight important data in your CRM. Opens in new tab , conditional formatting Learn how to use conditional formatting to track overdue follow-ups. Opens in new tab .<br>03:41 Now we can simply format Explore formatting options to highlight important data in your CRM. Opens in new tab cells Understand how to manipulate cells for better data organization. Opens in new tab rules if and greater than, ah, let's say 999.
We could also do greater than or equal to and put 10,000 here, because that's a nice pretty brown number Learn how to format numbers for clarity in your CRM. Opens in new tab .<br>03:57 We want these to be hot green, maybe, and maybe even a different tan. X color, hot. Done. Those are our high value deals there.<br>04:05 Next we want to calculate follow-up dates. This is really important if we are using this contact date and a last follow-up.<br>04:16 We're going to manually fill in here when we are following up with them. When's the last time?
But we want to know when's the next time we should follow up.<br>04:23 Now this is tricky, because we're going do equals this date plus seven, let's say, and have it at that, and maybe we put around here if is blank G2, and now only if there's an actual thing there, we can even delete these hyphens there, and we're have a next follow-up date.<br>04:50 But what if the last follow-up was on a weekend, and we don't necessarily want to schedule the next follow-up on a weekend as well?<br>04:58 And we have a very specific number Learn how to format numbers for clarity in your CRM. Opens in new tab of work days that we want to differentiate them.
So we're going to use equal work day, And this function Get familiar with functions to automate calculations in Google Sheets. Opens in new tab allows us to create a, use a start date Understand how to set a start date for your CRM calculations. Opens in new tab , and then select Learn about the query select clause for advanced data manipulation. Opens in new tab a number Learn how to format numbers for clarity in your CRM. Opens in new tab of days after.<br>05:15 So if you want one week, like one full week, we'll do five, because it'll skip the weekend. But maybe we want something like ten work days, business days.<br>05:26 We'll change that. We have some interesting numbers here because it's blank, so we'll wrap Discover how to wrap text for better readability in your sheets. Opens in new tab this again with if is blank.<br>05:37 Thank G2, two commas and end parenthesis. There you go. Now the blank ones go away.
But now, this February 17th is not going to be next follow-up until March 3rd, two weeks later, because it's ten working days later.<br>05:58 Very cool. And again, if you just want one week, but want to use this workday, just do five. And that'll be exactly one week later.<br>06:06 Again, business days, work days. So let's track overdue follow-ups Discover how to automate follow-up dates in your CRM. Opens in new tab .
What if we had put in the last follow-up was two weeks ago, and this February 11th doesn't really, pop out.<br>06:26 We have to look at every single follow-up date here and see which ones are past, but let's make it really pop out.<br>06:32 So we're going to select Learn about the query select clause for advanced data manipulation. Opens in new tab our H column format Explore formatting options to highlight important data in your CRM. Opens in new tab , conditional formatting Learn how to use conditional formatting to track overdue follow-ups. Opens in new tab . We can use date is before today. Click done, scroll over and see that it is highlighted.<br>06:48 We can change that color. Maybe we want it to be deep red with some white text perhaps.
Click done and again we can see that that is the overdue one.<br>07:00 So that's pretty cool to automate that right away. It sticks out instead of having to read each and every one of these calendar dates.<br>07:08 So now, once we select Learn about the query select clause for advanced data manipulation. Opens in new tab , let's say, a lead status goes to lead status. Let's look at these completely. We don't want to keep this in our leads list.<br>07:21 We want to keep this leads list pretty lean to only the ones we're working on. Even one we might want to put somewhere else.<br>07:29 But the closed loss we'll work on right now and you can always do this again with closed one.
Let's create a new sheet called lost.<br>07:37 And we're going to copy the entire header Understand the importance of headers in organizing your data. Opens in new tab range Learn how to define ranges for data manipulation in Google Sheets. Opens in new tab and put that there. We can even delete all of the rows if we want, leaving just one row perhaps.<br>07:49 We're going to go up to extensions app script Explore how Apps Script can enhance your CRM automations. Opens in new tab . We're going to use a built-in function Get familiar with functions to automate calculations in Google Sheets. Opens in new tab . This built-in function Get familiar with functions to automate calculations in Google Sheets. Opens in new tab is going to be called onEdit.<br>08:05 We're going to use e as an event here.
This e variable means whenever an action happens that is an edit, meaning the user is editing something in the sheet, we're going to gather some interesting information.<br>08:17 We can gather the row we're on by doing variable row equals e. range Learn how to define ranges for data manipulation in Google Sheets. Opens in new tab .getRow. e. range Learn how to define ranges for data manipulation in Google Sheets. Opens in new tab .getColumn, with a capital C. We can find out what sheet we're on.<br>08:34 Equals SpreadsheetApp Explore the SpreadsheetApp for advanced Google Sheets functionalities. Opens in new tab .getActiveSheet.getName.
and see our list that we're looking at is leads.<br>08:53 So, we're going to start creating an if statement, basically saying, if all of these things are true, if sheetName is equal to leads, then do something.<br>09:04 But we want to also make sure and row is greater than 1, and with two ampersands, column. Is equal to whichever column we're on the lead list, so C or 3 column.<br>09:20 We'll use 3 here. We also want to make sure we get the actual value of what we're editing. So, value equals E.value.<br>09:32 And we want to make sure that this and value is equal. Is equal to closed, lost.
Let's make sure that is, oh, there's no hyphen there.<br>09:48 So, let's make sure that's exactly correct. So, once we edit in column 3, we're editing a row that's underneath the header Understand the importance of headers in organizing your data. Opens in new tab .<br>09:58 We're on the leads list, and our value is closed, lost. We're going to do the something here. First thing we're going to do is copy the row we're on.<br>10:08 So, let's get variable ss equals spreadsheet Get to know the basics of working with spreadsheets. Opens in new tab app dot get active spreadsheet Learn how to access the active spreadsheet in your scripts. Opens in new tab .
So, we're going to say ss. getRange Understand how to use getRange to manipulate data in your sheets. Opens in new tab , getSheetByName, getRange Understand how to use getRange to manipulate data in your sheets. Opens in new tab , we'll start at row we're on, column one, and we'll go for the maximum rows, however many rows there are here.<br>10:39 So, let's get that as well. Let's call this leads actually, getSheetByName, leads and we can click on this, just leads, and getVariableMaxColumns equals leads.getMaxAmountColumns. So, here Here we need to, say we want one row and max columns. Going to the first column, taking one row, and however many<br>11:19 columns there are in the sheet, and we're copying to We need a range Learn how to define ranges for data manipulation in Google Sheets. Opens in new tab here.
Variable lostRange equals Let's get the variable lost This is lost Lost from a sheet, lost. getRange Understand how to use getRange to manipulate data in your sheets. Opens in new tab And we're going to probably want to do one thing. We probably want to insert a row. So let's do that. before two, To column one<br>12:03 , we're getting the maximum at one row and getting max columns because we'll have the same number Learn how to format numbers for clarity in your CRM. Opens in new tab of columns on both sheets.<br>12:13 And we're going to copy to Discover how to copy data between sheets efficiently. Opens in new tab lostRange. So let's see if this works. If we get an error Learn how to troubleshoot common Google Sheets errors. Opens in new tab with this, we'll figure it out as we go.<br>12:21 Let's go to our leads. Let's change this new lead to closedLost.
It's William Taylor, and William Taylor is here.<br>12:33 So that is working. We're copying over the closedLost. Now, we need to delete William Taylor from here. So let's make sure we do that.<br>12:43 And again, we're only doing it if this value is closedLost. So let's go to leads. leads. getRange Understand how to use getRange to manipulate data in your sheets. Opens in new tab , and we're going to the row we're on, starting at column one.<br>12:57 Actually, we don't even need to do that. We need to delete row Find out how to delete rows in your Google Sheets effectively. Opens in new tab . And the row we're deleting is the row we're on.<br>13:11 And save. Let's double check that this is going to work. Thank you.
So I'm going to change this back to contacted.<br>13:17 And William Taylor, we are going to say, is closed lost. And it's deleted from here. It's disappeared. And we have a second one here, right?<br>13:31 So let's do another one. Let's go from qualified meal walker to closed lost. It's disappeared from here and it's on our lost right at the top.<br>13:43 Very cool. So we did that with just this amount of code. We've automated our CRM and archived lost leads. And again, you can do that with any other status.<br>13:59 You can move basically just changing this value here.
And then changing where Understand the query where clause for filtering data. Opens in new tab it's going, which sheet it's going to, maybe it's going to a 1WON and it's closed 1WON. Hope you enjoyed this. Hope you enjoyed automating your CRM. I hope to see you again soon.</div>