logo

NJP

Hackathon Livestream

Import · May 02, 2020 · video

[Music] so [Music] hello and welcome to the special hackathon live coding happy hour i'm here with my buddies dave and chuck um good gracious beauty we've been doing a lot of stuff already i've been doing a lot of stuff uh wow i just don't like to look that far down and if i had seen the beard i would have not made that mistake uh anyway let's try that again i'm here with my buddies brad here dave is my buddy though wherever you're at dave you're you're my buddy um and uh let's do the intros chuck hi i'm chuck tomasi senior developer evangelist for service now been a customer so 2008-2010 have been with servicenow in various roles from 2010 to today uh something like 3600 and some odd days but who's counting having a good time and really excited about the hackathon and what people are creating want to see this stuff and i was i was thinking about doing a david attenborough impression but maybe later all right and uh we we've got some new guests we're doing the intros right now as y'all come in so uh i'll i'll hit y'all as y'all join as well brad yeah brad tilton i am a developer advocate with the developer program at servicenow i've been doing servicenow stuff since about 2008 as a customer partner trainer and servicenow employee in a bunch of different roles awesome brian introduce yourself sure my name is brian olson i'm an advisory solution developer on the servicenow solution innovation team so i write custom apps on top of the servicenow platform for pre-sales demos and things like that pushing the art of the possible for our customers i've been with servicenow for about six and a half years as a in professional services and then now on the pre-sale side as well awesome thanks brian and dale hey thanks andrew dale stubblefield i'm a let's see if i get my hand right solution consultant and an app engine specialist so i've been building custom apps on my arm for a number of years dale's gone high product high production on us yeah like i loved it when i saw it earlier now do the weather forecast if we have a cold front moving in from the north and stephen hey everyone steve jefferson buyer's resolution consultant i'm also on the solution innovation team and you know just thought i'd come and see all y'all shining faces awesome and i'm andrew barnes developer advocate servicenow in the platform business unit uh so uh that's enough intro for me uh so these folks that have joined us uh have been helping our hackathon teams as gurus uh today um and it has been going uh so so fun uh so we kicked off yesterday um uh gosh what 20 hours ago roughly um so let us know if you're watching and you're you're hacking away um you know tell us a little bit about your projects in the chat we'd love to hear about it if you want to come on and join us and join the conversation um you know send us a message let us know um we'll uh get you invited to the zoom um but the the hackathon is ongoing uh it will continue to go until tomorrow uh late into the evening so another i don't know more than 24 hours left um we've got a countdown timer somewhere but i i don't know what it is um and uh so that's great um so people are working let's get some feedback from the gurus on um what kind of questions and interesting things that they've seen so far today and then when we run out of that brad and i'll talk about what we saw last night on from teams one of y'all want to start uh telling us what what what kind of things you've seen today uh thanks andrew we had a few people stopped by the session today uh we got a couple of questions answered on the community so we've got some good activity going um trying to figure out how to strategically talk about the teams without revealing any of the fun stuff they're doing but we have some working on mobile applications uh we did some integration assistance for one team uh to and from our obviously awesome platform to another one and then i had some questions around agent workspace and some of the capabilities there um brian steven is there anything you guys would would add to that no it's just cool seeing what what some of these teams have kind of come up with as far as their ideas i'm you know they're just all over the place and they're all really cool really useful so uh you know obviously we love helping people as much as we can but at the same time it's their ideas and then they're they're awesome so yeah the only thing i'd add to that is is i really like how they're um some people are approaching this from multiple personas saying hey you know this is uh um i guess we're trying to be safe here but you know this is a doctor and uh this is the work they need to do and you know i'm going to try and put it in this user interface for them so i like that there's a sort of user experience side to their uh design of these things yeah and that's really important and it's good that you call out that uh that's useful um so how the users are actually gonna consume uh anything that that's put out by a developer um you know you've got different target audiences when you're building these apps especially in the servicenow platform because a lot of our stuff is task oriented and so you've got the people asking for the tasks and then you got the people fulfilling the tasks and then you've got different personas that are trying to you know manage those people as well so you've got the managers of the task doers um that that need interfaces and experiences and and crafting those different experiences is uh is important to get feedback directly from those types of folks and mentally shift when you're crafting these things to to be acting as that person and the knowledge that they have and and what they really want out of the the thing because uh so sometimes you can get uh requirements and uh or ideas of you know i'd i'd have them do it this way but you know if you slip into their persona you're like i i want to be able to to do you know touch these two things and then be out of here like i want i want to just get the information i need and provide just the bare amount of uh you know interaction that i can to get on to my next thing because i'm not i'm not living in your app all the time every day um if if you're one of the consumer personas right like i'm i came here to ask for my thing and now i want to go away quickly i heard i heard something and and i'm going to steal this from aj on our team uh who's so good at this he describes how certain personas need different uh frequency and depth of accessing things and he describes the mobile as micro uh this is like hey i need to pick this up i need to do this it's frequent it's it's short um you know i may need to consume some information to make a decision but it's very different from uh workspace and you know that's you know i've got my dashboard i've got my widgets i've got my agent assist and everything that's the day-to-day um and so making sure you take those into account i was you know i was happy to see that people were considering those things and what i found in the past watching the hackathon is that a lot of the developers have experience either in that industry or working with people in that industry whether it's airline refueling or patient care or whatever their project has that experience so they can contribute that whereas you know i'm i'm sitting here at servicenow and i haven't really been outside of servicenow for 10 years unless i'm directly interacting with the customer though i love the fact that they're bringing their own experience to that and say hey i've worked with patient care i know what those nurses on the floor need so we're going to build something to make the nurse's life easier and this is what they've asked me for in the past so they incorporate that that whole persona into the end result and that's that's really why we call it an experience because that is their life that is their experience rather than just a user interface as a solution to it so that's i love that your team has hit that a number of times and we cover this in our innovation workshops whether it's uh you know road transportation incidents or whatever if you don't talk to those people and get down to what they're doing with it you may not recognize the buttons are too small or the the it works better with a dark theme than a light theme you know those are those are critical things for for people using that app yeah and and it is it is so um well received when you get different departments who normally don't talk who normally don't interact say like i didn't even know that that was an issue for you now i understand that and i think it's so powerful um you know i i was i was talking to dale earlier today and i was saying you know when when you get these multiple departments talking to one another then they start thinking about hey could these systems talk to one another and i think that's how a lot of companies have have built out you know the way they have is to say oh we haven't talked so we didn't even think about getting our systems to talk and when you get them to have like you were just saying that experience uh you know it's it's very eye-opening for a lot of people and i love the fact how the requirements and that that whole communication thing takes about five times longer than the actual implementation so we have a light beam or a dark theme you know to me it's just one line of css knock yourself out the implementation um is a whole lot shorter the better your requirements are so we spent a lot of time on that and the design decisions that go into those things so yeah absolutely the the development time is really you know on the smaller should be on the smaller end of the you know the the amount of time a thing takes because as you said collecting those those requirements from those those different personas and teams and and driving down to what the actual you know requirement is not what they asked for but what the requirement is uh to to deliver uh you know on whatever solution it is that like that's the that that's where all the magic happens uh you know implementing that um is is so much more straightforward when you don't have to do it 50 50 times because you did it wrong 49 times because you didn't have the right requirements yeah and when you're making those changes right in front of them and they're seeing it and then they say oh well don't we also have to do this and they're like that's not as important as as you think it is this is the thing that's really important yeah i i i really love being sitting in those moments being like oh my gosh yes i love this that minimum lovable product moment they're like stop stop we can make it so much better later i need this now i love that term minimum lovable product so one of the teams have shared a little bit about what they're doing in the chat which is um the world class racking crew is uh working on doing a demand and supply of key items in a crisis making a simple to use for the end users to to deliver those that asset procurement delivery part that sounds awesome leveraging virtual agent uh like in a portal yay that's sounds like they're they're gonna do something interesting with that getting the right things to the right place at the right time is not an easy problem [Laughter] scheduling is is is uh is not a fun thing um have any of y'all ever built a scheduler yes yeah especially in things like last friday of the month oh yeah you you and i chuck could probably spend a whole uh a whole afternoon you know remorsing over building a scheduler then because that is that is painful so you see where you go for someone else's library exactly someone smarter than me has probably done it already let's just use that the first one i built was you know in the 90s though so there wasn't really a whole lot of uh libraries you could just go get that makes sense now nowadays it's oh i need to deal with time zones okay well which language it is there's probably a library for that oh well where javascript is api yes i'll tell you all the things you want to know about that tape i i can now you know import moment.js all right now i can deal with time and time zones yay uh it's so much so much easier to do just because todoist has an awesome text parser and returns it back you could say every third friday and it will tell you what the next date is hey you know good artist copy great art of steel that that is fantastic supreme artists use an api for an api it's like that it's like that darwin picture you know monkey walking man standing up there that's that's the legendary artist right there high five yeah is there an api with an open api spec that i can get to and connect to in under five minutes that does exactly what i want yay let's do that i'm always looking for those um yeah it'll be interesting to see uh what what the the teams are building uh like i'm super looking forward to to getting to the judging stage and and seeing what they've built uh helping them along the way is a lot of fun but i i like to see those those wow moments at the the finished product um especially ones that you you haven't even heard of uh during the the process like they're they're just silently over there working away and then you see the submission and it's like you did that in how long okay wow that's awesome and as things that you know you haven't even thought of uh to to be able to do with servicenow um yeah i'm looking forward to that too because this is my it's my first time judging and uh you know in the back of my mind i'm like oh i'm a math nerd so like how do i am i gonna have to review all of them and then set boundaries and then go back and review them again you know i you're trying to write a [Laughter] yeah i'm nervous and excited at the same time so we'll we'll see but i i hope i gave you enough granularity in the the the judging right you get uh you get uh twenty zero to twenty for each category so i should be that should be plenty granular enough i i received your rubric i did i reviewed it and uh i'm uh i'm i'm still in my head about it so [Laughter] earlier on the uh the stream we uh built the uh the aggregator for the the judge's scores so we were doing a little hacking earlier unscripted hacking which was i need to tally up the judge's scores well let's let's automate that so uh i built it in flow designer but uh i in hindsight i would not have i love flow designer don't be confused flow design is awesome but there are some things uh that it is not yet capable of doing in a very easy manner and uh adding up numbers across records is one of those things right now yeah yeah because there's no scratch space uh there's nowhere to store your summation right uh so you you know you could loop through the records and you could get the values but then you can't and you can add things but you can't add things within you know because you don't have a place to store it so you're looping through and you're changing and but you don't have a any way to to sum them together so i just use glad aggregate it's fine we'll get there oh yeah i mean flow designer continuously adds new things and and makes me happy every time it does the last time we imported an api with open open api it's just it's just so much fun like yeah the the other thing that's fun to watch on the hackathon is is how quickly people have picked up and implemented these skills some of the people i saw in the last year several years before were i've been using the platform for six months and they they're part of this team that cranks out this wonderful stuff how i don't know that i'd be able to do that in six months there there are some folks um leveraging uh the now experience um that are built oh yeah the new one yeah stuff right now and and yeah there isn't six months of history to that so there's no google posts out there you can't just go search and see what's going on stack overflow yeah yeah there's no stack overflow for that right now so anybody doing that is uh you know cut cutting their teeth on the edge there which is great to see um uh we'll we'll uh we'll see some more of those um will be a lot more of that next year uh at the hackathon but yeah and and to my point it's not always the people that have been doing development for 30 years that are jumping into the the workspace stuff you know these these are people who may not even been doing software development a few years ago and they're cutting their teeth on like you say on these new technologies wow i wish i could turn my ship that fast these days yeah like someone who's only been this other stuff yeah on servicenow for three months but has been doing uh you know web component building for the last two years to come over and work on the now now experience uh web component stuff they'll be like oh yeah i know that i speak this language these these are all familiar constructs to me and i opened it up for the first time and and i know brad we're like what does this exactly we just haven't been trained in that stuff i'm familiar with all the words you used i don't know what your sentence means yet yeah right so so that that's always fun that's how i felt with service portal for about the first six months and that's probably how do i be with workspace components for a while yeah and just gotta get my head around it again so um do we want to uh what i think we've covered the the guru perspective um do we want to do some building what do you guys want to do i'm i'm good to do some building um if somebody else wants to do some some building i already did several hours today um i i can do some more i'm a developer i can do some more i can do some more building we will offer the the new guys yeah any you guys wanna dale stephen brian no look look at the shocked faces they're like you want me to do one for that i didn't i didn't i didn't commit to that i'm already cutting into the time where i'm supposed to be doing yard work so i'm on borrowed time as it is yeah so i'm pretty hungry i think it's lunch time for me i was thinking of developing a boss sandwich a unique sandwich sandwich api all right well then then i think we'll we'll let you you find gurus uh go in about your day you've already uh put in some work hours here on saturday helping out these hackathon teams so uh dale brian uh stephen thank you so much uh for joining us thank you for helping the hackathon teams uh absolutely and uh we'll we'll see you in the future good luck everyone thank you guys you all stay well and enjoy thanks we're going to have to come up with a live coating of our sandwich or something the the the the jack we'll call it the full ooh the full stack well that was good chuck that's a you get a gold star on that one that's a good one it'll go with our full our live coding happy hour green drink we're gonna do for the creator uh what what are you uh you look like you have the same beer as uh yesterday brad oh it is i've had the spirit on the show in the past but this is a different one than yesterday oh that was last friday's then summer pills because that's basically that was a week ago right i remember the rainbow colors i i i got some new beers uh yesterday this is a asheville beer so local here to north carolina nice summit highlands brewing in asheville and it's midnight summit it's a vanilla milk style it's a little oh that sounds really good right now like i i wasn't gonna grab anything that heavy i was gonna go like the gaelic ale from the same brewery but when i reached into the thing i pulled it out and i read it and i was like well i don't want to put you back now you're not what i was gonna get yeah because it's a it was a variety case i couldn't put it back i was reaching for a gaelic and uh got us doubt and said nah i'm gonna i'm gonna leave it um who wants to who wants to pull open the servicenow instance and do some bashing up against it do i have anything so we've got we've got a couple of uh questions in the chat we could go through it i think one of them would be pretty good so there's a question that says how do i redirect to service portal from a ui action and that that seems like something we didn't try done from a module ourselves are you looking to open portal like in a separate tab what's the what's the goal here it looks like they want to update a record and then after the record is updated redirect to service portal they're trying to use set redirect url that should work we're just going to put the url director portal page from a ui action set direct is not working on portal uh okay yeah that's a different situation so yeah getting to the portal from a ui action is fine it wouldn't have been too tricky but the getting the ui action to reload the form you're on in portal on portal i i've not done that you wanna i don't i think that portal supports uh the reason now that i'm thinking about that um yeah we could we could take a look at it for sure there's some other questions um one of them is actually let me let's jump into a share i'll share and uh we can start with the first question which is if i'm new to service now how do i get started excellent questions and we happen to have a learning plan that is called new to service now so we'll show that bring it on boss all right i'm gonna share here all right so we should see my developer portal here and all right so this is uh let me uh let me get out of full screen so you guys can see the url bar all right so at developer.servicenow.com uh we have the newly designed developer portal we have our little video here if you haven't watched it uh and you want to find out more about the developer program you can find that there uh but if you want to learn more oh my god that's we haven't played that on the show yet that just released on like thursday i would say all right let's play it it's cool um you're gonna need to share re probably reshare with audio if you're going to do that though brad all right let's let's do what i'm doing and then we'll do that we'll come back to that though yeah so if i go to learn i have some different options here uh we've got uh the overview of of learning but what i'm interested in is this learning plan so we have a lot of learning content on the developer portal and if i go into learning plans so we have some information here and if i scroll down we've got some different learning plans and what the learning plans are is they're basically um just a path that contains a lot of our different training that exists on the on the service or on the developer portal not the service portal uh so we've got uh we have courses and then courses have modules in them and learning plans are made up of multiple courses so one of them is called new to servicenow and this is a great place to get started if you are new to developing on servicenow because it goes through some basics we have some things that are called some elements that are called like navigation and lists and forms that really make up the the basics of the platform and then it really takes you through uh all sorts of uh things that you need to know and service now so this is a great place to get started new to servicenow and then also in the learn menu you can look uh specifically at some of those courses so if you knew you wanted to learn about service portal or scripting you could get in there and then we also have our now learning which is not a not on the developer site but it's our now learning overall and that has you know in-person virtual training self-paced training all sorts of things from our training team and as a plug that's also where we're extending or we're doing our csa certified system administrator training for free i believe it's through june now we had originally we're going to go through march but the current situation has offered us an option to extend that yeah and i'm looking to get csa certified at no cost you can go over to now learning and i i think i saw that uh it was andy ho on twitter said that the course is always free and it's the certification that's free until the end of june good point so so the course will always be free it's the but you can also get certified for free right now all right i got mine so i guess let's pop into an instance and see uh let's see if that works hey uh let's pop into an instance and look at redirecting in the service portal sounds like fun so we're gonna start by going to um going to a form so let's say if we can ask a clarification question to a head first s now uh whose question was uh you know how do you redirect to portal page from the ui action the set redirect url doesn't work on portal but where are you trying to run that is that on a form or on a record producer i'm assuming since it says ui action we're talking about an existing form let's see if we can get a clarification there if you just create a regular ui action is it going to show up automatically on like the normal form form can so let's look at a let's look at an incident here uh this is gonna be the let's find one that has the form uh yeah the form widget do i have no hey not incident well let's let's see if we can open up an incident in the form widget if i remember how to do this is this gonna work gotta get the page in the widget i think the page is called form but we're gonna see it's loading hey hey so just creating i remember some things nice um so we have a save action right now it looks like that is the only thing we have on it yeah incident clearly has more ui actions that would be on the forum at this point um not too many more they have a lot of contextual ones on the incident form there aren't a lot of okay so there's save create outage great problem yeah here's how they can look those are the contextual ones let's use this opening platform hopefully this opens a new tab it did and then uh and i have to have the service portal on the right uh because that's how you that's how you live yeah we have resolve update and delete i have idiosyncrasies about tab order too i i legitimately cannot have the service portal form on the right it will ruin my day so uh we've got uh just the save button here and then here we don't even have a save button save is in the in the interesting context menu let's go look at the ui action list here from incident and see if the configurations there um in from the list view look like maybe there's jumping out yeah it's like a show on uh yeah like show on portal kind of yeah are you using a ui type or something keep going show insert multiple update query workspace and we could do this a whole lot easier if we just googled it but we're we could we're working through the process of how to recreate the solution not just getting the solution let's uh so find the correct save one and then then then we can uh get on board with the uh so you know ui policies have a ui type in them i have a suspicion that this is a i think that's built into the it's a special one let's look so i'm going to control right click and look at this widget in the widget editor and we can see one of my favorite features yeah we can see if that's a that's a thing i know the form widget does have some um some parts of it that you can't see from the instance so hopefully this is not one of them um ng repeat button related primary action submit get ui action there is a footer here i'm going to move back over so the footer let's so i'm also going to go and inspect this and see where on the page we are so it is obviously inside of the panel there's a button but it's it is in the panel footer right yep yeah so it's below the on this all right so let's go back here here's the panel footer yep it should live in there if we're gonna see it if if it's seeable from this so submit trigger action get primary action we're going to keep scrolling save button suffix okay so it is save yeah it is saved all right so this is directly this is a thing that is unique to service portal it is this will not show up on the regular form so i see this other thing though this looks like this looks like it could be what we want was that in an ng repeat uh it did look like it yeah action and get ui actions so we should find where did my actions yeah you want your client's grip back uh oh it's not in data uh where would we get this it looks like it's calling a function called get ui actions i checked the client script wow i haven't done that style of an ng repeat yet i've always done mine out of data yeah me too i guess we can search get button class there it is there we go it is nice so what's it looking for at brad i know that it's really hard on service water stuff could you blow it up just a little bit i can definitely do that and probably kill the server side pane well sir we may need that in a second because it looks like this is digging down into data and server we'll toggle when it is because okay it's just there's so limited real estate doesn't have to see this stuff that's where vs code would help all right so we have our get ui actions um so type okay and there's another scope variable disable ui action so we we may be hitting that so it did pass in a type let's go back and see was a button yes yeah ah all right return scope.data.f ui actions filter and we're going to pass the oh we're not passing that it says it's the action it's not primary not the primary it is a button then use it okay that is crazy condition but we have some buttons right i'm wondering if that first line if the scope dot data dot is the disabled ui actions right there on 60 is hitting us are we falling into oh yeah so where is disable ui action set in the search it says it says true in uh no it says it's going to take it from options oh yes from options i was just seeing the true part and i was like oh it's true okay so so so we have to tell it that we want act we don't want to disable actions so let's check go back to your form and see if the options have it disabled or not all right so okay let's get rid of this and let's look at sections uh this is going to give us yeah we want the instance instance options darn that would have been easy okay so let's uh just uh no we can't do it let's just create a new ui action and tell it to be a form button okay and then we'll call it i am a button i'm a button developer imagination that's all we're going to tell it i think um no rules no conditions form button is a button make it red just for fun oh wait no there was a condition hold on go back there was a condition in the code that said something about primary wasn't it yeah it did say something about being the primary button uh oh that could be a that could be a styling i think that's a styling thing right because the primary gives you green destructive would be red but i thought the condition said it's not primary and it is a yeah i don't know i think it said not primary right all right okay submit it reload it try it out it's worth a shot and you had insert on so it's right kind [Music] we're gonna have to give it a happy face that was easy i am a button so now we have to tell so now we add in uh or we just make um one of the let's make one of the ones that do do or that does a redirect um a form button so go grab one of the ui actions that does a redirect and make it a form button and then we'll move on from there all right so let's uh what are you what are you looking for andrew in the script like redirect or what i think that'll work i but i have to spell redirect right that's part of the i mean that seems unnecessary where's our artificial intelligence it knew what you wanted it's a bunch of them you're looking for the the syntax of action.setredirect url yeah so i wanted a button that that did that already and we're just going to toggle it or a ui action that did that and we're going to make that a button and then we'll try it out uh so how about nine percent of them are probably going to go to current internet state uh well if they're gonna go to current um add url what yeah set redirect url as your filter yeah he's he's got it um i'm guessing create directory change are going to take you to that new record but a lot of them use a glide record is an argument you're looking for something that adds more of a url as an argument i think uh create problem record good work so um no it takes you back to oh it does both it's redirects to problem and return to current oh yeah that's a good one yeah make that a button uh is it gonna show up for us well let's do this create a problem it will show up it will there you go i was going to say turn the context off because you often run into problems if you try to put them in both places so it's going to take us to problems so my theory is that it takes us to the platform view of the problem or it doesn't do anything because we're in service portal wait it did not oh i didn't refresh huh and and that for the folks at home uh is is the right right kind of thing which is determine what you think it's going to do before you press it i think it's i think it i think it will take us to the platform view of the problem i think it's going to take us to either we're going to stay on this record or go to the portal home page i think we're going to hit some kind of crazy like i can't get there so all right here we go you're going to get an error problems created updated the local record and ah we didn't refresh the page um but it did update the page it updated the page you did update the page yep because we have a problem right here it took away the button you can't do that twice okay but it could have done that with uh i mean that's done that was like richard record watcher so uh now we need to dive into how to actually solve the problem we may have to google it uh one of the suggestions from uh the google is and and in this case our google is kalai says uh inject dollar sign location can can we do that from the ui action i think that's the i think so we could hack up widgets and do this pretty easy but i don't think we want to do that we need some way in the ui actually determine are we on a portal page or are we on a standard ui page is there a way to determine which ui you're in so you can do the appropriate redirect would the redirect even work so brad as an experiment let's go down to your i am a button and put an action.set redirect in there that goes to like slash sp to see if we can get us back to the home page can we i portal the portal redirect i think i don't think redirect applies in portal right because this is a this is going to happen on the server and it's going to put something into our navigation stack right right so we're submitting it and whatever we get back is where we're going to go and then in service portal we're not actually like changing you know we're never changing pages we're just getting you know it's the record watchers grabbing some new info right which is collide's suggestion that we got to do this possibly with like a click event or something yeah i think we have to force it to refresh somehow let's uh i'm ready to to search on the community for this so let's go service portal that one might be promising to be nice then i wouldn't have to make a button for every widget i've got oh the one i'm looking at like sets the url in the portal and whoa i don't i'm not yeah but that's not gonna work we're not doing it we're using the standard form widget i wonder i wonder if i would do something like you know we when we clicked it we had some messages pop up i think you could tell the user hey i did i did a thing if you want to go see what happened click this link inside of the info message can we can we put a link in an info message yes yes so what if we try that um i think you're still going to get into the same situation because you're going to if the ui action is used in two different interfaces it's going to go to the wrong place in one of them uh yes you could say uh so we we might want to say let's see let's see if this is doable um i see a problem with that ui action shame on somebody on line six they should have passed an array as the second argument of gs get message they did not you know that's not our problem somebody not following the api properly somehow it worked so let's uh let's play with our button that's an interesting i was just noticing it said look at line five have you ever done that gotten a result out of current.update yes it's a ssrd i've never thought about that i knew that insert returned to society but i never noticed that update did yep yeah cool doing two things at once [Music] anytime i want us this idea usually go for get unique value well i miss it let's go [Music] oh looks like uh the team fixed it the team in the chat what were they fixing uh head first now they fixed it and they told us to check out their app when it's done that that was that was well done yeah you got me it that that was good we should we should check out how you did it that's that's funny i like it making me laugh counts for counts for points right that's that's funny i still want ours to work i do too hilariously i found the high article that says yeah it doesn't redirect doesn't work so i mean the i think the solution is doing something in the widgets um that's the only thing i've seen so far is that you know you pass in uh you know you you need to handle that in the the client scripting of the widget i just this this form widget is just really dangerous to mess with i mean you have to copy it obviously because it's read only but you know this is this is a really you know base widget that drives a lot of service portal stuff so if you copy it and change it you know i think you're you're definitely taking on some risk there so my my idea here is do something like um uh click so this is probably not gonna work but wow so let's just redirect to google all right so i think when we click the button we should get an info message and let's see if it uh renders our html okay it does yeah i've done that before okay so so that's a possible solution there um so we could possibly do something like grab the current location and you know so to detect essentially which service portal we're in and then inject our destination into that same because what you don't want to do is switch which portal they're in because a lot of places have multiple portals and so you'd want to detect which one they're in not necessarily you could you could make your re your um it will stay in the same portal as long as you're in that portal your your redirection can start at the question mark your your relative url can start as far out as question mark like question mark right but the way that he just did that wasn't a relative url it was a it was yeah i was talking about doing it with that method that brad was doing you need to give it the whole path so you don't want to give it the full path if you're going to another another portal page what if we want to go to uh stuck on dev or prod you could just say question mark id equals some other page let's say i think cataloging a request or something that's uh oops this is definitely a cms page but i think it may also be a service portal page look at our list of portal pages i'm a button oh nice so it did before sort of work yeah but it stayed on the right portal it stayed on the right portal so it did work the way you you thought chuck yeah so you guys have fun i do that all the time only i usually do it with you know the dollar location thing the the 404 challenge like i think we need to to load like the the 10 best four or fours into instances for everybody and just rotates through them like you randomly get one of those ten when you get the four or four page like we should do that we should we should make that a share item yes load them up is uh is a randomizer for four or fours and have ten of them in that share item that it'll rotate through to play the different four or four games i'm throwing that in our backlog how are you gonna randomize it because it's tied to the portal record it's a reference field to say where which page would you like to use i'm going to use the 404 page i just load a different like you could have the page that you're referencing rant do the randomizing and then renault okay so you have to write a page that redirects to the random yeah okay the 404 would have to be the randomizer page and then the destination would be the games that would be fun yeah like that'd be fun that's that's the kind of portal thing i would actually do [Laughter] there's a weekend gone [Laughter] that's my level of fun with portals is uh you know making the 404 page more fun like why not so that's that one and that was how to get started that was yeah we did how to get started and then this was the sort of the redirect um so we know it's possible to do it by updating widgets or copying and customizing widgets this was a possible alternative which is not the exact requirement but probably achieves the same or something very similar so i'm going to go ahead and stop sharing here because i need to step away for about 10 minutes yeah because i have i've got meat stuff to do with my smoker so i'll be back all right a little bit a little bit of envy going on here i should probably check on mine but i'll do it uh you know at a different uh periodicity as of brad all right we'll see brad in a bit yep what's next chief so that was fun um so the next thing is we could pick back up where i was working uh before we ended the stream right before we started again which was um creating a file and github via api from our servicenow instance okay how far did you get on that no nowhere essentially like wait where'd you get stuck uh and that we were about to stream and in 40 minutes and uh we we just stopped streaming are you thinking about handling the authentication are you going to do an api key for the app or you're going to do like github companion where you get the user's token um i'll probably start it with the a user's token um but since i'm only going to use one user the whole time we did get that far to decide we didn't want it to be individual users because we're not genericizing this we're doing this for just for us a use case which is we want to create um stub blog entries based off of artifact manager and the reason for that is because right now well the the root reason um and here let me go ahead and share uh because this will make more sense to other like you'll get it because you've seen artifact manager but uh for everybody else because i was trying to think of something similar that i wanted to do like github companion where it has a token per user in in another application i'm working on but i i could not reverse engineer that well enough to say ah that's what we did we need this field on sys user and then the api goes and does this first it was i got wound around the oauth axle again but i'd like to implement that same kind of thing for you know facebook spotify just something that uses oauth 2.0 that says all right i've authenticated andrew whatever he does from here on out is andrew as andrew let's use his his credentials but if chuck logs in he's going to start talking to chuck's twitter account or spot i'm not using twitter because i just can't stand oauth 1.0 i was catching up on a twitch chat so harry over there was giving us some good information on how to do the uh the ui action uh redirect good i should be watching that also and it was hiding behind the youtube one because i made the youtube one bigger because there was so many comments so i hit it my bad um so um i was in the program [Music] yeah so we were in our artifact manager [Music] yeah and uh what was it uh not friday but uh the week before we did the automation for the live stream when uh when a video or live stream is published to youtube we were updating the artifact in our instance even though we're using our incidents to create some of them we're still trying to gather information from what happens at the the source here which is youtube is the authoritative source and so when something happens there we want to just sync it back down and we were having some mismatch so we fixed that and i thought why don't we do the same for the blog because we're managing our blog backlog here and process for the blog but we weren't and we're collecting data from the blog on the views but the way we're doing that right now is based off the published url so here's your article uh from earlier uh last week uh you know like 10 days ago no um more recent than that anyway tuesday i think it was very recently um and it is for example collecting the view count but the way it does that is based off this published url and what i was telling brad earlier is i would like for when a blog gets published for it to update its that field here but in order to do that i need some unique key right to to know that this article here is associated with this part portion of it and let me zoom in on this kind of like a youtube video id yeah okay you've got in that slash post so this is my essentially unique identifier without the slash part there but for this and but i don't have that anywhere in this artifact and when i'm managing this from the backlog um i those they don't uh they don't exist yet um and we typically generate them from the title so when we're creating these we get them from the title usually so i thought to myself well why don't i generate that stub from here so automate the creation of the article stub in our github repository from the artifact entry here in the blog and then i'll know what it is because i'll have created it from here kind of like we do with the youtube right is we create it from here and then that gives us that id and now we can do sync things with it because we have that id um and so that was the thought process was if i'm creating them from here then i'll have them because i'm creating them so i would definitely have them the other option was to and that's like option a option b is to do uh sort of what we're doing with youtube which is we're just retrieving retrieving them all storing them in a separate table than the artifact table and then trying to see if we can match up with one and then that would involve us putting in the id somewhere into the artifact record um so that it could you know sync on those or actually using the titles like and matching them up because when we're managing these in the backlog is not usually the public facing title uh so for example here on yours that is not the public facing title we chose it was this instead and so if we had that title here we could we could sync on that but that's not what we that's not how we do it so we could change the process or we could change the tool um because we're developers you know which way we're gonna go [Laughter] we're probably gonna change the tool because you know i i can manage the the backlog not everything that's in the backlog gets published right and so i don't want to spend time thinking of a nice public-facing name of a thing if it's not ever actually going to get published okay that's that's kind of why i don't want to adjust the process it's because i don't want to spend time on a title on an article i'm never going to write well and once it's published you could always go and get the correct article title right and pump it back in here yeah make it sort of self-corrected you call this you know artichokes and then once it's really published you go oh well that's not the title it's it's it's know before you go so let's update that um i think not in this instance but in [Music] i have github companion in our dev instance already and so um we got into creating a flow um and then we were looking at the github apis and seeing what to do and then i thought when we went on break i was like well why don't i just go look to see how it's done with the github companion because i'm already like um i added some enhancements to github companion um and so i already have uh code here for managing files it's retrieving them for the most part but the the process should be fairly similar and where was i managing that from it's all in script includes i should probably just go to the script included script includes so the github utils is probably in this file you tell one let's see one that is not it all right um yeah so this is the utility to do stuff after it's retrieved maybe it's github client that seemed this is beefy enough to be the right one this is what i was looking for was 350 lines of code not sure what i'm looking for but i know it's big i'm not sure where it's stored but i know it's not a short one because i've i know i've written 50 lines in this in the script included in which i know i'm going to work in and i didn't do the bulk of the commits so um so create files for pull request so github you tells get files so that's local stuff stringify those files parse the diff companion file so that's creating the file locally so that's looping through a retrieved one let's see let's just get our function names and see let's dive in from there we need to collapse all we've i i was just thinking that would be really handy right about now it's just can i get it collapse all that's the token handling that's the part i gotta look at get files pull request i think we were just looking at this one but this this might be the uh the outbound rest message that i need so given an owner a repo and a pull go retrieve that yeah this looks like this looks like what i'm looking for so um that is uh an outbound rest message so rest message brad's back i'm back he's back we looking at uh our artifact manager to get blood we are because uh because that's what we that's what we had in the the hopper yeah [Laughter] it takes too much effort to think of something else to work on so that that was it um so yeah the github endpoint here and we were doing what was that get files for pull requests so we've got uh comment clothes so these are some outbound ones so those will be handy so the posts and patch subscribe the web hooks those might be useful things to do to take a look at so fork repo is probably similar in structure nope there's not even any variables for that one um let's do comment and it says give me a pull request in your comment and then i'll do the the business all right man that's pretty straightforward let's see if we cut anything more complex in here not the token so close pr that one is probably is simple as well right well looks like these are pretty straightforward um these previous ones that that have been built in this companion tools so brad what i was doing was looking at github companion and seeing how we're interacting with the github apis to retrieve files and to you know push back the the pr's in the comments so that i could have some sense of uh you know the structure um for example it you know proved to the point that i didn't need that v3 in the the url because it's just a default um and you know when you've already built a thing just go look at it reading through the apis is not as good as reading through an example in the system you already have for some things um so so that looks pretty okay let's take a look at the let's look at one the structure of one of these that is a put in the script included um this is what's this one's called closed pr let's look for closed pr in here so yeah setting the owner repo pool number sticking the body in the the state in the body all right well it doesn't seem seem too crazy into flow designer we go and i don't know about you um i don't intend on completing this today and i know i'm gonna i need to go check on my meat um actually uh really soon um but uh so i might hand over the reins from a bit in a minute um to someone else all right brad how long do you want to go today for this session we might we might pick up some later but i think we're scheduled for another 45 minutes which sounds sounds fine to me okay i do yeah let's see uh and we were creating an action i don't even think we saved no no we did there it is not that there's anything in here um hilariously we probably have a we do oh nice we've gotta we've got a connection to github already hilariously it doesn't have a base url in there though because it's just a it's just a credential it's not a connection uh well it's marked as both really it's both i'm probably not sharing this pop-up window nope sorry but i was just inspecting that record and it is a connection and and credential type record but no base it didn't fill that out um so if we're going to leverage that we're going to have to add in the base so we've got let's go ahead and do that connection credentials let's make a new one yeah this doesn't even have any credentials stored let's make a new one um blog github yes yes yes i don't know why you don't tell me before i submit you know that trust me nuts tell me before i submit buddy uh why are you angry with me here i'll just i'll just create one it's fine do it the old-fashioned way yeah um this is what are we going to call this blog connection github get connection and then we are going to use the copy it's hard to make typos when you copy paste it's easy to copy mistakes you know you know the number of uh times that typos haven't bitten me because i do a copy and paste it's really high i'm like in my workshop or no in in the hackathon instance one of the things i was building i spelled one of the names wrong never was a problem because i just copied and pasted it every time after that didn't even notice it until like an hour later i'd used it like eight times and they were all spelled exactly the same exactly wrong uh spelling of uh of a word yeah but then you don't get to beat your head against the wall for two hours and then realize that there was a letter missing where's the fun in that where's the fun in that so this is going to be an oauth credential um actually was there a it was there a uh no it'd have been really cool if there was a github type credential there oh you're looking at the credential templates we're not seeing it oh i'm that pop-up window again so i'm just creating a credential um we can hear you clicking though so and waving your harry potter wand around yeah yeah cause the mouse you can see the mouse but you can't see the uh the interaction so um i didn't actually finish the steps for that uh credential um yet but authenticus credentially there's at least something in there now so that we can reference it in flow designer so that we can have the base url oh no reload time no no it was there oh okay all right um we're gonna build this manually that's the resource path we want um i think i closed the uh the github uh create file api github page and i was watching this channel this morning so let's see we've got the parameters we need we definitely need the message the committer message and committer for sure message committer did i spell that right i don't know how to spell words two m's two t's i know how to paste them though and i actually i'm gonna have to make that a complex object right because i need to pass it these yeah and then the content is going to be separate okay so i need to create a uh a pre-step to get that it's not a payload builder because i'm not building a payload so it'll just be a script step i guess create objects for rest step so the first thing we need to do is create our committer object i guess we want something like this over here all right uh y'all help me out today i'm feeling not the brightest so any uh feedback on on this stuff let me know so we need to in our committer we need do we want committer to be an object curlies curlies i was like yes i wanted to be an object what do you mean yes it's definitely an object thank you for the uh notification that you weren't feeling too bright you get a pass on that one that was that was well timed right i said that right before [Laughter] right before me needing the uh the system like yeah of course it's an object lay that off like you were you were just yeah that was an example right like that was planned so what do you want to set for the values of name and email ah that's a really common question um we do the instance what do you mean the the name be the instance like the actual url of the instance yeah like so this name and email this is just gonna show up in the commit right it doesn't actually have to be like it's not what we're authenticating with necessarily it could be servicenow dev program something generic every time or do you want it to be the author or so i guess does it need to be like an actual github i'm not sure i'm not sure if it is required or not or if it'll just be happy with the token yeah i'm not sure if you're if when you try and commit it does it check whether that's you or not or or just a like a github account in general right like does it have to be that would that would be even worse right than random acceptance of a string as saying that it was someone else who did this would be that doesn't seem like github would allow that i i do email headers all the time that's email should we make it the just the service no dev program yeah let's do that for now right we'll just put the uh the dev programs name um in their service now dev program yeah with m and switch over to so how do i that's an org not a user in your profile ah whatever i'm gonna send it me for now okay that's that's what we're gonna do for now is we're gonna is we want it to be me you're in charge [Music] uh and i don't know which email that is with that is that i think is the it seemed like the name was a like display type name right because it had a space in it it was oh yeah it would be andrew space barnes oh yeah that makes sense i'm looking for what my email is for my account because i have no idea what it is hey i just received a bow tie from amazon nice you're running low [Music] all right and that window can come back now and we'll throw that in there and we'll say this is yeah see i'm struggling to spell my name right that is a bad day it might be time for me to take a break let's just spell my own name wrong here all right so i want committer uh to contain name and email yeah so take out line six so we just get rid of line six right up to that first one and then we added with a semicolon here now he's in the groove and uh what else object-wise do we need for this thing output doesn't look like we need much yeah else how was your file getting base64 encoded yeah that's the next problem i was avoiding that one so far and and does it need contents as the other do we need does it need to have any contents well content is this 64 like that is the that's your file right yeah i mean i i guess can we just create an empty index.html oh um yes i mean that's my plan is to create an empty one but we'd still need to base encode the empty file we need index.js empty file encoded right so so because we're not passing like a file name anywhere yeah it's just the whole thing is base64 encoded right so i've got the file name and the content in the guide i wonder if they have an example i like examples there's the off part which is very handy so there's some libraries to invoke their things libraries are great when you can import libraries i mean we technically can but it's probably overkill for what we need all right so no that's not handy all right so back to the page we were on so now we need to uh that's that's fine for now and we'll just consume that here uh you didn't make any inputs or outputs yet oh it gets me every time with this christmas thing like every every time outputs and you are an object um i don't think i care that it's an object like if i if i just pass a string at the object into a string will that stringify it i don't know yeah or or will it throw an error because the right doesn't match because i don't actually need an object over here i just need it you know like a string in the form of an object and you go down there buddy yeah you go down there can't move it gotta delete and do it again yeah i'm just trying to copy real estate you can copy it actually yeah i think you can you can um you can copy it i think you have to click outside of it this listen to me little box i can copy you all right well you have to somehow click it like you just use the arrow keys i know in the like the fields that accept multiple data pills you can definitely copy data pills from within those but this may only accept one yeah this only accepts one i don't think those are copyable i know that because i i did andrew's creatorcon lab that has lots of data pills and one of them i was like i don't want to do this again can i copy it and you totally can because those are drilling way in okay it's annoying on the data panel it's less annoying with the data pill picker but it's still annoying that's a that's a really good idea um megahertz there usually what we're trying to do is is in the description um but we could definitely add in a text box that says like what our current to-do tasks are like the overall goal and the test the tasks and we could keep that hovered in like the top left of what we're doing like we we could do that yeah that's a great point um and and i try and circle back around on what we're doing at points but yeah like that that's wonderful suggestion and we should we should and we will just totally do that not not this second but we will we will add that in maybe by the the next stream tomorrow uh i will have that added to our our setup kind of like a lower thirds yeah like just a little uh like a little todoist box like what you know you'd have to be what our goal is on there the placement is going to be interesting but we can get into that later yeah i'll probably just put in the top left in obs just because usually we're we're not using that space very effectively anyway um the next thing to do is to go look at the uh servicenow apis and for uh encoding a file so that's that's the next step um i really do need uh to go take a break though um why don't brad you share the screen and pull open the the api docs on um encoding because we definitely have several um of those available and walk us through that real quick and then pick me back up in in like five minutes when i come back as soon as i can figure out how to stop sharing it is a bad day there it is it wasn't in its usual spot i moved mine around too because it gets in the way all right i think now i am sharing yes did you share with audio we want to see that video i did not share with audio um so i guess i'll i'll reiterate what uh what we're trying to do dev portal dev this is this is the wrong instance what i mean to be in is dev program dev um yeah so what we're trying to do is uh we have uh sorry i'm i'm confused as to why i didn't autolog man uh we have our developer blog so let's let's just start back from uh from the beginning here right so we've got our developer blog uh that's hosted on the developer site but we it's kind of a custom built thing by developer advocates and we you know we we do some local building and then we deploy and it builds itself and deploys to this instance and we also manage in something we call artifact manager which is just a servicenow service now app we have built in one of our dev program instances uh we manage basically any content that we're going to create so it could be uh this stream exists and artifact manager blogs exist videos that we're going to create a lot of you know chuck's stuff that he does exists in there you know blogs and i'm going to write so it's just a way for us to track you know this is what we're working on here's when we're going to publish it and this is how it's going to get published and so with our live stream so we actually have a lot of automation going on where i create a live stream artifact and an artifact manager and i set it to a certain state and then it goes into youtube and creates the you know the future event for our live stream and then it comes back and updates an artifact manager and we want to do something similar with the blog because right now there's no automation and linking up our blog artifacts and artifact manager and our blogs that we write and deploy um so what we're wanting to do is because our blog is deployed through git so we um we you know do it locally and then deploy to get and then that gets deployed into the instance uh we want to have our artifact manager create basically our stub articles for us and then that's a unique link that can link our um our github blog with our artifact and artifact manager so that's basically what we're trying to do here is we're getting from our artifact manager in a servicenow instance and we're trying to create a a directory and a file in github and so we have the first little part of that done and it looks like uh github's api wants us to base 64 in code uh a a file that we can send it i think i covered everything does that sound right check yep all right uh start and where do you want to start slicing this thing uh so right now we need to get some sort of base64 encoded file and send it and i thought we could take thought we could base64 encode things we have an api for that yes well let's use it often andrew's back already i figured that explanation would cover it all right i just gave a really long-winded explanation on what we're trying to do here sweet oh look at that john and then i googled this nice john's awesome yes and now my puppy is barking um glidestring util i'm not scared of global scope no it's just annoying when you're you know yeah when you're in a scoped app and you try and do something not today that's where we create a a pass through script global scripting so um yeah i was just for a string when i went down um well so the first thing is if we're doing the we've got a couple of things here and we don't have to be super generic um so if we're going to uh just pretend like it's a file we could just craft the string that we're going to then encode that will equate to our file in the other case if we're going to actually grab like a servicenow attachment we'll have to look up that attachment then convert the attachment from how it's stored into and and will probably uh well if we were doing an external system like i would uh you know get a data streamer for that we're we're not going to do that because we're we're generate we really just want to generate a file out of thin air and and yeah and the only the only thing that is unique to every time we do this is really the directory that the file lives in right so the file itself like never is just needs to be an empty index.html file so potentially potentially what we could do is just create one of these files locally so just create one in our repo locally and then do that commit and like intercept that like look to see what that is doing when you say look to see what that is doing whatever you can either either ch change the connection or hmm i mean yeah i was thinking about doing something like a b ceptor in the middle but that's a little bit of a pain i wonder if we get i wonder if you can inspect the what the command you know like if you run it locally um just from the command line not from one of the tools if you can see what the what that's sending how about we inspect the network packet when we upload a file to github in the browser oh in the browser hmm because we'll have access to the network you know we could debug that and look at the the the packet we sent right that's one way i feel like i'm over complicating this no it it feels like it should be really simple to is the sound is the file an attachment or is the file coming from somewhere where are we getting this file we really would just like to create it okay we want to create an empty index.html file that sounds pretty static to me and the only thing that we care about is that we want to change what the directory is because that's what we're after is yeah directory on github yes yeah okay sounds like a parameter are you talking about the the the directory or the repo the direct directory okay so we're gonna have like this repo of articles yes and we're gonna say this one goes in the april 2020 article a folder this one goes in the may 2020 you're going to have them structured in some way where is that information coming from and so the way that that the way git stores the directory information is only in relation to the files that are in it like you don't create a folder in a repo okay you send it you create a file that's in a folder right and and then you can then when you commit that file um gotcha uh yep yep yep store the stores for the whole commit process that it creates whatever it does over there that looks like it's in a folder [Music] and i mean it is it is a folder it just doesn't do anything with folders until there's stuff in them gotcha um trying to think what achievable thing we could actually get done it was easy until you got to the folder piece um i might just do a little little googling real quick um i'm gonna bring up this glidestring util on developer while we're doing that okay is it still there and is it darkness all right scope and global well let's look at it it's the same in both dot to underbar i guess that's useful no i used to regex myself but okay quotes escape for home page escape html good to know [Music] dicks shouldn't i have a yes it'll be down there you gotta scroll for it ah there we go is base 64. nice i want to go to base64 okay what was the method that was called in john's article oh i did not do a basic a64 and code could you see that in the list i did not hmm [Music] shocking community community 2017 [Music] servicenow docs dot read the docs dot io let's see glidesys attachment input stream uh oh packages oh boy and that was five months ago i mean there's a couple of places packages is still useful yeah notice how he's calling glide string util though he did a new instantiated what we use it for uh at the very end base64 and code well i mean should we just uh john's was a straight up call though it wasn't instantiated it didn't i thought it was uh yeah oh yeah okay one of these two is wonky should we see if this works sure why not go to scripps background throw it and see what happens it could very well be that it is there just not documented today how how horrible do you want this to be brad that is such a scary question what do you mean how would you like to die um so the path that we're setting so path is a parameter that we've already got in our flow um pull up pull open the dev program dev if you don't mind all right let me uh take it over here and log in oh man and the reason that i say how horrible is because i don't actually care what's in the index file i don't even care that there is an index file i don't care if i send a valid base64 file at all it's true all we want is the directory all i want is the directory and i assume this might be an unreasonable assumption but i think it might be reasonable is i just set the path that i want it to be and then i send it a content string you know base64 random string that i put in there or i could even get a valid like i could generate a one-time string uh that just creates a index so the the thing i wasn't sure of is where it uh where it's getting the path from and it's because that's a parameter and i believe if you pull open the flow i that we was already setting that up did you publish the flow no and it's an action not a yeah so all i need in my rest app is to set the path which uh is in the resource path up there i've got the variable for path but i haven't set it in the parameters yet but if i set the path to be what i want then i could just send over any old anything for the the content like we could just send uh john anderson's name as base64 here yes all right like i think that'll work actually okay so so we need to set a parameter for path and then we need to uh uh set the we need to add a new it was the content it's a it's actually in the resource path is the path right that we need to put the content i was i was thinking about what that object looked like we had a message we had a committer that was a two-part object and then we had content itself yeah that seems like a lot to put in a query parameter and so in the resource path we we're just going to put a data pill that's going to come either from our inputs or from our script all right so we need an output what is this for so this is going to be coming from uh this is probably coming from inputs is is most likely where we're going to do the path which is going to be the a path eyes version of the title of the record that we are dealing with right so yes so this would come from the artifact so we come from the artifact and we don't care about file name we just care about the path so should we change this to file path yeah and then that becomes our data pill for um putting into the rest down where do we go you want it mandatory probably that seems reasonable and then i messed this up nice and then in our rest step pull out the end of after contents and replace it with the data pill and we're also going to need to give it the repo at some point but we don't have to do that the second all right and then in the query parameters we now need to no it's not the query parameters this is going to be the it's the the body is content content is going to be in the body and we can just build craft that directly right we don't yes good constructor or anything like doesn't matter right we legit just need what content colon and then paste in your your uh encoded string with quotes and now i think we're getting eerily close to needing to get like credentials [Laughter] and trying this out but i think this will work and if we need to you know generate a file and then encode it like i don't we can just get you know i can do that with it web utility is dropping up empty index dot file and get its encoding and just plop it in here since i don't actually care what's in there yeah i guess the the goal of this is to create it our unique connector right from our artifact to github all right well we do need we will need to pass owner and repo committer yeah right uh so we do sorry i was answering a question for the hackathon this is the hackathon stream so that's right it came first um so we do need to get um so we know which repo it is so you can go ahead and just fill that in directly right so oh yeah it's uh i don't try to remember it that seems reasonable well i remember but it's servicenow dip program uh so here is the i've got it right here am i on the right track yeah i've messaged you the exact thing so you can pull out the right parts i believe that is what i typed or do we need the tree production andrew do we need the tree production content post um pieces of the url those are gonna be we gotta tell it where to free production so that the production is a branch and it's not the default branch so you that's set via parameter for github i don't think we can set it in the resource path i think we have to pass that as a parameter um yeah so that's going to be branch branch and string in the parameters there um so how do we tell it to go into the post the directory that's going to be part of the path right okay so that'll go before our file path data pill so how do how does this look should we give it a message um absolutely crap post message [Laughter] wonderful glorious message uh and then i'm gonna have to if we're gonna test this i'm gonna have to get credentials in there for this but i think this is actually pretty close to what we need now like this is this is this is close let me go see if i can quickly get some oauth credentials in here for you all right i am logged in i'm logged in there so let's get you can just read him the client secret absolutely yes please i'll just shift is an l or a one i can't tell you guys wanna see uh how my uh my smoke is going absolutely i'm gonna i'm gonna post a couple of pictures of mine right now in a moment when we're done with the stream this is my public link if anybody wants to check on my portfolio nice throughout the day beautiful oh you got a significant little dip in there that was when you went and checked it huh it is my fire was almost out uh and i went and checked and then i added some more stuff so i had it open for a while so i may need to add another uh another log here yeah you're you're you're trending downwards there yeah i just i like i tried just trying to be in between these two uh dotted lines here 200 and 250. okay so um let's go back so we created our object and assigned it to an output and we are referencing that in this committer parameter should we give it some outputs it'd be nice what are you thinking there we go let's give it a all right i'm almost there with the access we're just playing with outputs that's fine oh and we just ran out of time please deposit another 25 seconds to continue your stream that's a throwback for you kids who haven't used pay phones [Laughter] that was my first job out of college writing software to communicate with pay telephones oh wow yeah oddly enough the product was called smartphone back in the 80s it's all relative right that was the kiss of death if you named anything smart anything the product was just a pain in the butt yeah that's a that's not under promising and over delivering she was pretty fun okay i came in on the second gen product so they knew everything that was broken i have a token let's look at it but it doesn't think it's valid why don't you think my token is valid when i look at the token the token thinks it's valid chuck never paid for it jack never paid for a call on the pay phone the last one i saw was about 2006 2007 out in the field i showed my kids they were pretty young at the time like look kids that's the product that got daddy's first job they picked it up i thought it was a novelty so we got a question what is it that we're working on right now [Music] flow designer i'll try to sum it up we are working on some automation for the dev program where we use our artifact manager which is just a servicenow app where we manage content that different people in the dev program are working on blogs live streams videos all sorts of things and we are looking to create a uh directory and file in github from that servicenow app in the instance uh because that's that'll be its unique identifier to identify our blog posts so the reason the screen is static right now is because we're uh android working in the scene work through oauth without having to flip back in between uh privacy and not privacy yeah and and also getting it working you know getting it working part all right why so we uh let's do this just as a quick recap we are we've got a script action action step where we are creating this committer object and then out outputting it then in our rest step we have a few things going on but we are consuming that committer object as one of our correct query parameters that we're going to pass github we are using their api to pass into our blog repo for the dev program and then we are you know giving a message we're going to do it this in the production branch i guess because that's how we roll and we had to pass it some sort of content here so right now we're working on authentication all right you there go here you there go here i'll be right back give me a sec okay so this is our our own little mini hackathon we have going today we've done a few different things but right now we're just trying to add some automation that's going to help us out a little bit so we are i think we're about halfway through the hackathon it feels about right we've got maybe 34 hours left so maybe not quite halfway through yet more than a third of the way through not a ton of questions so far after all the login things that we got through but lots of plug-in activations a lot of a lot of teams are wanting to leverage a lot of the mobile capabilities which is exciting all right let's try this one more time connections and credentials aliases yeah i'm not succeeding at getting my token to be happy i'm probably gonna have to turn off two factor and smack it around a bit uh um okay so let's stop share and do a little wrap up uh and then when we come back um i'll have the token ready i'm back you're welcome all right well i will stop share here all right let's switch the screen just a teeny bit all right so um what we were working on as brad said is doing some some automation between our instance and github we have a weird requirement where we want to create some folders and but we don't care what's in them [Laughter] um and i think we're like really close other than getting my i got close on the the token but it it's like eight screens and one thing is wrong somewhere so i've got a valid i've got a valid refresh token but i can't get a valid like access token for some reason so i'm doing something wrong uh but i'm close on getting that uh so i'll finish that up and and get us uh access and then we'll be able to uh when we come back uh the next show we do um we'll be able to uh try out what we built um and see if it works um i'll also look at to see which like just encoding you know base64 encoding a uh index uh what is it is is it even index html or is it indexed like j is an index html you're thinking components are index js yeah i was thinking components i'm like those are index js right i was even further back in the process thinking about down that's that's another good one oh wait they may be markdown i think it's index yeah we but i don't believe they're marked oh it isn't i think it is markdown we were all wrong wait where chuck is the winner then yeah i've written two articles come on we're we're in there all the time we don't uh we don't look at the it's they're auto generated for us it's not like i ever have to type dot md but yeah you're right it is index id it is md um which makes sense because it's doing you know markdown formatting and syntax checking for me and the way it knows to do that is it's an md file i should have gotten there myself um thank you chuck we would have figured it out sooner or later so so what i was saying is i might just take that through an encoder um you know just smack it in a utility real quick and not worry about the servicenow part of it because we don't actually care what's in that file yeah but so i'll just get a templated one that just says you know you you definitely need to replace me and draft is true and uh [Laughter] and encode that and then then we can have it statically in there because it it doesn't need to be adjusted so i think we're close on that well thank you guys that was so much fun um and uh if you're out there doing the hackathon um and you were following along i hope your endeavor is is uh is going even better than ours is um because uh you know ours is mostly for fun like it's a little annoying to paste in the the url for the blogs but it is of the things that we have needed to automate it is so far down the list it's it's it's not even uh like the the sprinkle of salt on the top of the finish like it's it is it is complete fluff at this point it's like sprinkling uh uh glitter on top of it like it it's it's just there for show at this point uh but that was good um and i'll walk through the uh the oauth bits um once i don't have once am i trying to put in client secrets and things onto the screen because if i have to reset my github uh like 20 things will break and i will be very sad uh so we're going to keep that off the stream thanks everybody thank you chuck thank you brad and thank you all of you hackathon participants out there who are watching this live and if you're here later uh you you'll get to see who won the hackathon uh which will be even more exciting have a great weekend we'll see you tomorrow

View original source

https://www.youtube.com/watch?v=xARWoV938Us