Spoke Generator in Vancouver - Live Coding Happy Hour
[Music] thank you [Music] thank you [Music] hello [Music] now I think I was in mute so uh so welcome everyone so my name is Prana bhagat and I welcome you to the episode life coding happier a show brought to you by servicenow developer program in this show basically we do live demos or something these are non-scripted like how we do in the created toolbox and today we have a very interesting topic that's part of our rank or release so if you haven't heard about the Vancouver release check out our content calendar at devlink.s in slash Vancouver so we're gonna talk about spoke generator so but before we go into the topic I'm gonna start with introduction as you know my name is Prana bhagat and I am a senior developer advocate here at servicenow I've been into the servicenow ecosystem for around eight years and I recently joined service now like one year back so that's about me and I'm gonna pass it to ashutosh hey thanks pranav for having us uh I'm ashutosh I'm one of the Dave MVP uh and I work with national anther London it's a company a financial institute in Netherlands and then I will pass on to sugandh hey um pay um hi everyone I'm suened I am a principal product manager at service now I've been in service now for like a bit more than nine years now and and I'm the product manager for this poll generator that we're going to talk about today and I'm a Staff engineer with service now and uh it's been almost like five years I've been associated with service now um and uh yeah probably we're gonna talk about spoke generator which is being released in Vancouver and it's I'm really excited about it all right so that's why folks who are watching us we have three experts with me because this is my first time playing with spoke generator and I don't want to mess it up so I involved I got three experts so firstly second like I'd like to ask you what is a Spoke generator like if you can give a one-line summary to our audience what is a Spoke generator yeah so so before I like like tell you about like what it's supposed generator let us talk about what is integration half right so if integration Hub is servicenows um like uh application to integrate with a third-party uh systems so this primarily becomes the The Hub um of all communication Integrations and and the each up and each connector we build with the third party is called a Spoke now today we ship about 200 uh spokes um um out of the box like but uh like we like we often get asked for uh spokes which don't again exist out there so what we did was we created support generator to basically help our customers build their own spots foreign Perfect all right so this is something coming up for everyone so before we jump into all the demos and everything let's go ahead and introduce our drinks so I'll start off like I'm drinking a regular water because it's like 11 A.M in the morning for me so I don't want to do drink something alcohol or something so regular water for me ashutosh uh I think I will follow you I have a bit I have a tea a Indian tea basically because it's 7 30 in the morning so I will just start with the tea today yep yep yeah so I have a like matcha up green tea um because green is the capital of the season and and it's like 11 o'clock in the night for me um so so if I need to stay awake for the session exciting drink but again lukewarm water with honey uh it has its own benefits so yeah it's early in the morning that's what I think so I think this show is like life coding sober R for everyone yeah all right so let's jump into the instance now so I think like let me share my screen I hope like just confirm if you're able to see my instance yeah all right so folks who are watching us like what I'm trying to do is like as like sugan explained us about spoke generator so what the process will be like I'm gonna consume the open API specification of zoom and try to create some meetings in Zoom from servicenow and I have done this kind of process sometime back like a couple of years back for one of the client and it took like almost two weeks to three weeks to build the whole integration with proper credential and all and now like I'm trying to build this thing in 50 minutes or so so let's see the power of spoke generator so first thing like I'd like to show you is if you can see on top you this is the open API specification for Zoom I got it from their official site and I'm gonna put this specification Link in the description also so that you folks can play around with it if you want to okay and the other thing that I did is I just created some credentials also that it's I'll show you the process of creating credentials but in interest of time I've already created the credential so that we just focus on the good part that's the spoke generator so all right so first thing like how we can access spoke generator so as you know we have to go to the flow like flow designer just try flow designer so once you type now in the Vancouver release you can see that there is like something like a Spoke uh section that's there and you can see we have an option of spoke so lalit and suganth you guys are also here so if I'm doing something wrong just pinpoint to beeping can resume it a bit the browser yes yeah is it better now yeah perfect all right so what I'm gonna do is like I'm gonna create a new spoke and uh like once we click on the new spoke it basically asks us like what's the spoke name so I'm gonna say life coding happy hour zoom's book and it will just ask us to enter a description and also you can put or upload your image for this particular spoke that's there and let me click on Create and continue now like generally till now there are like you can see we we always built all these spoke actions manually as of now but with Vancouver we have this called as open API specification that's like will ease our work and all so let me click on this thing and continue now it's asking us like okay open API source as well as connections that's there so this is kind of an open API specification that I was talking about if you if I zoom it a bit so you can see right it's basically is like uh a kind of you know for it's in a Json format which is readable for the machine as well and also for humans so you can see like what's a summary list of sub accounts and what are like URL and everything it's kind of defined in the open specification documentation so I'm gonna just grab this particular link and what I'm going to do is like I'm gonna import new so I'll say import from URL and we also have some like option of import from Json so I think what we can do is like we can copy all this Json to and paste it here and I think that will be the same format and let me just go ahead and put the URL here and I'm going to click on import so let's see I think it takes so sugan and correct me if I'm wrong it takes a while right I think it takes a minute or two yeah yeah just to add it gonna you know since it has uh close to uh you know hundreds of operations it takes time us to you know import and in the backing process hey I think it got imported so I didn't it didn't even took like a minute so that's a good part so I think we have the zoom API spoke that's a zoom API open API specification already there now what we have to do is like we have to create like the credentials and everything so I'm gonna put like life coding happy hour credits so so meanwhile you are creating the credentials there is a question like uh which kind of skew this spoke generator is do we need any license uh maybe sugan can answer this yeah yeah gently go ahead go ahead it's okay yes so basically um so the so we have basically if you have the integration of like like professional or Enterprise license you will be able to see this so these are the like minimum licenses you would require to build any spoke even manually and the same lessons will apply for the spoke generator as well perfect thanks again and folks if you're watching us like two hours for two years from the lifetime things might change so always remember Safe Harbor we just don't talk about licensing because it's it change it changes every time right so again Safe Harbor this can change anytime all right so uh you can see this connection areas folks like I have create I have given a name and I have selected a template like Zoom template that's a custom template that I created for the zoom thing and let me just create it so now I have just created this thing now let me create click on generate operations so I'm just super excited to see that it automatically generated 155 operations and just think about it if anybody has worked with integration Hub right who has worked with integration up they will know the pain like how much time it takes to create just one and it just automatically created like everything for us and I would like to do something like create meeting so let me see if there is any search yeah we have something like search so if I just you create meeting right now and so I think uh lalit and sugand so right now I'm just clicking on create meeting should I just directly publish it or like should I save it save action as draft what is the difference basically so yeah publish means uh you selected so these operation just to add some more context these are the operations which are part of the open APA specifications so what I'm going to do is the moment you select the operation and you click on publish a draft we're gonna create an action in the back end along with this step itself taking care of all the inputs and outputs and everything will be taking uh care of it in the back end you just have to you know select what kind of operation you want from this open a base specification in this case zoom and then publish and you can do bulk publish also here it's not just one you can do even tens or hundreds of operation you can take care of it yeah gotcha so I think you can select all these things and will it work when I move to page two yep yes okay that's perfect I think I like this feature so for interest of time I'm just gonna select uh create a meeting and I'm gonna go to page two and I'm gonna just put all these things or maybe I can also have something like retrieve a meeting also and maybe like let's add some let's add some fun like I'll also add update meeting if I want to update the agenda let's go into like webinar we can also create some webinars and all so let me do a webinar so I think we have almost of six uh action that you can build from it so I'm gonna do publish six and I think it will just try to create actions and I think what's we have all these things that are created let me see so it just created one for me let's see what's the activity that's there and yeah it just created one as of now did I not select it let me so click on new action and this is where the fun begins where we have to debug why didn't God create it yeah so let me just go into open API specification again click on Zoom API do the same thing click on generate action and I'm gonna create a meeting so I'll just try meeting as you are doing this there is a question from Islam he says what's the difference between connect Zoom directly versus the spoke connecting is it a new feature in Vancouver connecting spoke directly what I think what he is asking is uh like right now we have an integration hubspoke that's already there with the zoom for Zoom right so and why we are creating it using a Spoke generator I think that's if that's the question I'm just trying to show you the power of spoke generator right we already have 200 different spokes available in the integration Hub spoke generator will be helpful where when the integration is not available and you are creating something new which has the open API specification available so that's that's kind of a use case about uh for spoke generator I hope that makes sense yeah yeah thanks so so sorry I'm not reading the comments yeah go ahead yeah so I would just saying that and also like like whenever you see basically um did you see a Spoke which already exists and uh and and you see that the action you need so maybe like create a create a meeting actually um already exist in our in our publicly available um black meeting but as of today create a webinar does not exist and maybe for your workflow which You're Building you need to create a webinar so um so then what do you so then what you can do is that you can you like when you saw the list of spokes you will see your Zoom spoke over there you can click on it and add a new action and say that I want the add-in version from an open effects back so in an already existing spoke which is already published by you were made by you already you can still use the support generator to create new use cases new Integrations news talks new actions perfect thanks again for adding that information yep so I think that answered the question from the chat and let me go ahead and now like till the time like we were talking we already have the actions that are generated so let me click on any of the action that's like create a meeting action that's there so you can see we have this new open API step that's added like this is I think a new step for the spoke generator right so you can see it populated everything like what are the inputs that are needed and all these things that are provided and also like you can see we have a connection Alias that's created now like we we have to click on like the I button and we have to configure it right we have to go ahead and I think I hope it's visible so we have to create the new connection and credential for it so to create this thing we have to fill this particular form like okay give it a name the connection URL The oauth Entity name client ID client secret and all so let I have all these things with me let me quickly copy all these things and just to show you folks I've already created this thing uh in interest of time for you all but uh let me just at least add it and then I'm gonna so the redirect URL is there so What entity so so I think that's a just a entity name and this is a very straightforward integration because uh like we we have like uh we have the oauth set up so oauth is very easy to configure for us so let me just go ahead and put the URL I think the connection URL is this so I think folks like this is how we have put it there and one one thing that I felt is like these things are like it's for maybe for the engineering team like when I pasted this thing this shouldn't should be more of a placeholder rather than a text oh not a like some kind of a a back placeholder I can say so that when I pasted it it just pasted directly I hope that makes like what I did like yeah yeah so I just clicked on it like it just paste it like this but it should be more of like it should just replace everything so that's there so I think like now we can just create and get a raw token that's there in interest of time I've as I already told like I've already created a connection areas which have all these things that's a zoom Alias that's there so I'm gonna click this thing and uh just use it you can use the existing one I generated for you the token so yeah oh perfect thanks thanks a lot so I think that's there yeah I use the zoom Alias one that's the existing one so there so Chuck has a question didn't we already have the compatibility of importing and open AI specifications uh in integration Hub to create actions I mean he says like it it seems he recours that it was already there few releases ago so open API step I think open API chip is new but yeah you can add on to that yeah so I can so we we had actually the uh uh the functionality but that was on the rest step okay so what what you have to do is still have to do is you have to go for create a action use a rest step and then eventually import and open API and uh you know select the operation so you have to do this for multiple you know actions what we are doing now is uh we are utilizing the power of this book generator wherein you can just select the operation and we do everything for you in in a bulk manner so uh earlier it was not there it was just one step you just configure one operation uh at a time now you can do multiple at a time in hundreds or two hundreds of operations you can publish in a single group showed us right you'll have to go and research yourself on basically um like like which operation do I want to use right and you will have to say okay um close to the description to try to understand what does this operation do and how how we can use it what we have built over here is that when you actually when you went on that um we'd like to go back on that page uh if you can show the list of operations um it actually like surfaces all that um if you could go on the um uh on this portrait and add a new action on this on the support detail page the spoke tab the second tab you have yeah yeah and do a new actions from open effects back it already has the open effects pack and when you do generate operations but it basically does it basically gives you a little little bit of description on basically like what do you want to do uh so basically this is basically that research interface other earlier you were required to go through that position and pass that information out yourself and I think like another point I can add on is like uh so I have I think what Chuck was asking is more of like we had a rest chip how these are a bit different so in the rest job I think we had to configure everything and what I'm seeing in the open API specification most of the stuff is read only for us it's like it's coming from the standard open API specification and we just have to provide with the details and everything so it's both are almost similar but open API specification I get it why it's read only because these are standard so we we don't want like we don't we don't need to even edit it because if it's a standard on everything so I think that's there and I think coming back to the open API specs so we have the connection that's there and I think we are almost done we have built this thing like it's time for us to test it so uh we have to fill all these fields and folks I haven't created any of these fields these all came from the open API specification that's there so what I'm gonna do is like I have the documentation opened up with me and I hope that's there so I'm Gonna Fill some of the mandatory field like let me go into there so we have to fill the duration so let's see what it accepts the field is only used for schedule so yeah we want to create an instant meeting so we we want to use the duration and let me see if I have we have a type of meeting in the end so we want an instant one so I think I'm gonna put like type equal to one so it actually shows you like that the user ID is the only only mandatory field everything else is optional so you just need to provide the user ID for which the meeting has been the user who's basically the owner of the meeting right so that's the only thing you need to add got it but that's that's a thing right like so then when I was reading this spec this one you can see that we have the field tracking field as given as mandatory in the documentation right but here like we it's not mandatory I think it's like tracking Fields you can see this field it's not mandatory so that's kind of confusing why it's mandatory in the documentation and why it's manual why it's not mandatory in the open API specification that's why I'm just uh just double checking if it's anything is required for me specification which is being generated by third party we heavily depend on it okay so if there is some issues in the specification uh you know we gonna see that here in our actions right so I would say if it's not mandatory here that means uh the specification would not have that feel less mandatory for us and that's where the Gap is so it has to be corrected by the third party it's not something we can do here got it I think that makes sense and I think like then based on I'll go with the documentation part right so maybe there is some as you mentioned there might be some issue with this open API spec or maybe the one that I am right now using my it's it might be the like old version this is the new version came up and the documentation is updated accordingly right could be so yeah yeah so I think what we have to do is like I need I think we have to pass some Fields uh right to be honest I'm not aware of like what exactly these feel do but this is a mandatory field so I'm just gonna pass like field one that's there and I'm we're gonna read the documentation once it works just to see like what exactly these tracking field means and and again folks this is coming this is a kind of a zoom API configuration that we are doing and this is like we can put everything anything and I think I can gonna put live coding happy hour meeting I'm gonna put this thing and uh do I need to put anything else let me see that so let it like I know you guys are experienced like uh do you do we need to put anything else here or I think we're good yeah I think topic makes sense uh because that's the meeting uh uh you know heading or headline so that's something we should add and then probably yeah so okay gotcha agenda so I think we can put agenda and topic is more of like a heading so like putting happier ending right another thing I think reoccurring uh space Also I think it's uh the above one like how do you uh want to be created these are also some of the fields I think we should fill in uh looks like API uh I think because I'm creating an instant meeting the type is instant meeting so I don't think like we need this thing but we can go into the dock and just to see if we need anything recurring let me see if yeah that's there yeah you can see yeah so you won't need anything you just uh the mandatory field is actually enough which is the user ID it needs an admin and that that's all it needs we can we can try that out uh but as far as you know uh they are throwing some issues when we hit without reoccurring so they say missing field we can show that that's a good thing too yeah straight out here we can just try it so I think like let's run it and see and uh let me click on run test and so I think it's completed and I'm seeing the action status as success and I think we have to go to a diff to a different screen like I think let me move into a different screen to just to see if uh it's visible or not I think like let me move a different screen so there is a there is a issue actually here uh I can see you can show in the outbound locks outbound HTTP logs uh you can gonna see that they are saying missing field I don't know why they have not marked it but looks like some something wrong on the zoom side so all right so I think like let me go back yeah this is where the fun begins where we have to debug it like I'll go to the HTTP logs and uh just show that we have this that's there and I think there is a forward response that is 400 that's there and let me see the request and what's the response that's coming up so it's saying that missing field yeah we have to pass the reference type that's a missing field right so it's probably the type is the one we have to edit or something yes yeah so yeah you can see this is kind of like yeah this is the man that's why I like there is a slight difference between the open API spec uh that we have in the documentation so maybe that's there type equal to one and I'm gonna run it again and and let me know it's again it's work but let me go back to the outbound HTTP request and just to see it's 201 I think it's created it's successful so let let's go into a another like I think you are on that screen right just confirm whether we are able to uh whether we have the meeting created or not um yeah I think we haven't given this start time and also it's not popping up on the front yeah I I think it's it's more of like an instant meeting so you can go into the maybe personal room or something personal room that's there or I think we can give the timing also yeah yeah so protect the response it should have the meeting number and we can actually try using Zoom to join gotcha I think that's there so meeting I'm coming back to my screen and let's yeah let's see if yeah the action output yeah yeah so this is it has the meeting ID 370 or something yes so I think the meeting ID is there yeah yeah and it should have the same topic name and other stuff got it I think that on Zoom the instant meeting is not showing up so maybe what I can do is like I can create a regular meeting like I'm gonna just put instead of instant I can just put a scheduled one like we just have to edit the type you can see this is the type a scheduled one so I can just put number two uh here in the let me go back I'm gonna go to the create meeting and I'm gonna put type equal to two so that it's it's like a scheduled one and if I'm doing a scheduled one I need to see which Fields I need to pass it's number two that's there and I think one will be the timing for sure like when it starts so I'm gonna put something like this like any time I think it says today date and password is there we added a tracking field so we have field we have the topic that's there in the reference I think we we don't need recurring meeting so I think we can skip this thing so maybe you need duration because then you put start time so correct will it automatically calculate the end time if you put duration like 60 Minutes I don't know yeah we are right I think we have to put the duration also like it's saying that the duration it's in minutes so I can just put 30 here and then we we don't need to provide end date time or end times because it's not a recurrence and and in the setting like I think we have given the start time it's in UTC format so that's how it's coming up I think the format is right and let me see if there is what how they want the start time in I think let me go ahead and check check let me see if I'm gonna search it start time okay so yeah it's a start time so it's asking us the start time as like to set a meeting start I'm using a specific time zone use this otherwise you can put like this so I think I I think this is the same format let me still copy this thing and I'm gonna paste it like this and just update it 23 is it nine and 31 I'm just putting it like to 12th and I'm gonna put time as and keep it like this I think we are good now let's see if it creates a meeting there all right so let's run it and yep that's just finished let me see out on test request we have another one that's created it's 201 so let me see if the meeting type is so I think let's check if there is anything created so uh I think you are on that screen yeah it's being created oh perfect I think that's all right think that's there so yeah this is this is how it's created now one thing I'm gonna do lastly is like let me update the title all together all right so we have another one so we have the meeting ID so I can just click on this thing and I'm gonna put the output and we have the meeting ID so I'll try to update the title from Life coding happier meeting to something else so let's see if we can do it quickly so I'm gonna put live coding happier that's there uh I think we have already added that particular thing but let me see it's like update meeting so if it's already being added then you should go to another page uh you can go to home yeah this one yeah so it's already added and we already have the grid and everything red so let me go here and we have to just change it to the zoom Alias that's there let me save it and let's see let me just click on test so I think we have the meeting ID this is the meeting ID and for the topic I'm gonna put like I'm I'm not that creating with names so I'm gonna put live putting happy hour topic too so let's see let me let me just click on run test and just to see like so we have run it I'm gonna go into the output HTTP request it's okay it's 400 again I think we have to pass some field type that's missing so validation message that's their missing Fields so maybe like it's asking tracking field okay yeah it wants got it so let me put I I need to understand this like what is this tracking Fields definitely there will be some relevance to this particular thing and recurring type I think we need we can just put it one and we didn't provide a recording time right let me see let's see so I clicked on it and R1 request 204. this is different payload logging not supported for unknown content type hmm it's it's a success just we need to see if it's already updated so it's send back anything which was not yeah yeah so it's a success 204 is a success you can see it's updated on the screen okay I think like probably we can okay yeah I think that's updated so I think we are successful I think like let's bring everyone on the screen back to the screen I have a question uh mainly for this poke generator like because I have many on in-house applications right um and we host this in-house applications on some servers or AWS so if I understood this correctly open specs API is mandatory so even if I create an in-house application I need to make sure that there is a open AI specification for that application right okay and if we host it on some documentation it will still work the spoke generator will still work we just need to establish a connection between where the open AI specification has been hosted is that true yeah exactly okay so you so if you're hosting somewhere else um and that information is not in the open Apex pack you well while making the connection you can actually update that okay yeah and it's it's more of like I I even tried some time back like to generate some open API specification for certain apis which were not there so there are a lot of tools online like I think Swagger tools all these things which creates this open API specification but the challenge of it is like it requires proper parameters because it's like a standard language right so that machines and humans can read all these things so I yeah we can play around with it maybe this might be another topic for a live coding appear where we can just try to create an open ABS spec from a different thing and use in the spoke generator and all so I think like that's pretty much it about the spoke generator that I would like to show and uh so like let's move into any any other let's look into the comment section if there is any questions or something there is interesting comment at the end I would love to see reverse if I just read a Spoke I have a way to dump out yaml or Jason nice yeah that's that's a that's an enhancement for the product team I think like we have a spoke and reverse engineering on it nice that's there all right I don't see any other comments so firstly uh folks thank you very much for joining uh this live coding happier uh and uh we we all we were drinking I think we were all drinking sober drinks so let's go ahead and rate so I was not even able to drink my water because I was doing the coding most of the time so but water is there it's like five out of five what about you ashidosh oh my tea is always in the morning it's five out of five it refreshes me yes again like five out of five and let's same here because I love this and it gives me energy in the morning to run the day yeah nice so yeah that's I think that's great so I think that's all folks we have for you in this life coding happy slash sober hour so I hope you enjoyed watching the spoke generator and we have all these content coming up so make sure you check out our content calendar at Devlin dot Essence Vancouver where you will find a lot of different content around app engine automation engine and platform so thank you very much for joining and I'll see you next time bye all right [Music] foreign [Music]
https://www.youtube.com/watch?v=3CguIISoJiY