what is going on guys it's jonno and today what we're going to be doing is talking about text parsers in make. com what they are and why you need to be using them pretty much ASAP let's dive in so in front of me I have make. com right and we're going to use particularly one module here which if you open up a scenari make.
com it's called a text parser right and there's all of these different actions and triggers that you can have right and we're going to be going through every single one of these but just to give you some context there's typically two reasons why somebody would use a text parser in make. com it's either you want to gather information from let's say web scraping uh a website right such as like first name last name or contact information emails phone numbers all of that kind of stuff right so it could be lead generation but there's a lot of other use cases for web scraping and then the second thing is that I use it for all the time is scraping emails that come into my inbox so case in point let's say you have a lead that comes in right let's say you let's back up here a bit you buy a lead right and you buy it on a website like the KN for example so what's going to happen is you're either on a subscription pan or plan or a paper lead model and they send you this lead right and they have all this information like the date of the event the email the client the phone number the venue and they also have all the information like the date of their wedding all that kind of stuff right the problem is is that they don't give you this information in a straightforward manner right so they they don't just give you an API endpoint you can just plug it into your CRM and send that person an email or a call or a text or whatever right you actually have to remove that information from that email automatically using a text parser and then insert that into your CRM so you can send you know a text message or an email and this is absolutely gamechanging because this will allow you to scrape incoming leads get all the information you need and then automatically do whatever you want with that without having to manually do this I can't tell you personally how much time this saves me but I I know for a fact that it's just every single day an automation like this in Tex parser is a big game changer for my life because every single time this runs which is probably 10 or 15 times a day that means that there's 10 or 15 tasks less that me or my team has to do so if you get this right it's going to help hopefully save a lot of your time as well so let's dive into how this works and we're actually going to be going through every single one of the these functions just so you guys can kind of take a look and see how these work so the first thing we're going to want to do because these are all actually and I spoke earlier there's no triggers here they're all actions so what we're going to do is we're going to back out of this and we're going to go to Gmail and we're going to sync up our Gmail by watching for emails so we just need to connect in the right account here so just bear with me as I search for the right account and what we're going to do is we're just going to pull in this particular email for now like if I was getting getting leads off the knot what I would be doing is I would have a Gmail filter set up and a query which would be like you know is waiting to hear from you I wouldn't include their first and last name because obviously this is going to be unique to one person and you want this to work for everyone so of course if you're seriously using this I would remove that but just for this purpose we're going to be using this because I only want to pull on this particular client here just so we can use this as an example okay um and we need to select the folder which in most cases it's just going to be the General inbox here and we can select the first uh email that comes through just to make sure we capture the exact email that we want to work off of okay sweet so we have that and now we're good to go we're going to load in a text parser okay so we're actually going to be going through every single one of these individually we're just not going to go through it in an exact order from top to bottom what we're going to start doing is using the highest leverage um actions here and then working our way down because there's a lot of things in here that you'll probably never use just like myself and there's no point in covering those first so we're going to start with match um elements here so this is going to be one of the first ones that you can use right away that's going to be super super helpful so we're going to select a pattern and there's a lot of different things that we can select here I'm just going to go through a couple for the sake of this tutorial but um the main ones that you're probably going to want to use here are emails and phone numbers as well right so you could do like HTML tags like um a tags which are link tags or P tags which are paragraph or or body paragraph Pages or H1 tags which titles but um for the most part it's it's it's not as common to use those um you can if you're wi scripting a page but not super common I've never used the HTTP address FTP address or the ipv4 six emojis or pair of key values just because they're pretty rare right the main ones I use here are email and phone numers so what we're going to do is we're going to go ahead and we're going to enter an email here and we're going to enter the text as well right and we want to just put the text here so let's just see the text content here and we can also clone this and we'll add this back on and we're going to do the same thing but instead we're going to grab the phone number here instead okay perfect and we'll go ahead and what we're going to do is we're going to select the first email so select the first email and we'll run this and see if it grabs the email and the phone number the only issue with matching these elements here is that there might be multiple different phone numbers and there might be multiple different emails that we're grabbing in this case that's not the case we grabbed one email from here and then we also grabbed let's see if we got it we grabbed three phone numbers from here right so um this isn't always the most effective way about going about things because now we don't know exactly which email to grab but if we go back to the if we go back to the particular email address this is the phone number down here that we want to grab right so there's another way we can go about doing this so that we don't grab all of these different phone numbers here and I don't even know if these second ones are phone numbers or if they just kind of match the the pattern for it to detect to to scrape this information so we're going to go ahead and we're going to delete this module and instead what we're going to do is we're going to use a different text parser here and if we load this in we're going to go into um matching pattern now these are pretty much the same thing I would I've never actually used match pattern because match pattern Advanced is just significantly better they're pretty much the same thing it's just differences in how they recognize patterns I think but yeah once again I only use Advanced and what this does is it uses something called regular expressions in JavaScript so what regular expressions are is you program the you program it a way to find patterns in a text now I say program Loosely here because conventionally it's for programmers but you can just use chat PT to create the patterns that you're looking for so for example what we can do is we need to create a pattern to find this phone number right so we can load up chat GPT here and this is going to be our best friend when it comes to creating Rex so we're going to come back into this and we're going to feed in the correct text okay so we're going to add in the text content here and we need to create this pattern I'm just going to put a for now so it just lets me save this click okay and we're going to load in the text pattern here right so text content here we go we're going to copy all of this text in and we're going to come back into chat GPT we're going to say please generate me a Rex formula to um to find the phone number in this text and we're going to paste the text down below and we just need to give it something uh else to work for right something else to work with so in this text it's always going to be in the same position the phone number so what we know for certain is that before the number there is the this text here phone number and then after it there's the venue right so we can say um please grab the phone oops phone number between these two lines of text and then this phone number will always alternate okay perfect here's the email text and then we can press enter and it should extra it should give us an exact Rex formula now this is pretty complicated stuff right so um obviously it would take a long time to be able to figure that out without using chat GPT it doesn't work every single time so we just need to make sure that we test it and if it fails then we test it again until we get it right so I'm going to go ahead and copy and paste that in here and let's give this a run oops we need to select the right email first select the first email here and then we're going to just copy that okay and we will run okay sweet so this actually didn't end up working so what we need to do is we need to go back and reformulate this so that it actually does end up working okay so what we'll do is say um this didn't work is there another Rex formula to grab this sometimes this easy as just asking it to try a different way and let's see if this works okay I'm just going to refresh the page cuz cuz you can see it's kind of glitching out there and it's not letting me grab my mouse okay cool let's try this again okay paste it in here click okay we're going to grab the first email again unfortunately this is a bit repetitive but once again the cool thing is is once you set it up one time you never have to set it up again so we'll run out one more time ignore These Warnings it doesn't like having a text parser at the end the chain here okay so that also didn't work so what we can do here is we can take another approach and what that approach is going to be is we're actually going to use the HTML this time so we're going to come into the HTML content here and we're going to grab this and just drag it all the way down and we're going to come back in here and say this approach didn't work let's try this again but this time with HTML and the reason why it's breaking is because because the text content has a space here which is not being recognized in HTML so that's why it's breaking because it's anticipating with the code that this is a line break but it's not actually registering as a line break in HTML so we're going to go ahead and change this HTML and it should work this time I want to extract this phone number off the page the phone number will change every time but the location will stay the same here's the HTML code and then we're just going to go ahead and copy this person's number here and paste it in to chat gbt um I want to extract this phone number on the page okay let's try this out okay so we're going to come back in here and we're going to paste the next pattern in here and instead of having the content there we just want to paste in the HTML and we're going to try this again okay and then we're going to choose where to start select the first email and we'll give it another shot okay sweet so we ended up getting the phone number looks good to me okay so there actually happens to be just an easier way to extract the phone number and instead of going to chat GPT and using the M uh the advanced text parser we can literally just load chat GPT straight up in make. com and we can create a completion here this is going a bit out of outside of the scope of text forses but I think it's important to include just because this is another alternative of what kind of Technology you can use to extract information as well we're going to use a model GPT 4-o and the message is going to be we're just going to actually include uh Max tokens here 200 which is the amount of tokens that you can use on this completion here um if you reach the end of the tokens it will cut cut off the response here so just make sure you put an appropriate amount and we're going to use system as the role on the message is going to be please extract this phone uh please extract the phone number from this text um from this text uh please do not include any additional information just the phone number because a lot of the times chat GPT will be like sure no problem here's the phone number and by the way I know you didn't ask for all this other information but I'm going to tell you anyways um so just to make sure that doesn't happen I always include that in there and then I'll just say here's the text and then we can go ahead and paste it in text content Great Click okay and we're going to choose to start on the same email and let's give this a shot it should work uh with a huge asteris and or fingers crossed as well okay let's see okay cool and there we go the result is the phone number out as well so that is two different ways that you could use um you that you could parse information from an email from a website all of that kind of stuff okay great so so far we've gone through matching elements we've matched patterns and we've also um so those are what we've done so far we're going to cover replace because this is also pretty uh pretty cool too right so what replace does is effectively you can replace information in text so say for example I want to replace their phone number with a different phone number or I want to replace a particular word on the page with something else you can just go ahead and run this action and replace that particular word in the text and then spit out the rest of the text to use so that's pretty powerful stuff right so let's go ahead and let's try that out we can go ahead and replace text here and um what we're going to do is we are going to Let's actually just take a look at this and see what we want to replace here so um let's say we just want to find [Music] um hey there and we're going to replace that right so we're going to come back here and we're going to say hey there and we're going to just say greetings I don't know just because that sounds super cheesy um sweet Okay cool so the text is going to be here and we want to insert the text content and we're going to go back to chat GPT and we're going to create another expression here just to pull it out so what we can do is copy this in we're going to go back to chat GPT and we're going to just mention please uh give me a RX pattern to find the words um hey there from this text okay sweet and it should okay that doesn't seem like it's Rex please make sure this is a Rex formula okay and is going to go ahead and just give us the Rex formula Okay cool so very simple we're just finding the text based on that and we're putting the pattern in here and it should change it so let's just go ahead and we're going to unlink this and unlink this one and just remove these from the workflow just so we can test it a bit faster here and we're going to choose where to start and we're going to select from the first email here cool click it okay run and let's take a look here let see okay so the output bundle and I actually made a mistake there we just need to come in here and we need to remove the bees and we can literally just put the text straight as it is hey there and then once we run it again um it will remove the hey there and it'll replace it with greetings right so that's pretty cool now the only other thing to keep in mind here is that we could just set a variable or create another variable in any different operation and we could also just use the replace text here right and we could replace this text let's just go ahead and put the text content in here and we can say hey there with greetings right and we'll title this test run this one last time click okay once it loads up the text value and run once right so same kind of deal here with the test it'll take readings as well so there's a lot of different ways in make.
com to do the exact same way there's not only one path to get to a predefined outcome right so there's most case is going to be multiple ways and this is an example of that where you can do a replace function inline function you can do a replace text parser as well okay sweet so now we've gone through the um replace here we've gone through the match patterns match elements and we could also do HTML to text as well so let's go ahead and try this out so we can just actually change particular HTML from HTML and strip out the text from that or the HTML tags from there so if we just paste the HTML here it's going to strip that out right but alternative alternatively what we could also do here once again there's always two ways to do it you could just come in here and we could do um strip HTML and we can just put in the HTML content here and these should technically give us the exact results as well so let's go ahead and choose where to start on select from the first email click okay run and there we go this has now removed the HTML and this is also remove the HTML as well so you can see that the outcomes look slightly different here um but um with this if we just open this back up again so I'm not sure if this is cutting off or not here but yeah here's all of the information like the phone number and the email and the date and all of that kind of stuff right so that's just stuff to keep in mind when it comes to text parsers and there is um one last thing here get content from HTML table I've actually never used this before so I will be skipping over that today I'm sorry if that's something that you guys wanted to use but I've just never used that and I I don't see too much value in in it from the multiple years that I've used been using make.