BRlVZrgP18I β
Let's build with Zapier and AI (100+ videos)
Transcript β
[00:00] welcome back everyone today we're going to be learning how to take D 3's engine here and integrate into zapier as we know the image quality when it comes to di 3 is tremendously better than what we have access to with zapu right now but we can still go ahead and leverage it just to give you some quick use cases on our Instagram we're using the technology now and as you see from our four most recent posts we've used different prompts here we are getting higher quality images here and they're really really cool here on top of that it can also do text in the images now super cool stuff let's go and jump in so before we jump in fully just so you can
[00:31] get an idea of where to get diay prompts if you're not familiar with how to structure prompts in the context of image generation we can go to a website called prompt base here here's our account we do more stuff on gbt stuff we're going to goe and go to Marketplace here we're going to go ahead and change it so we are going to the model of Dal here we going to do the number three I'm going to go and zoom in here for y'all and then from here you can go ahead and just start searching find a prompt you like as we're going to be using one of the prompts I found here in today's video and I'm going to show you how to
[01:01] make really complex prompts become automated with zapier and this dolly 3 engine okay so let's go ahead and jump in if you're not familiar with the zapier platform go and check out that video right here I show you how to basically it's a 40 minute plus long video everything you need to know about zapier's automation platform and open AI API when it comes to usage and cost you can check out the video but we're going to go ahead and start here we're just going to say create new zap here and the way we're going to do this is we're going to do a API request although it might sound scary it's actually really really simple so I'm going to go and just change this real quick to Del 3
[01:32] Automation and our use case is we're going to show you how to do it in uh to your Instagram automatically you can do it to any other platform So in theory I can do this to maybe like Twitter and stuff of this nature using buffer as a way to access that API from here though we're going to go ahead and set up our trigger in this context we'll do a schedule so maybe like every uh once a week we want to send a you know new Del post to our Instagram we're going do every week here da of the week let's just say uh something new Monday and we can choose our time here so for us we're going to go ahead and just choose uh
[02:02] noon quick little side tip here if you use paths you can really create some really complex flows when it comes to posting every single day I believe I did a video on this it's like showing you the top four social media schedule scheduler stuff when it comes to zap automation so you check that out but from now we're going to go ahead and proceed with what we want here so I'm going to go and test this trigger here and it just give us some you know pseudo data that basically it's not going to trigger because today Saturday while alternatively the trigger is going to be Monday knowing that though we can go ahead and keep proceeding here so just
[02:33] so we can jump to the meat here so if you're really here just for the delay and the integration I'll show you how to do that right now and then you can stay a little longer if you want to see how we do a full flesh post of an automatic AI generated caption hashtags and you know other relevant information when it comes to automation for building out a profile like this from now though let's go and just jump into the main thing that you're probably here for which is going to be the API request beta so we're going to go ahead and do this this allows us to access say certain models found within open AI that aren't natively integrated into zapier yet what
[03:04] I'm going do here is I'm going to hit continue and then we're going to go ahead and set this up together before we do that let's go and jump over to the documentation so as you see here this is the Del 3 engine here and this is how we create a uh request so it's very simple the code is here and then on top of that you might be asking yourself okay what is um you know what is like certain variables found here as you see here there is different variables that we can add as different query parameters so if I come down here let's see if I can find it Well clicking this I'm going to leave
[03:35] both in the description so you can kind of search yourself if I click this cookbook it kind of goes into more details so if I come down here as you see we have a couple of different options here so obviously we have our model we're going to be choosing D 3 today we have a style between natural and Vivid you're going to see how we can edit that today I personally believe Vivid looks way better uh comparative to you know what we were used to then we have our quality obviously we'll probably go with HD furthermore we we have other stuff such as the prompt which is very important as you'll see the number of images typically will just
[04:05] do one and it looks like for D 3 actually one is only is the only supported amount another really cool thing to take note of is now we can do different sizes so as you see here I'm going to go ahead and zoom in y'all sorry about that as you see here we can do sizes of 256 x 256 512 x 512 um really cool we can do horizontal Dimensions now or vertical Dimensions now with these different ones so do that as you will that's really cool with the doy 3 Model then we have a response format don't worry about that you'll see how we do that and user not too important so knowing this let's go and
[04:37] set up a prompt in zapier to do so we're going to do a request they used to have custom requests in zapier but it looks like they stopped we're going to do a request of post why we're doing post is because we're basically accessing open ai's API in the back end and like hey knock knock we need a Del 3 image from here we're going to go ahead and use this URL so I'm going to make sure I try to leave this in the description down below as well or I make it as actually for this I'm going to leave it as a comment so search through the comments maybe give it a thumbs up to help other people out I'm going to leave it as a
[05:07] comment so you can kind of see the structure of this API request so it's going to be this URL here and then for our Cur string parameters we're actually going to do nothing here we don't have to worry worry about that for additional headers though we do need to add um a very specific request on the type of data we're receiving and we need it to be in as Json as the way we as the way we communicate when it comes to web Hooks and API calls and stuff of this nature is with Json in the context of zapier therefore we need to add an additional request header to make sure that the content that we're receiving
[05:37] can be read with uh this as a Json because we're sending it as a Json payload so for the actual body itself this is very very simple so all we need to do here is I'm going to go ahead and just copy this over here real quick all right so that's all we need to do for the Json payload here so we're going to have the the model which is Del 3 we're going to have the prompt which we're going to do together right now we're going to have the amount of image generated but as you saw it can only do one right now so we're going to do one the size Instagram can handle 1024 x 1024 so we're going to do this 1024 x 1024 the style which was between natural
[06:09] and Vivid I will say do uh Vivid maybe in this video I'll even show you the difference because it actually is pretty St like pretty obvious and then we have the quality HD good to go and honestly let's go ahead and just start this video off by showing the difference between Vivid and natural and this will make a lot of sense we're going to say um a dog on top of a ice cream cone so from my understanding of basically the idea that I kind of got from this was natural seems kind of like the earlier model it's a little more
[06:40] messy and Vivid seems like the newer model where it looked really cool and a lot more high quality all right so scrolling down here if we come all the way to the bottom our payload that we care about because it's going to be the actual image itself is going to be the URL I'm going to go and copy this and then open a new tab okay so this is the version As Natural it does look better than the original model of course but let me show you what this looks like as Vivid so I'm going to come back over to our zapier here I'm going to go over here I'm going to put in Vivid instead and leave everything else the exact same
[07:12] I'm going to hit continue I'm going to retest this step and personally I prefer Vivid as a style but you can go ahead and Proctor how you want so that is vivid as you see personally this looks a lot better to me obviously it's up to your preference but before you click off if you just came for that there's actually a little bit of nuance here as there is going to be certain stuff you need do in order to ensure that you don't run into errors that's when you comes when it comes to automation basically so stay tuned for that but for now you've officially found out how to use a doly 3 engine within zapier and automation let's go ahead and do an entire post here and get a full idea
[07:43] with a more complex prompt that has variables in it therefore we can have creativity and Randomness at scale so from here we're going to go ahead and add our next step so this step is going its use case is going to be getting the specific variables for our prompt therefore at scale we can have it so that every single image generated isn't going to just be a dog on an ice cream cone so from here we're going to do an event of conversation and then we're going to go ahead and Proctor a specific user message here and the prompt we're going to be using today is going to be
[08:14] this one and as you see this prompt comes is pretty complex due to the fact that we're dealing with you have to identify a scene the text you want to use in the scene whether the text is at the top or the bottom the letter style and finally the color of the background and we're going to do that all together right now so I'm going to go and copy this prompt I'm going come over here and just so you can get an idea of what we're doing here here's some examples of what the prompt does I come over here I'm going to go ahead input this prompt here so for now we're not going to have any variables but we're going to be using this prompt I'm going to command VI it and there we go so far so good if you feel like you learned something so
[08:45] far make sure to leave a like it's completely free let me know in the comments down below if you want to see other types of automations in this context or what you're looking for to do in zapier and AI or just zapier in general but without further Ado let's continue here so here is how we're going to go ahead and prompt this theide idea behind this is we know that we're using a prompt which use case is a t-shirt design right so why not use that in our logic so whatever the logic of your prompt is we're going to go ahead and follow the same type of idea when we communicate gbt so our logic here is
[09:16] this context identify what we're doing here we're generating a t-shirt design and providing the following content we need the scene the text whether the text is top or bottom letter style and color so we've identified the variables we need need for the variables requested in the output just generate the requested outputs so this ensures that we are just getting this there's no additional text here and then don't repeat passive outputs the way we ensure that we're not repeating passive outputs is that we'll add a memory key here so memory key is a random string of 32 characters ensuring consistent outputs and in this context
[09:48] making it random for us so what's really cool here is that you have the choice between 3.5 and turbo sorry 3.5 and four 3.5 is a little simpler minded four is more complex I'll be honest with you 3.5 Works in this context four Works in this context a little bit better so choose whatever you will if you don't have access to four yet 3.5 totally works so I'm actually going to use this and we're going to go ahead and do 3.5 here and I'm going to make sure it works so everyone that wants to use 3.5 it is a cheaper model can get access to it so I'm going to do 3.5 here and let's see
[10:18] what our first output is we may need to proor a little bit further as you see here this first output was complete trash so we're going to have to do a little bit further here so here's what we're going to do regening a t-shir design please content first do this I don't like brackets in it you don't want to have special characters in this context because this could mess up the way we access the API when we're sending it to uh open AI so I'm going to first do this delete these special brackets and as you'll see here you'll learn more why this is important as we continue
[10:50] here so uh what we got in the output just generate the requested outputs no text before or after okay and then I'm going to add a one here so we can refresh the memory key here I'm going continue here and I'm going to test this step again so I'm going to go and just debug this with you so you can learn how to prompt engineer you can have better aspects and there we go it already worked perfectly how we wanted so we got uh the scene Beach Vibes bottom B and blocky and aqua blue
[11:22] couple things I want to add here though first thing I want to add here is this let's not use capitals it's not necessary so we're going to do scene text and we're going to leave everything else the same here and because we had a consistent output I'm going to try this again here and see if we can maintain that kind of structuring and proceed so this works well we got our underlying scene text top bottom and everything of that nature now here's the most important thing you need to understand is we need to add a filter block here um sorry a formatter block
[11:52] why are we add a format block is because we need to ensure that there is certain special characters that don't show up in this context as they can actually hurt the prompt and you'll see why later I'm going hit text here I'm going to continue here I'm going to hit uh replace and in this specific context a lot of times when you're dealing a gbt in this realm you're going to see a lot of quotation marks so we're going to take the reply of that output and we're going to find the quotation marks and we're going to relieve it with empty space in this context we're just removing those quotation marks there therefore that doesn't cause an issue in our underlying prompt okay perfect we
[12:23] have officially now created our variables for our Del prompt so the next thing we need to do because of the fact that these VAR this variable is one single data point therefore we can't actually input it into our dat prompt as you see here if I went ahead and said Okay I want to add uh my text come over here and then I go to the text formatter it's one data point that doesn't work in this context so what we need to do next is we need to add another formatter block so if you aren't familiar what formatter blocks are this UI wise this
[12:53] is really nice in reality this is just JavaScript so I'm going to go ahead and hit text here again and we're going to go ahead and do an event of split also I want to point out is if you're watching this video or you plan on watching videos later this week you're probably going to see me in the same sweater here as I am traveling for Thanksgiving therefore I'm basically shooting seven videos or six videos in one day so no I didn't wear the same shirt every single day um from here though we're going to go ahead and do output we're going to do a separator of new line or yeah new line I believe so
[13:24] what this is this is nomenclature used by zapier here you can click here if you want more documentation on that what allows us to do though is separate the data into separate Fields therefore allowing us to input that into our Del prompt and you know have different data points here so we got all our data points associated with our Del prompt here let's go and continue here and we're going to go ahead and not do our caption yet let's go ahead and do this we're going to delete this and just so I can show you that it works we're going to add our relevant information here so for your scene we're going to go ahead and add
[13:55] I'm sorry y this is it's in the corner because this is zapier's new UI for this kind of stuff it's kind of hard it doesn't let me expand it further here so I kind of have to you know come at this angle all right so for your scene let me go ahead and just do this real quick we're going to go ahead and add our text format here and we're going to come over here so we're going to choose scene there we go make sure to get rid of the curly brackets no special characters for your text we're going to go ahead and remove those quotation marks and we're going to do text here and notice how text is already in the output so we can
[14:26] remove text here also I want to point out uh create a high quality illustration of bestselling t-shirt sometimes you don't want to have it too specific here so what we're going to do here is bestselling design so it doesn't come out as a t-shirt every time rather we want the design that's supposed to be on the t-shirt and then as you see at top or bottom I come back over here and we're going to go ahead and choose top bottom top and then for letter letter style here we're going to go ahead and choose old and modern and then finally for the color background we will choose deep for
[14:59] green now I want to point out a couple things here first thing I want to point out here is what you'll notice is the way that Del 3 interprets prompts is a little bit different than d 2 as Del 3 is actually going to take this as more of a device rather than the specific things it's going to use in the API so what I mean by that is that it will look at this and create its own version of The Prompt that it think is is more optimized U for this is let retest again because this was the dog prompt again let me go and retest this again so as you see here this is their version of it and they have their revised prompts that's why you can get away with not
[15:30] having perfect dictation within the underlying prompt itself as it doesn't read perfectly but Del 3 is smart enough to understand to revise the prompt here and then provide us with our underlying uh and you see right here provide us with our underlying image here so let's go check it out and there you go it was able to get the exact dictation of Adventure weights with the exact design we wanted here right so it's perfect that is what we like here so if you learn something up to this point as well make sure to leave a like but we're going to keep going here we're going to go ahead and add it so we can automatically create an Instagram cash Associated this so we're going to do a
[16:00] chat gbt block here with this chat gbt block we're going to choose an event of conversation as this is going to allow us to have more ability to leverage uh prompt engineering rather than using their kind of builda block versions so I'm going to do a user message here and this is going to be really uh dependent on however you want to proceed with this kind of context for us we kind of have this pre-built prompt here I'm going add and three hashtags but this is going to be whatever is dependent on the type of style you want on your IG caption first I'm going to make it simple for myself
[16:30] and say write one social media caption based on this piece of art we'll call the design piece of art and then for me I'm just going to choose one of these and I'm going to say you know what let's choose the scene because the scene is most relevant to what's occurring there I typically like raising the model to gbt 4 in this context to have a little bit more you know oomph to the caption here add a random memory key here and let's go ahead and test this output so with our new output here it is specific and unique to our underlying design but you'll notice we have those nasty little quotation marks again so all we're going
[17:00] to do is come to formatter block here and we are going to remove them by doing the text replace uh quotation mark so I'm going to do replace here and say continue input is going to be that reply scrolling down here and we're going to find those quotation marks Because unless you want quotation marks in your Instagram caption that's up to you there we go and then finally we're going to do a last step here so we're going to go to Instagram and actually because I kind of want to test this again let me go ahead and retest this let's try some new variables here
[17:30] let's get a different type of design okay so we got this new design here I'm going to come over and what you'll notice is that through testing though you're going have to keep you have to retest every step up to the point again obviously you don't have to do this during automation but this is purely because you know the data isn't automatically pass post block so I'm going to go ahe and retest this we should get a new design here based off a starry night with the text saying uh if I can find it wherever the text is let's go and copy this and see what this looks like actually if it's not let's make it a surprise let's go and jump over to Instagram and let's make you're going to
[18:02] do Instagram for business the only way you can publish post we're going to do an event of uh publish photo API request that's interesting that's new I might need to do more stuff on that publish photo choose your account once you've chosen your account here we're going to put our photo here so in order to do that we're going to go ahead and type in our search here search field here url url is going to be associated with the response data data URL basically when we sent that request what was the response data we got associ with the request and that's going to be our image that we care about our caption is going to be
[18:32] that text formatted caption that we created here make sure to choose the formatted version not the reply version so we don't have those quotation marks and now what's really cool here is we can actually tag users automatically as well so maybe there's someone in your Niche you want to keep tagging on your post and let them know that you exist there we go on top of that we could do location but from here we're going to go and continue and test this step so we are sending that to Instagram let's go jump over to ig real quick all right so it was sent jumping over to ig there we go it did have this little thing which is kind of interesting but as you see we
[19:02] got Dream Big Shine bright and we got a nice little IG post what's great about this as well is I should be able to share this entire zap in the description down below so you can add it directly to your zapier account but today we have officially discovered how to use dolay 3 in the context of zapier and automations if you like today's video make sure to subscribe we're giving me daily content here to help you uh leverage artificial intelligence in the context of business and personal life I do other stuff other than animation tutorials I do stuff showing you how to use AI models to really get you more productive in the
[19:32] way you access work life and stuff of this nature but if you want to see more content in regards to Automation and AI you can check out the playlist at the end here as we're diving into all 5,000 apps when it comes to zapier and seeing how to leverage every single one without further Ado y'all I'll see you in the next video thanks for tuning in and yes surprise I'm an AI Avatar make sure to explore more here at Corbin AI where we demystify AI for your personal and business life until next
[20:06] time