to build here. Okay, so let's begin by talking about what you need to actually accomplish this. As I mentioned, this is no beginner automation, but the tools involved are quite simple and very similar to many of the tutorials we already did on this channel. First of all, we'll be using a GPT inside of Chat GPT running on their newest model, GPT5. Those are only accessible on the premium plan, which starts at $20 a month. Then you will need a make account, and a free account will totally suffice for this. If you like the automation, want to keep using it, you can upgrade to build out more on your account. But for the sake of this tutorial, you only need to sign up for the free account. And then lastly, to store our data here, we'll be using notion as it's a free software that allows to get going here without paying for something like Air Table. And in my experience, if you're automating, it does work better than something like Google Sheets. In terms of setup of all these free, it's quite simple. Chat GBD, let's be real, if you're watching this channel, you probably have an account already. With Make, you can use the first link in the description to get started for free, which in my experience, it's usually the easiest to just loging in with your Google account. And with Notion, it's the same deal. You can just sign up for free, but in the video, we'll be setting up a connection. So, what I want you to do now in preparation is copy over this journal GPT template that we prepared for you into your own Notion account. You simply go to the link in the description. It is completely free. It's just a database template. and you simply go on here and click duplicate which will allow you to add it to your workspace like so. By clicking this I have added this to my private workspace and those are all our prerequisites. So with that being said we're ready to look at how to build this automation. But I want to do one thing before we do that and that's because we're exploring some new and more advanced concepts than what we've done previously on this channel. And for that I want to take some time to actually talk about them. So look, if you're already familiar with what web hooks are and how they function and what JSONs are, feel free to skip this section. We put timestamps down below so you can get to the practical implementation part. But in case you could use a refresher, which for my experience, most people working with these things, unless you're a seasoned programmer, a refresher like this can be really useful or you're not familiar at all. Well, let me clear my iPad here and explain these two absolutely essential concepts in automation and development that if you're going to be building automations like this, you just need to know. and I promise I'll keep it as concise as I can. Okay, so first up, web hooks. What is a web hook? Well, you can essentially think of the concept of a web hook as a tool that enables communication between two applications. So, I'm going to employ my advanced drawing skills here. If so, if we have app number one over here and app number two over here, right, that's actually not so bad. If app number one fires a web hook, okay, that's my illustration of a signal. Well, that web hook is going to have a unique ID. It's very similar to API key, which it's going to be looking for. So let's say in this case the web hook is named peanut one. I don't know why peanut one. I just came up with that. So if app one is firing and saying hey I'm firing a web hook with the name peanut one and app number two is actively looking for peanut one and then it hits the exact web hook and it sees that web hook says peanut one then it allows for these two to connect and exchange data. I think that's a pretty good way of explaining it actually. So practically the web hook is not going to be called peanut one but it's going to be something like cg7y i ks3 etc. And the make is going to be scanning for this exact web hook and we're going to set up our GPT to be sending that exact web hook whenever the user decides that he finished his journal entry for the day. So in our illustration this is make this the journaling GPT and we will be sending this package over. I'll make it look like a document. Let's see how I do. And this document is going to be a JSON. And if you're not familiar with JSONs, that's completely fine. You can just think of it as PDFs are made for humans and JSONs are made for computers. It's just a different format that makes it really easily readable for programs. So nothing gets lost as we send it through the web hook. And this JSON will have a very specific format. For this, I will open a new page and we'll be setting this exact format that we'll be sending over up in the very first step in our automation. And what the so-called data structure within the JSON will contain is the following items. an action, a note, and then just so you know, within the note, we'll have sub items. This is the stuff we're going to store in our database, which is going to make this journal real nice and convenient. We'll be storing another date, a title, the actual content of your journal entry, the mood of the day, tags, and one more called note ID, and then two dates, from date and to date. So to sum up, we're going to be sending this JSON with all the details of your journal entry, including the mood, dates, the actual journal entry, and more via web hook to our automation, which will make sure everything is safely placed within our database. So that's the theory. Now, let's get into the step by step of actually setting
this up. Okay, so our setup is going to begin inside of chat GPT. We're going to be setting up this GPT. Then we'll move into make to get the database and all the connections, right? And finally, we'll finish the GPT. So, what I need you to do is inside of the chatb account, go over to GPTs. On the top right, say create and then you can pull up this page from the description of this video called journal GPT setup. And we just prefilled some of the fields here that you'll be copying over. So, for the name, you can call this journal GPT. Here's a quick description of what it does. For the instructions, we carefully crafted this over many iterations. Feel free to customize it, but this is what we came up with. Simply copy paste this into the instructions here. And as we're right here, I need you to customize one thing right now. This is important, otherwise it won't work. Here under time zone, just replace this user time zone. So in my case, I'm going to say Lisbon/ Europe. We can just do this format of city/continent and it's going to work every time. And then for conversation starter, a simple let's begin will do. We have no knowledge files and as a recommended model from our testing already we found that GPT5 actually works best here and that is for the reason of its instruction following being the best amongst all open AAI models meaning that these detailed instructions they include a lot of nuance and details and GP5 simply follows these the best and that's why it's the best choice here. We want this to work reliably for capabilities. We'll turn everything on including the code interpreter and data analysis. And then that concludes our initial setup. after we're done with the make part. We will come back here to create the new action. But to do this, we need the web hook details that we'll be creating within the make automation. And that's why we're going to leave this right here. Maybe one more thing. I'm just going to generate the image with deli. And with that being said, we're ready to move on into the make part, which will be a bit more technical, but this tutorial will document every click, so you have a chance of recreating this from scratch yourself. Okay. Okay, now inside of make we will start with a web hook as that is what will be triggering our automation here which is essentially going to be the middle part between the GPT and our database and our journey starts within our account under scenarios here I will create a brand new scenario and then as we explained what we're actually going to be doing here in the illustrations with the iPad in the last segment we can move through this a bit quicker first we'll be adding the web hook and here you want a custom web hook so we can create a brand new one by clicking add and I'm going to say my journal tutorial web hook. I'm going to add an API key here just to make this thing secure. I'm going to also add that. Change the name to my tutorial API key. And here you can really make this as simple or as complicated as you want to. For this tutorial, I will simply say tutorial 1 2 3 4 5. Create this. And now that's a password to my web hook. Let's make sure that not everybody on the internet can just start using this. When I click show advanced settings, it will allow me to add a data structure here. And as I mentioned, we're going to be sending a very specific type of data structure across here because we don't just want to capture the message. We want to capture a whole bunch of information from our journal to actually store that in our database. Again, if any of this confuses you, make sure to check out the explanation section where you also got to enjoy my drawing skills. So, for data structure, we'll also be adding a brand new data structure. And I'll just say my tutorial data structure. And here I will be adding a specification. And this is where we'll be adding all the objects we discussed. This is the type of thing that you don't really need to understand in depth right now. You can kind of just follow along this tutorial and do exactly what I do. And then by using this, you will kind of understand how it goes from GPT to database through what we do right here. But what I'm going to do is I'm going to set up the fields we discussed earlier. So the first one is an action. The type is text here. And I want to make this one required actually, which means it's always expecting it. What I like to do is I always like to close these down after I finish them. It just maintains my overview. I'm going to add another one. The next one is note type is collection. This one is also required. And then within the note I'm actually going to have multiple sub items. So in this specification I'm going to say add item. Just say date. This type I'm changing to date also required. Collapse this. We want the title which is text also required. Then we want content mood, which is a text, and this one is actually not required, meaning it's optional. Tags, and just make sure to switch tags to an array right here. This will allow us to create a tagging system within our notion database, which is kind of a neat feature because then you're going to be able to return to some of your journal entries later down the line really easily. Not required. Okay, so we added tags and then we're also going to add one called node ID. Keep it as text. It's not required. And we can move on to the next one. And actually I want to change one thing which is the note is actually not required here. It only needs the action to work. I mean this is not going to make a practical difference but just bear with me as we set this up step by step and then you can use it and tweak it to your liking. So I can close out the note and then we need two last fields to round this out. One of is going to be from underscore date. I'm going to change the type to date and then to underscore date. The type is also date and also not required. Okay. So we're done here. I'm going to save this data structure. And I know that might have been a lot, but honestly, you don't need a deep understanding of this. Just follow along and it's going to make this app work. And then you can do your thing later on. So, as you can see, this is already looking for the web hook right here. Right now, we're not sending any. So, we can just move on to the next step, which in our case is going to be our router. So, under flow control, there's these routers, which allow you to set up different scenarios in the automation. In total, we want four of these. So, I'm just going to click plus twice, but a lot of it is going to be identical. So let's just starting out by building one which is our notion step and we will set up this notion step in just a second here. But before we do that we have to define when this automation should go down this particular path as we'll have four of these in the end. Where you do that is you click this wrench right here. You say set up a filter and right here you can pick when it will go down this first path. So I want it to go down this first path when the action from the web hook equals to create note. This is what we set up inside of the GBT to send through the web hook. So whenever it wants to create a new note, it will send exactly this create note. You can review that within the GPT prompt. And then I can also label it. And now this very first path will happen if we want to create a new note. Okay, now we're ready to start building out this path with the notion step. Now to do that, if you've never worked with notion make before, we have to do a setup one time. This takes a few steps. So if you have a connection like me here, you could pick that. But I'm going to go through this with you step by step just to make sure that everybody can do this while following the tutorial. So you're going to say add and then here notion internal. I'm just going to call this the notion internal tutorial connection. And then it wants this internal integration token right here. And the way to get that is if I go over to my notion and I'm on my database here, the journal GPT that we copied over in the beginning. You can click the three dots, go here into connections and say manage connections. And then all the way at the bottom you want to go to develop or manage integrations. This will open up a new browser tab in which you can just click new integration. You name it. So we're going to say journal GPT tutorial connection to make this super clear. This is the notion workspace I'm in. It's an internal connection. And that is it. I just say save right here. And when I click configure integration settings, this is set up. And we see our internal integration secret right here. I'm just going to show it and copy it over here and paste it. Right now, when I save this, there's one last step we need to do to actually make this work. And this couldn't be any simpler. Back inside of the notion database, you click the three dots again. And now, if you go under connections, if I look for tutorial, you're going to see the journal GPT tutorial connection. If I select this and confirm, we're all done. Our database is hooked up to the automation, which will allow us to put anything we want inside of the database from here on out. And if you ever use make again, you don't have to go through this process again. and it's set up and you can just pick your connection from this list and it's right there. So that's the connection. Now we just have to tell make which database we want to edit things in. Select from the list is fine. And for database ID, it's actually really simple. You just have to look for the name. So journal GPT, we don't have to spell out the full thing and click okay and it should find it automatically. That's it right there. Okay. Okay, so you can already see some of the tags that are in the database pop up here, but we won't actually be needing those because now it's time to hook up the data we got from the GPT and put it in the right place in the database. So, we're going to start up top here with the title inside of the note. That's this title right here. For tags, we actually want to map. So, you flip this little switch and then you select tags. For content, we pick content. For mood, we want to flip map again and we pick the mood. And for the start time, we have to do a little trick here. And I have to admit while we built this automation we actually use chat GBT to exactly give us the right thing to write here. But essentially you have to look for parse date which will allow you to reformat the date into a format that notion will accept seamlessly. These are intermediate to advanced operations which you can do with all of your data to essentially transform it from one format into another. In this case we're going to be transforming it from the format that GPD gives us into a format that notion wants. So we're going to be parsing this data. We're going to be filling in two things in the brackets here. So, first up, right here, we want the dates that we passed from the notes here. And then in the second part, you can just put in X, and this will work. Just trust me on this. Then, in the end, we say include time. Yes. And voila, that is the notion step. Now, I know this is becoming a lot of step-by-step following, but hey, that's how it is when you get into things that go beyond the basics. Just super quick anecdote, and we'll get back to it. I remember back in the day when I was learning Photoshop and I went through some of these tutorials where for 5 minutes straight it was just well you set this slider to 74 and this slider to 14. 5 and then the gsh and blur settings should be these five exact settings and you kind of just followed it hit enter but then the damn thing worked and it felt like magic and it gave you that motivation to actually go ahead and learn about these steps and I hope this tutorial does the same. So if you feel a bit confused, don't worry. It's completely normal when you're pushing beyond the boundaries of your knowledge. And hopefully I'm doing good enough of a job of explaining this so you can follow along well and then the whole thing works and then you can learn exactly about parsing dates later on if you feel like it. So for the next step, we need to create a JSON object right here, which we can do by clicking plus JSON and then create JSON. We'll be doing this with the Eigore diary node data structure. So it's important to select that. And here we're going to be pre-selecting the corresponding fields. And most of them are going to come from these properties values down here. So for the date, we want properties, values, and then date. And then I want you to select the start. And then on the title, we want to open it up and use the plain text title. That's just the title without any formatting. That's what we want here. For content, we again want to go into content, plain text. Beautiful. For mood, we take the name of the mood. And for tags, we'll be adding an item. And then in here you actually want to use the map function to make this work properly. And in the first part of this mapping function you want the whole list of tags. This is a programming specific thing but if you have these two brackets in the end you know it's a list so it can contain multiple tags. And then the second half we want the name of the tag. So just select the name right here. And then finally for the note ID we want to go all the way to the top and use the database item ID. And this will allow us to identify which item in the database it exactly is as we pass this JSON around. Okay. So that rounds out this step. You don't have to understand all of that. All I need you to know is that this is sort of the package that helps us communicate between the GPT and the database. Okay. And as we have the complete JSON that contains all the data we need, we can add one final step here, which is a web hook. And you're just going to paste in this custom code here where the response type is single note. And then the single note is the JSON that we created in this string. So I'm going to go in here and just link that like so. Say save. And that is really the first branch complete. So to recap, if ever the GPT is going to be sending out a web hook via its actions, this automation will catch it, decide what type of web hook that was, and if that web hook is saying we should create a note, then it will go into our database, create a new database item, reformat the data it got into a beautiful JSON, and then fire another web hook, which the GPT can then again catch to continue working. Now, we need a few different routes because not in every case are we creating a brand new node, right? As I told you, we also want the GPT to be able to pick up the last nodes from the database. So, it's not just writing but also reading. And for that, we have some other routes here. So, in the second route, what we want to happen is the action to exactly match update note because the GPT also has the ability to change the database entries. I'll also name it that so it's nicely visible on here. And then we want another notion action this time because this is about updating. We're going to be updating the database item. All we need is a quick search. And if I look for journal and if I just type in the first letters of the database name again we link it up here for the ID we're going to be using the note ID right here. For the title we got the title tags we're mapping and giving it the tags. Content is content. Mood again we're mapping giving it the mood. And for the date we'll have to do the same little trick as before where we're parsing the date to make it the right format. First part is date. Second part is yet again x just like before. And then finally we need to set include time to yes for this to work reliably. Say save. Then we need to create another JSON. So JSON create JSON. And then here I can already choose the data structure which is going to be Eigor's diary node. And here we'll be using data from the latest step the notion action that updates. So for the date we want to use the date start. For the title in plain text. For the content mood we want the name of the mood. And we'll be mapping the tags. And you need to use this mapping function here for this to work. And all the way at the bottom on the properties value as with the others, you just give it the tags which is an array. And that essentially means it's a list of all the tags. And here you just type name. And for note ID, finally we give it the database item ID. Click save and the JSON is set up. And then we round this out with another web hook. Insert the web hook. We can keep the single note because that's what we're sending here. Again, it's just a single piece of data. But then the note changed. So as you see, I copy pasted that over from the first web hook and it was still linking to this JSON which was indicated by the number four. You have to be careful with little details like this single node is the new JSON which you can see here by the number 10. So I'm just going to click that save. And now it sends the web hook with this JSON. Okay, two more paths and we got this. So next path is yet again going to be determined by action but this time we want to get the notes. Also adding that as a label. If you've been following closely this will hopefully make sense. Get nodes is to retrieve the nodes when the GPT gets engaged. This first one was for writing a new database item. The second one is for updating an existing database item and this one is just to fetch one of the previous database items. So the notion action therefore is going to be search objects because we need to find one of the database items. Again, we can just link up the database by looking for the name of it journal. Say okay, beautiful. There it is. And then we can up this limit to 100 in case you're going to be using this a lot and you want to look over a total of up to 100 entries. But on this one, we actually have to use the filter because we don't want to look at every single database item. As I said, this GPT is set up to only look at the journal entries from the past week. So here, you could change that, but to only look at the past week, we need to set up a filter. And we're going to be filtering for the date. So I'll set up the filter for the date. And then if I do that, there's this option in here that says date on or after. Okay. And when we select this date as before, we again need to parse this date to get it into the format that works with notion here. So in the first part, we're going to do the from date and the second part just the X as before. Again, this just changes the formatting so that notion can actually read it. And we add a and rule here. And now we want to go to date, but this time we want date on or before. This allows us to create a little date range for all the nodes between two dates. Just like before, we need to parse the date so notion can read it. And here we'll be taking the two date and the X here. And this will filter for all the nodes between this date and this date. Save that filter just like that. Okay. Then we need another JSON. So I'm just going to pick this notion step. Take the ego diary note. And then from the notion step, we're putting the data into here. Just like with the previous two paths, date start. I want the title in plain text. I want the content mood name. And for the tags, we want to use the map function here like so. And then here we want the tags and the name. And then for note ID, we want to use the page ID. Amazing. We're really getting close to actually making this work. While we tested this, there is one error that could occur here, which is if there's nothing in your database, this step will throw an error. So, the way we can handle that in here is by right-clicking this JSON saying add error handler resume. And then here, you just want to enter square brackets, which means this is an empty list. So, in this case, we'll keep everything working as it will return an empty list in case there's nothing in the database, which can happen. Okay. And then we round out this one with another webbook response. I'm just going to copy this over from the other one. But here we actually got to change three things. This and this right here because it's not a single note anymore. We filtered for multiple nodes. So say notes right here, notes right here. And then here you want to pick the correct JSON, the JSON from step 14. And save this out cuz we want to send this one for the web hook. Because when we looked inside of the notion database and searched for date range, if it's multiple days, it can return more than one note. So it's not the same thing as a single note before. Okay, let's finish the last path, which will round out the automation. This one is going to be all about getting the tags, which honestly with the journaling example here is kind of a nice to have, but if you rebuild this automation to do other things, having things tagged can be extremely useful. Sometimes even mission critical. So, this is how you do it. You set up this route to be to get the tags. We'll add a notion step. This time, we want to get a database, the same database as before. Click save. And then we want one last web hook which is going to be a web hook response. And then this one we need to customize a little bit. So the response type is tags. And then all the tags we want to pass on as a list which we do by giving these square brackets which creates a list. Then inside the square brackets we want the map function like so. And then right here in the first part of the map function I want the tags but I want the list here under options. All the options we have. And then in the second part we just say name. Click save. And that is it right there. That is the full step by step on how to build this automation that can now be customized for so many different use cases. But we're going to finish out our journaling GPT here by heading back over into chat GPT. And now hooking this automation up with the GPT. So previously we finished all the other fields here except of the action. And the action is what's going to be communicating with the automation here. So let's create a new action. And then what you want to do here is take the notion page I gave to you. And then here at the bottom you can see JSON. And you can copy this by clicking copy. And this entire JSON is what links this to the automation. All the things we set up in there is specified in this JSON. So you can see there's different mood types. It either sends single notes or notes. All the things that we set up in the automation is in here. So all I do is copy and paste that JSON in here. And then I just need to fill out one single thing right here where it says web hook URL. This is essential. This is where we connect it. Remember what I explained to you that we're going to be firing a web hook with the GPT which the automation is going to be listening for. Well, this is the listening step right here. And it's listening for this very specific URL. So I'm going to copy this address to the clipboard. Head back over to my GPT and paste that in here. And make sure nothing gets lost here. Right. In this case, when I pasted it, it actually deleted the second quotation mark. So, I absolutely want to preserve that otherwise it won't work. So, it's URL and quotation marks colon space quotation mark then the URL then the quotation marks. If you do this, you should see a check diary action pop up here. And this is what's going to be linking our GBT to the automation to the database and backwards. Okay, there's one more thing because to make this extra secure, we did set up a API key. So you need to go to authentication up here and actually set it up to otherwise it won't be able to speak to each other. It's like a password for the communication here. So off type I'm going to set to custom. And remember right here we set this up my tutorial API key. And actually to be fair I already forgot what I set this to. So I'm just going to set a new one and remove the first one. Going to call this my second tutorial API key. The value is going to be tutorial 1 2 3 4 5. Actually thinking back that might have been what I set for this tutorial. I will simply say tutorial 1 2 3 4 5. Anyway, what I want to do here is copy this right here. Send the API key using the X make API key. HTTP header. That is what it wants down here, the custom header name. So, I'm going to paste that in here. And then the API key was tutorial 1 2 3 4 5. Save. We're done. Would you believe that? So, let's create the GPT. But I actually want to only create this one for myself. So, that concludes the GPT setup. But I have to do one more thing in the make automation and I have to turn this on immediately as data arrives and for that to work I actually need to save the changes here. This had some unsaved changes. Okay, we can fix that.