Getting started with the Monday.com API - Easy-Mode

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey everyone thank you for joining me i'm a guy called joe this is boot wrapping tools let's build where we help scrappy bootstrappers just like yourself figure out how to overcome some of the hurdles that they're facing or just to get better and make themselves more efficient every day now before we dive into today's topic make sure to check out our youtube channel we got lots of videos up there that go through all sorts of different low code and no code solutions out there including retool google sheets google apps scripts data studio i'll walk through many different apis as well and today we're going to be talking about monday.com now we're going to talk about setting up uh and exploring the monday.com api if you don't know what money.com is it's essentially a task management tool uh it's one of the newer ones that have a lot has a lot of technology backing it right now so it uses a graphql api which is really cool that means you don't need to worry so much about all the different endpoints you have to worry about writing your queries to either get information or to modify existing data so it also goes through a lot of different integrations as well uh which with gmail or slack or any other there's so many out there uh that they also have the zapier uh app as well that you can easily set up some of your integrations but enough of that talkmoney.com is a great application it's a nice tool that you can use in your everyday work uh whether it's your own startup your own company or within your existing company right now i guarantee that it will be a positive and net positive for whatever that you're doing let's go ahead and dive into uh monday.com and we'll start setting you up with your api key and making your first queries all right so on the screen here we have a brand new monday.com account open up here i use one of the templates where it requests to populate it with some sample data if you don't have a monday.com account it's really easy to set up just go ahead and sign up on monday.com literally it's just money.com uh you go their science sign up they're going to give you a free trial of the pro plan just to let you play around with all the different integrations and automations that they have and then if you choose to continue you can either pay for an account or you can just create an individual account which is the one that i have right now it limits you to like two users and then a certain number of items but unless it's going to let you do what you need to do and then if you ever do want to pay for it that's that's going to be up to you for us we're just going to be using the free account so everything you see here today is available through a free account on monday.com so for you to access the api uh there are a couple of different ways that you can do that the first way is on the bottom over here where your little avatar is for me it's just jl for my initials when you click on that it's going you're going to see an option for admin you're just going to click on that admin option over here that's going to update the screen so that you can see all the information and then on the little menu bar here you're going to see api when you click on that it's going to update this on the side over here you're going to get your personal api token that you can regenerate if you need to but you can copy that and utilize it now the other way to access the your your api token is actually going over to developers so going back down to your little avatar icon on the bottom left clicking on that and then scroll up to where it says developers in the option so we click on admin before we're going to click on developers this time when you click on developers it's going to take you over to essentially your apps and i create an app you don't need to create an app for this uh what you actually do need to do to access your your api key is go over to the developer option up on the little menu bar up here click on that and you're going to be able to say access my access tokens when you click on that it's going to give you all the tokens that you have which is really just one and that's the graphical api token and it's personal to you so make sure you don't share it with anybody you click to show it and then you can copy that and utilize it wherever you need now that's how you get your api tokens um let's show you how you're actually going to interact with the api so it's a graphql based and what monday.com which is a really cool feature if you click on developer you're going to see api playground when you click on that it can open up their graphical interface graphical you know it's it's just a little bit of a ui that lets you play around with graphical queries which is a really big help for when you're trying to figure out what your queries need to look like in order to act to hit the api and get the data back that you want so there's already one pre-made one that we can use so let's go ahead and hit the preview button over here which is the play button and we'll see that board is limited to one so we only get one board back and that's the it request one uh we're getting the id the name of the uh the columns and everything that are in there and also collapse certain groups here see all the different groups and all the items so within each one i don't really care about all this other stuff so we can actually get rid of all this and the way that you write graphql queries um you you essentially just tell it what scope that you want to search your data in and then you tell it what um what items you want to see within it so on the over here on the right hand side you're going to see some documentation that you can actually click so in order to open this there's a little docs thing up top over on the upper right click on that it's going to pop out a little tray you can see all the different types of queries that you can make against this api which is super helpful when you're deciding what you can or cannot do so we're going to focus on boards this time around you can see that within it you can pass a couple of different arguments right now we're passing limit right limit one but if we did limit two over here and then we hit run now instead of just getting the it requests one we also get the search from scratch one we only have two boards so that's all you're gonna see but if we want to say something like ids or board kind of we can do some of that let's go ahead and say copy this board id and then we can say comma id equals that and essentially hit the play button wait not id it's going to be ids with an s and i think we have to put this in an array send that over okay perfect so now we're getting the board back it requests and if we collapse that we're still only getting one even though the limit was two and in the previous query we saw that there were two boards that were available so that's a very basic level how you're going to actually operate the the graphical interface over here i actually don't need the information about myself so we can remove that hit play you're going to see all the information that you need column values and all that you can really just play around with it so if we type into the if we click into the type over here especially go back so that's up over here the type uh it says board when you click on that it's going to give you all the different things that you can get within that board yes go so you can see we have items and then when we scroll down to items over here and we click on that we'll be able to see that within the individual item [Music] we have a certain number of things and we're already pulling the name the group and the column values so the group is over here and then within group there's an id that you can get and then the column values you can see you can get all of this stuff so if we wanted to say instead of id value and text we want to also put in type so it's a nice little autocomplete that will drop down for you and we also have additional info so let's put that in as well and see what we get back my traditional info is null which is fine and then the type is long text pulse log color and also and so on and so forth but that's essentially how you're gonna mess around with the graphical interface here uh next up we're gonna show you how to actually hit the api using uh google apps scripts just in case you wanna use some of this information within a google sheet okay so up on the screen over here we have some of the documentation up available by monday.com that talks about making your first request the authentication type and all that and so what we're going to do is we're going to create a new script uh using google apps scripts and we're just going to hit the api real easy just to get back some information so the authorization is regular authorization using the api key that you have uh just like we showed in the beginning of the video you can get in two different ways either through your admin page or through your developer account using my access tokens so going over to our new app script we just created a brand new one we got my function here we're going to rename this to request monday and then within here we're going to create a new variable called base url and this is going to be the monday.com url that we need so going back into the documentation clicking on make your first request scrolling down we're going to see over here that's the base url is https api.monday.com slash v2 i'm going to place that right in here make sure that it's within your quotations and then we're going to set the api key to our api i actually set it to a separate library and you can do this yourself as well i can show you how in another video but what you essentially do is you created a totally different app script and then you make that an api executable so within there i have my api key stored just for security and anybody else like this is a really good price especially if you're using a lot of google apps scripts it's really nice to create a secrets file and just store all of your api keys or anything that's like case uh sensitive in there and then because you're also probably likely going to share it across a bunch of different scripts so put in one file and then use that file as a library that you attach to everything else that you want to use you can do the same thing with with code that you don't want to keep writing or pasting into new scripts okay so now we have the base url we have the api key we're going to create a query now and that query is essentially just going to be a really basic one we actually have i think one in here that we can use this one so this is boards limit one and it's just getting the id in the name so i'm going to take that place it in here but before we end this we need to actually prepend this with query and i'm going to show you why this in a little bit but it has to do with how you're making a graphql uh request um to to the api so we have that now the next thing that we're going to do is we're going to create a the headers and the options like we normally do for another api account for any api account so headers going to be authorization and that's going to be api key okay and then content type application json now we're going to do options and the headers is going to be equal to the headers the method is going to be equal to post because it's a graphql um uh request so you have to post it over and we're going to post that query as a as a payload so also we're going to add in payload here and that's going to be json.stringify and that's going to be query to query all right so that looks pretty good right now uh now the next thing we want to do is we want to do var response we're going to declare the response and then we're going to use the library provided by google apps scripts the url fetch app dot fetch and then we're going to paste in the base url as well as our options and then we're going to take that we're going to get content text out of it now we're going to make sure that we also parse that json uh don't forget to do that so json.parse and then response let's go ahead and just console log this so that you can see the results of our api query here well we got a little issue line 14. oh we forgot a comma always make sure to check all right so we saved all this let's go ahead and run it and let's see so we got data back boards this is within an object and then it tells us the account id so let's go ahead and do result.data just so you can see what's within that object so boom we just have id and we have name and that's the it request if we wanted to do something a little bit more sophisticated like what we're doing over here let's go ahead and actually copy this one really good way uh to use uh graphql queries within code like this you might be thinking like oh if i use um the quotations everything's gonna actually err error out so that's okay what we're going to use we're going to use the tick symbol that's located to the left of your one uh the number one you the numerical one button on your keyboard it's uh also has a squiggly line on the top which is an enya so you just put the little tick right that's going to create uh these little yes ticks i don't know how to call them their ticks but then you paste in your query over here and then it's going to register all of it as one thing together so when we run this what we should expect to happen is that we should get the same exact type of output that we got over here so let's zoom back out save this and then let's run it let's see how we get back so items has an object in there so let's go ahead and just take this give us back what are within the items so hold up it's an item or items hold up you have to do boards so this is really great when you actually come back to your data set here so you actually need to go to data and then boards get the first version of that so let's go back into our code so data.boards zero let's see what we're getting back there all right look at that so getting information back um exactly like we expected from the graphical interface and so when you're doing development uh against the monday.com api it's gonna be really important for you to use graphical use it it's a great tool um that that you should leverage in order to make sure that you're writing the right queries and that you're also accessing the right data it's going to look a lot better here i promise you it's going to look a lot better here than it does in your little console logs over here even though your console.log is really important for debugging your code but but that's it for this video if you did run into any issues feel free to drop a comment in the section below we're always here to help so don't be shy if you're having an issue most likely another scrappy bootstrappers just like yourself are having an issue just as well but of course if you did like this video make sure to hit that like button it's the best way to um support this channel and ensure that we can continue to make content for you speaking of content we got lots of content coming up so make sure to hit that subscribe button and also the bell so that you get notified when we release the next video but that's it for this video i'm a guy called joe this is boot trapping tools let's build it's been a pleasure and we're out you
Info
Channel: Bootstrapping Tools
Views: 286
Rating: undefined out of 5
Keywords: Bootstrapping, Business Intelligence, Monday api, Task management, api data, api requests, automation, google apps script, gsheets automation, how to use monday.com, monday, monday api, monday.com, monday.com api, monday.com tutorial, project management, project task management, task management software, task management tips, urlfetchapp
Id: cMupQ0mH08A
Channel Id: undefined
Length: 16min 42sec (1002 seconds)
Published: Tue Oct 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.