How to use APIs (if you can't code)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so in today's video i'm going to tell you what i do when zapier parabola whatever the automation tool that i'm using doesn't have an integration with the app that i'm trying to use or they don't have certain types of trigger or action steps and it is going to involve a little bit of code so without further ado let's get into it hey friends welcome back to the channel if you're new here my name is common and on this channel i help people who cannot code build their own online businesses with no code tools like webflow ear table and zapier now one thing that i hear from a lot of people just getting into no code is that they're worried about certain types of limitations with no code tools and that they won't be able to solve for specific use cases for their business now oftentimes the limitations that you do have with these tools are not as severe as you may think but there are definitely specific use cases where you might run into little issues when using tools like zapier or parabola so in today's video i'm gonna be going over what i do when zapier or parabola or whatever other automation tool that i'm using doesn't have an integration with the app that i'm using or it's missing certain types of trigger and action steps so just a little heads up before we get into it if this is your first time visiting my channel and you've just come here to find out all about no code just know that today's video is going to be a bit more advanced in order to understand how to work with apis and all that kind of stuff you're going to need to have a basic understanding of how tools like zapier and parabola work so i definitely recommend checking out some of my intro videos on this channel where i go over the basics of those tools so one last thing before we get into it do me a quick flavor subscribe to the channel if you haven't already also i much appreciate if you would like this video it helps spread this video through the internet helps me grow this channel and i also get to find out what kind of content you like me to make in the future but without further ado let's dive into it so the first area where you are likely to run into an issue or a limitation with tools like zapier is when you are sending data to webflow now as you know webflow has their own zapier app where you can map fields from previous steps to the webflow cms but at the moment you can't map all field types now one of the field types that you can currently not map through the native webflow zapier app is multi-reference fields that means if you are sending data from say air table or google sheets to webflow by the way never use google sheets for this type of stuff but just in case you do then you will be able to see most things but you won't be able to send tags like these here the webflow zapier app just simply hasn't set up this particular type of mapping inside of zapier which means that you're gonna have to either do it manually or find another way to do it now the way that i've managed to automate this part of the process is by actually writing custom code and then using the custom request step inside of zapier to send that data to webflow so when you look at custom code like this inside of zapier it can seem a bit overwhelming at first because where do you even start finding out what type of information you should put in here now one thing that's important to know is that every tool or not every but most tools that you will be using will have something called api documentation and api documentations are basically instructions or a recipe on how you can send information or data to their cms or to their api now don't worry about the actual terminology of cms and api basically think of it as their database and they are basically showing you with this documentation how you can send information to their database now in this particular use case i want to send multi-reference tags to the webflow api so that i can then display those values inside of my cms now if you can't do it natively inside of zapier then you can just jump over to the api docs and see what specific instructions they give you when it comes to doing things like creating a new item inside of your cms or updating an item inside of your cms now you can see here in the webflow api docs that they have a few different instructions for example they explain to you how you can create a new collection item they also teach you how you can update a collection item and they have a whole bunch of explanations around what it does and how it works now when i looked at this the first time i was completely overwhelmed because where on earth do you put all of this information but the truth of the matter is it's not actually that difficult because all of the fields and labels that they have specified in here are basically the fields that you specify in the custom request step inside of zapier so in my particular case what i wanted to do is i wanted to update an existing collection item so all i need to do is look in the documentation for update live collection item and then go and have a look for the particular url where i want to send the new information to now they specify down here that you need to use what's called the put method now there are a few different methods that you can use when working with apis the first one is the get method and basically what that means is it basically allows you to retrieve a record from the api or from your tools database post pretty much creates a new item most of the time again you're going to have to look at the documentation and see how they specify each thing to know what applies to each tool but in most cases what post refers to is creating a new item inside of that database patch and put are different variations of updating an existing item and delete is pretty self-explanatory it deletes an item from that database now when i look into the documentation and i want to patch a collection item i can see that the method that i need to use is called patch so what i want to do then is i want to jump into this custom request step and i want to use the patch method to basically affect the database the next thing that we're going to need to specify is what record we are actually going to be patching so you can see here that they actually specify how you need to structure your url so it is slash collections and then you have to put the collection id in there and then you go slash items and then you need to add the item id so depending on what particular item you will update you'll have a different value that reflects a specific item inside of that database and that then lets the api know what particular record you want to update so i have done that step here and i actually dynamically populate those values based on the values that i have created in previous steps so what i mean by that is in the previous step i created a webflow live item and that created a cid which is short for collection id and an id for me which is the item id that i can now use in the next step to populate those values so that i am updating the right item inside of the webflow api so as soon as you have selected your method and you have selected the endpoint or the url that you want to send those updates to then what you want to do is you want to specify the data that gets sent to the api and now this is where things can seem overwhelming but they're really not so oftentimes the api docs will be very specific on how you send data to that api airtable for example has phenomenal api docs and they tell you exactly what the body of that particular record looks like how you actually have to populate those fields and then you can use zapier to dynamically populate certain types of values from the previous steps in the workflow now in my particular case all i wanted to do was update the services field which is a multi-reference field inside of my collection and i could then just populate it with the dynamic values that i created inside of ear table all that's left to do then is to add the right type of authorization and the accept version and content type now this is going to be different depending on the api docs but if we jump back into webflow and we go and have a look at the authentication you'll see that they give you a bearer token which is essentially the password to your api that you should keep safe and then they will also specify these values here which is accept minus version 1.0.0 and content type equals application dash json now you don't even need to know what these things mean but you can see here from the h that it is part of the header which means that you aren't just going to have to integrate it into the header sections down here now normally my api key sits in here but i removed it so i don't need to edit it out afterwards but you'll be able to get that api key from inside of your tool just google how to find api key for web flow or ear table or whatever the tool you're using so i'm going to get back to how to populate the body when you are using a tool like zapier but i will just want to quickly jump over to parabola because zapier oftentimes has a lot of integrations and they also have very detailed trigger and action steps because they are such a popular automation tool but a tool like parabola is reasonably new and they don't have integrations with all sorts of different apps and this is where understanding how to use api docs can come in very very handy so in case you don't know what parabola is it's kind of like zapier but rather than dealing with one record at a time i use parabola to update a whole bunch of data sets all at once and one of the workflows that i've got set up in here is when i pull in the ear table table for my members that users and my actual member stack database and then make updates to it based on the latest version of data that sits inside of member stack now mid mistake doesn't actually have an integration with parabola in fact there are actually a lot of tools that don't have integrations with parabola at the moment but in that case you can actually use what's called a pull from an api step where you basically pull in the entire database and then use that particular way to start manipulating data so if we jump in here and have a look at how we are actually pulling data from the api you can see again here that we've got request types and we've got the endpoint so in my case i can just again select what is the actual request tab that i want to make to the api and because i now want to retrieve all the data what i actually want to do is use the get method now if we jump into the member stack api docs you can see here that they again specify the url if you want to list all of your members and they also specify what the actual request method is that you need to use in order to list all your members and that is pretty much all we're doing here we have specified the request type to be a get method and then we have also just copy and pasted the url for the endpoint right in here now another thing that they specify here is that you have to use in your header what's called an x minus api key and really all you're doing here is pretty much a similar thing as you were doing with your bearer token however in the event of member stack they actually just use something different called an x api key so all you need to do then is just jump into your authentication section of parabola or into the request header section and just add that api key and before you know it it will pull an entire database of all of the information that sits inside of your memberstack database and as soon as i've imported all that i can then start doing things with the api for example i can match it up with what i have inside of a table and then i can update the records inside of airtable with all of the current values that currently sit inside of member stack now this would not be possible if i didn't go through the process of reading the api docs and then basically pulling in the data using this custom code way now you can do the same thing for sending data to an api as well so inside of parabola you have something which is called an api export step and now again here it doesn't have an actual native integration with the app that we're sending data to through this api but all you need to do again is just jump in here and then just specify the request type that you want to use and the endpoint that you're trying to send that data to so in this case i actually just wanted to update a field inside of ear table with the page views that i got from google analytics and so what i needed to do there is just specify the endpoint of that particular skill inside of my ear table database as well as the method which in my case is patch which just basically updates an existing record with the values that i'm trying to populate and then again you just need to go through the process of reading through the api docs and seeing what header types are required what the in point is what the url is that you need to use and also how you fill out the body so in my case you can see here that i've got all of the different fields that sit inside of that table inside of here table as well as the values that are attached to it now the cool thing about the ear table api docs is they actually dynamically pull in your table so that you can actually see how you should name your field so in my case i knew okay the field name that i need to populate inside of parabola is called ga pageviews and the value that i specify is the is a number so that basically means you don't need to actually copy and paste in every single little bit of your url you only need to copy in the values that you actually want to update now one important thing that i want to say about how you specify the values now you can see inside of parabola that sometimes you have um the parentheses or the speech bubbles around specific values again the api docs will actually tell you how you have to actually format these certain types of values that you send to their api so in this case uh the name field inside of my ear table table is a text type and the text type is a string and strings basically have these little speech bubbles around them but if we look at something for example a number which in my case you can see here count from additional services um is a number then you have to actually send that data without the speech types if you just put speech bubbles around it then it will come up with an error message so definitely be sure to see how they specify how data has to be sent to the api so the ear table api docs are the absolute bomb because they actually tell you what the specific fields are for your particular api table and just pulls it in automatically but not all api docs are going to be as good as that with the webflow api docs for example they don't actually tell you how you have to specify the values when sending multi-reference data to the webflow cms but there is a tool that you can use to see how it is actually structured in published items so the tool that i use to see how a particular cms item or a cms collection is structured is by using a tool called postman now what it allows you to do is to basically request api types manipulate them a lot of different ways the main way that i use it is to pull in certain types of data and to then basically have a look at how it's structured so in this case you can see here i have added a url with a specific item inside of my webflow collection and i have also selected the get method meaning that i want to actually retrieve this value and i want to see how it's structured and you can see that as soon as you hit the sim button that it will actually just pull in that information from the api and you can see then inside of here what the different field names are and what these specific values are that sit inside of my fields so we can see right here that the skills are specified as an array which is basically a bunch of comma separated collection items that are referencing a different collection inside of your webflow cms so basically what i'm saying is that these values here are individual skills that sit inside of the skills table inside of webflow and instead of specifying the actual name i know that i have to reference their webflow item id in order to send that data to webflow so you can see right here that if you are going to use the custom request step inside of zapier to send multi reference data to the skills field you're gonna have to format it like that and you can see that if we jump back into the custom request step inside of zapier that that is exactly what i've done i've got the collection item ids comma separated and i just wrapped them here into these square brackets and that then allows me to send that data in the right format to the webflow cms so if you do ever get stuck with some of the custom code stuff and error messages come up and you're not quite sure where exactly these error messages are happening then use a tool like postman to pull in a published collection item to see how it is structured properly oftentimes the problems lie in the fact that you have misspelled something for example the name of the field for example a weird thing that happened inside a web flow is that if i rename this field from say skills to services inside of webflow then the label will actually remain the same in the cms api but you might think that it has to be changed from something like skills to services so using a tool like this allows you to pretty much know exactly how it has to be structured and so that is a high level overview of how you can first of all read api docs how you can send data to and from a specific api using a tool like zapier or parabola and also how you can use postman to quickly retrieve specific records that sit inside of certain databases to see how you have to structure values in order to send it to that particular api now one thing i want to leave you with before we leave and in the session for the day is that now you should be able to jump into different types of api docs and trust me most tools will just have api docs um and you'll be able to see how you can manipulate things when certain tools like zapier or parabola don't have integrations one of the examples that i wanted to go over quickly is stripe now for example in stripe there are only so many things that you can do inside of zapier one thing that you can't do is for example use zapier to create products inside of your stripe dashboard but if you jump into the api docs you can actually see that there is documentation on how you can create a product inside of your dashboard again they specify here what the url is they specify the method that you need to use and then they also specify the um api keys and a whole bunch of other things and then also tell you how you actually has to specify the body in order to send that data to your stripe api another tool that um i use is a tool called pocketsmith and they are basically a financial management app that's from new zealand and they don't have a zapier integration at all now if you wanted to really customize things or potentially send all of this data to say for example ear table then instead of having to wait for them to build a zapier you could just jump in here and you could start pulling in information about your transactions yourself so for example if i wanted to list all of my transactions that sit inside of pocket smith all i need to do is just jump in here i again can see what the api docs are i can see what the specific headers are that i need to use what the method is and that will then allow you to basically go and play around with data when they don't have a third-party automation tool connected to it so what i'd recommend doing now is just going and having a look at the api docs of your favorite apps and just seeing if you can now understand what they do and how it would work because getting to understand how to use apis is an absolute superpower and it will allow you to push the boundaries that no code currently hasn't gone past yet so ever since i've learned how to work with api docs i've been able to set up workflows that i could just not set up with any of the third-party automation tools like zapier and here table and i can tell you right now now i'm at the point where even if these integrations are added i don't actually need to use them because i have just a little bit more flexibility working with the actual api and just coding it and so um i definitely think that this is a skill worth spending time on because honestly as soon as you wrap your head around how all of that works you'll really be able to set up some highly highly customizable workflows and it'll be an absolute game changer for you but that is pretty much it that is what i wanted to tell you about working with apis if you don't come from a coding background i hope that you can see the power and the potential of just using this little bit of coding to really enhance workflows it's hilarious that i've made a video about how to use api docs and postman and actual code i didn't think the day was going to come but it has so if you enjoyed this video then please leave a like on this video also if you haven't already subscribe to the channel also leave a comment let me know what you thought let me know if i forgot anything other than that i'll see you back here for the next one
Info
Channel: Connor Finlayson
Views: 1,997
Rating: undefined out of 5
Keywords: how to use apis, zapier, no code, workflow, business automation, apis, webflow api, Airtable api, airtable api tutorial, airtable api key, airtable api examples, webflow api calls, webflow api tutorial, webflow api integration, zapier integration, zapier webflow, zapier webhooks, apis explained, zapier automation, airtable api limit, airtable api pagination
Id: 4bxvk_dEv90
Channel Id: undefined
Length: 19min 36sec (1176 seconds)
Published: Wed Jun 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.