logo

NJP

Leveraging REST API Trigger - Live Coding Happy Hour for 2021-02-05

Import · Feb 06, 2021 · video

[Music] so [Music] do [Music] hello and welcome to a very special edition of live coding happy hour on friday february 5th we're going to continue our dive into quebec features on this show looking at the rest api triggers but before that we have some introductions we've got a special show today where we have the original developer advocate team along with the current developer advocate team so let's go ahead and get started with introductions josh hi uh so i'm josh nerius i'm a product manager here in the platform business unit at servicenow my focus is integration hub and other integration capabilities and like brad mentioned i also was a developer advocate here a while back so i'm happy to be back it's always good to be on live coding happy hour hey i'm dave slusher uh along with josh we founded this this uh endeavor here um i am now uh uh a software engineer on the integration hub team where i do similar work focused on the demonstrability and the enablement uh around integra integration hub and its features and that is it's the same kind of job on exactly instead of the whole platform one tiny slice of it so uh there's a certain um uh purity to that who's next was it me or you andrew i forgot it's clearly you okay clearly if the yellow box is around my zoom thing i'm talking my name is chuck tomasi senior developer advocate at service now as a customer for a couple of years been at the company for about 10 and a half and enjoying all of it i focus in platform custom apps integrations and pump out content like nobody's business well that's that's definitely a true statement i'm andrew barnes developer advocate here at servicenow um and i have been a customer implementation partner and have been in this role for about two and a half years uh you know creating content and you know providing feedback to product managers like josh on what developers will we are looking for uh from their tools and i just love hanging out with you guys and my name is brad tilton and i am also a developer advocate i've been developing on the platform for around 12 years i've been an employee for the last four and doing this specific role for the last one almost one year almost one year i think we're coming up on it so that's exciting um so yeah thanks uh thanks everybody for being here one of the other things we do is we drink a beverage during our show and then we rate it at the end so we're going to introduce our beverages in the same order here i guess that means i'm up again so i have something i've never tried before well uh we'll see if it shows up it is a dylaner vice which is a berliner vice with dill of a collaboration with public and quality meats here in chicago from mars community brewing so we'll see a little dill as in pickles as in dill pickles yes and those are pickles on on the front which are getting caught by the green screen ish thing here anyway we'll see how it goes i'm gonna have the same problem i uh uh don't have a deep bench uh here most of my fridge is a kirkland brand costco beer so i'm going for a sweetwater 420 one of my old favorites it is as i've said the uh it is effectively the light of the craft beer world but a nice atlanta brew i used to drive right by this area long before this place existed so there you go sweetwater 420. that's a staple at dragoncon man i can't tell you how many of those i put down at dragoncon that's the home team right there yeah i don't have any beer worth mentioning in my fridge that i haven't already mentioned the last six or seven episodes so i mixed it up and literally mixed up a margarita so nice and i have got a a new one for me it's a drive through ale uh drive through red uh so it's a red ale uh and i couldn't read uh who brewed it so because you know probably need some glasses i got a glass right here full of margarita so i've got a french press it is an imperial coffee porter aged in bourbon barrels of course uh from st arnold brewery in houston i've never had this before and i'm excited to try it red gets my vote for tastiest sounding beer we'll see which is not unusual no he's always got like the porters and the stouts with the coffee and the chocolate and the oh man it's like dessert time it is i have a really good beer store close to me that has all sorts of things so it's fun all right well i'm excited about today's show we're going to get into i think one of my favorite quebec features uh when we look at our rest api triggers but i'm going to hand it off to andrew to tell us what we're going to be doing today yeah so when i was looking at the new features um in integration hub and flow designer over the past uh you know couple of weeks so last week i was focusing on flow designer and this week specifically an integration hub uh you know we have previously uh you know had to on the show uh build uh scripted rest apis and then pair those up with flows to you know provide the data in interaction with the servicenow instance and to see it uh you know as a feature for a trigger directly in uh flow designer i was like well that's what i want to show on the on the show this week like that one really resonated with me and i was like i want to do that one so that's what we're going to do today is we're going to the use case we've got is i want to be able to um from anywhere but my initial goal is from slack i want to be able to in initiate one of our if you've been on the show before uh we've got an app called artifact manager that we manage uh things like this show on and i want to be able to create from slack an artifact from a template and the special thing that i want is i want to get back not just the artifact that was created but we've recently added in some tasking and i want to get back those subtasks that i might need to go do something with um as a result of that especially if i don't know what those are like which i might not since they're all new and you know this is a newer process to us so that's why i can't just initiate a table uh call is because i want to i want to return you know a custom payload of more than one table back so that's that's why i'm going to use uh this method so any questions before we dive in how do you envision presenting those subtasks in i mean we went i get to this today but when you see them in slack is it just gonna be a bunch of cards or what do you think yeah i i i thought about that and i was like we're definitely not gonna get there so i stopped thinking about it okay fair enough let's get the payload first um good call but since you asked about it um you know really i just want a way to see if i have something for me to do okay like um how that it presents is not as important as whether or not i just know that there is a subtask and like i have a link to click it to to like do it um because i don't want to see tasks that aren't for me that i don't need to do anything with i want ones that you know is a task for andrew to do this almost feels like the command line thing too where we're going in through a rest api and can get back some results too ooh we [Laughter] you've got your next lch all lined up um but yeah so if you haven't seen it there is a new uh command line interface and with that it is extensible so you can create new commands in servicenow and they're available directly in the cli so that's a really cool feature and this is kind of like that like we're providing a command for an endpoint um that's you know created from within servicenow so they're they're a little bit similar so that's cool all right uh so i will start the screen share and we will get rolling then share desktop one all right so let me close a couple of windows i had a backup instance in case uh this one didn't work so here we are in our friend flow designer um and this is a quebec instance so we're still in the early access period of quebec uh so you know if you were here last week you may have noticed that we ran into a couple of bugs and uh i will uh update the uh i forgot to update the description but i did find out that one of those bugs was known and already solved um i just didn't have that latest build and the other one uh is i believe already fixed now after reporting it so um early access means there's bugs and well that's part of part of the deal so hopefully we don't run into too many today but uh that is just what happens in patch 0. so i'm going to create an artifact and we're going to select artifact manager and triggered to send artifact new flow in case you missed it and yeah i hit new flow so we're creating a brand new flow yeah new new ui cleanup too oh yes the the there is a new ui in flow design which we showed off a little bit last week if you were here um but we'll be able to explore even more this week trigger to send artifact and hey josh this is the question for you when you run as the user who initiates session for this for a scripted rest are you running as the integration user who or who is the user who integrate who initiates this session in a in this trigger that's a fantastic question that i was not prepared to answer but i believe i believe it's exactly what you said but i will defer that to further validation he said or he didn't give you exactly uh oh error do we have one called that well so i created a one already uh just to validate that things were working i had some trouble installing the trigger and it saved automatically that was new i don't know if y'all have noticed that but when you create your flows now it's auto saving them with quebec i don't believe that was a paris feature so i don't remember but i remember getting told hey this already exists a couple of times so i've noticed that in quebec now that uh there you know when you hit new and when you hit submit it actually saves it so it it's done it's created it at that point no which should make brad happy saved it for you something something to think about as we create more flows is i have actions and flows and whatnot that have somewhat ambiguous names um it dawned on me when i was creating a data stream that i called it something like uh you know get some records it was it was less generic than that but then i went back and refactored my code and i went oh i don't need a data stream i can use just a regular rest action and i use get some records and i i like to put like on my data streams dash ds so i can tell it's a data stream versus a regular action and and maybe this is a case where the flow might indicate some kind of trigger now it's already been named and saved as you know create underscore artifacts but you could put you know dash rest or something to indicate what the trigger is i'm just saying that yeah there's it can be confusing as you start building out a library of these things go now which one was the straight up lookup records with a glide record which one was the one that did a data stream which was the one to get at rest so something to think about is your naming standards as you start to create more and more of these things yeah in fact that's something um that i have i've had the same use case chuck um and it's it's almost something to me that belongs like yes what type of trigger it is and to that point that is something that you know we're thinking about for sure the other thing that you could do in the short term is we also have categories so you can start to build say you're building a spoke and you won't have a bunch of data streams you could put those into a data stream category within the spoke and while you may not have the immediate you know just by glancing at the name you know it's a data stream at least while you're navigating you can find it easier but but definitely i think uh this is an area where you know we can uh keep thinking about and i almost feel that's i almost feel that's a uh i have to say this right a twisted use of the categories because the categories are generally you know if i'm doing something with youtube i might have a number of actions for playlists i might have a number of actions for um channel or video or list or you know kind of categorize them based on the api category um yeah and and so that's probably not universal guidance i think that's a fair point too and it's just going to depend on your use case at the moment yep okay good idea while y'all were doing that sidebar i was checking to see if there was any way for me to like get some form of trigger type and there just isn't at the top level flow a field that contains that sort of data megahertz prayer says yeah in our instance where we're making content for our flow integration hub training i see loads of copy of copy of flow that does acts [Laughter] so what are we seeing this looks pretty cool yeah so we've got this brand new trigger type so in order to have this trigger you need to have a certain level of uh flow designer or integration hub which i think is the professional level in the broader enterprise i think it's pro or enterprise but there is a so you need to be on quebec and you need to have uh the integration hub uh level that will make this uh available um but i do have that and so it is available for me here and you can see this is very different than any of our other trigger types there's there's all sorts of new things that we haven't seen here before and but they're very familiar if you have created scripted rest apis before so right off the bat you see oh well which method are we going to support here and we're we're going to do a post most likely and we've got a path so this is uh you know an auto-generated path for us based off of you know api our scope name and then our flow's name and then we can add on top of that we've got a little check box for authentication then we've got requires roles which more security more security which is another another thing pulled straight from script addressed api um i don't think we need that here for us but that is available and so i have only glanced at this previously uh so this is uh yeah as usual uh i have not uh successfully done one of these yet so this this will be all this will be new so which is great with with josh and dave here it has to work absolutely i'm gonna tell you andrew you're one glance ahead of me and i have a confession to make which is chris malloy who can't be with us today this is his baby and so just wanna you know shout out to him and his his dev teams as well and so chris malloy is a another product manager uh in the integration hub area and he um is in fact uh you know handles uh the the teams that generate all of the wonderful spokes that we have in the store uh so we like chris uh they they generated what 130 spokes last year um that are now available on the store yep that was that was a big lift yeah they they are killing it and it's been good stuff uh in fact we're we're uh chuck and i were talking earlier today about this uh you know we're converting a bunch of the youtube um so we've got we've got josh youtube stuff we've got dave's youtube stuff uh that we're all scripted and then we've got my youtube spoke that i created and then brad started working on that with me and now there is a store youtube uh and over the weekend my project is to uplift all of those that we can to the uh the stores uh youtube spoke um so uh let's continue looking at this uh scripted rest api uh so we've got some other familiar things here we've got you know a body object here so we can we can add new uh fields here in the request area under the body i don't know that i need any of those yet and then we've got this whole parameters area so we can specify path parameters that are going to come up here to the top i assume and then query parameters and headers that we can add here and we're going to need some of these in order to ingest the information we need from the end point to create the records that we need so but for now i'm going to say done and hit save because i like to hit save and now we'll add some in but let's take a look at one of our records to make sure we know what we need and i might actually need to drop over into another instance uh but because this isn't the newest version of our artifacts so i don't think we have the templating here but chuck you can probably walk me through it anyway without uh needing the records themselves and you want to make a task template uh i want to uh so the artifacts now have uh you know a templating process right and so when i generate an artifact of a particular type it can generate things like tasks for me um and i don't think that that is in this instance directly because it's this is a little bit of an old version of the app um but what field triggers that or is that a it's a it's a ui action at this point okay so um that will so that ui action is calling some other scripting so we can simulate that for this purpose so we've got different types and so uh you know type will be one of the things we need to send over unless the template does the template contain type probably not because you create the object you create the artifact first and then apply the template yes so we'll need to we'll need to accept the type uh from the user um and then uh you know we might need we probably don't need a short description uh what else do we need what do you for sure need when you create a record brad you've been quiet i mean i think you do want a short description i think you do want a short description um well for example my template so my old style template for a live code auto puts a short description in for me okay so you're going to create from template yeah so i want to i potentially want to create from a template gotcha that's what my goal was um so when i do this for example yep this is a bunch of stuff for free i get all this stuff for free um and i just need to go change a couple of things and so i mean if you could supply the date that would be nice because there's a bunch of different places that i definitely want to supply the date the plan published the date yep the plan publish date and then um maybe i'm going to assume it's assigned to the person who generates it because they're at least responsible to go make it not them you created the thing go at least say you're not no longer in charge of it you can just assign them all to check ooh no no he is the man who generates all the content like a robot uh and i think i think that might be enough to get me rolling is just the the the planned publish date the type and um which template i want to invoke yeah so let's start with that so uh over here let's see where we should put this uh path parameters let's create a new one type if it's a post why wouldn't you put that in the body um we certainly can it's the only the age-old question yeah which which place do you want it i prefer to keep my urls short but you know if you don't necessarily want to pass the body i think string is fine i will say the one good thing about doing it in the body is that it makes it a lot easier to start just adding arbitrary additional stuff later because you can always just add more uh more fields and it just continues to go yeah here's some stuff you don't have to use it and and for for anyone who's watching along what's happening here is this is really defining what will this you know what should the color pass to this flow but then using these controls to do it in such a way that these are attributes that you can easily access in the data pane like you could in any other flow and andrew we'll get to that in a minute we don't have a date no date type object available well yeah that makes sense because somebody doesn't really understand a date it only understands strings yeah and that's just that it's just json so you yep that makes sense so i need type template plain publish date and uh your template that's going to be a string i mean is it going to be a sys id you're passing or is it going to be so which so when i was thinking about uh how to invoke it before your templating process i was going to look up the template in the template table and grab that you know from the servicenow template types and so that was just going to be a name done simple lookup does that align with how your templating works too yeah mine creates task templates based on the type categories really any condition field it says does this record match any of these task templates if so i have five or 12 or whatever many template tasks that will be instantiated on that object and you get a related list of five 10 or 12 tasks okay so that looks like all i all i need to do so far until we hit a a wall you say that yes if this is live coding happy hours when we hit a wall so uh one thing that you can do here in platform is you can go to the api explorer and we can leave that record no really we can leave that record double confirmation really sure i don't think i knew that this was gonna i don't think i knew that this was available so as soon as you do that it's it's in um the api explorer yes it is i guess it's an api right it should have generated well my expectation is that there is now a scripted rest scripted rest api that was generated based off of that that's my assumption it is totally wrong that is a reasonable assumption and actually it i don't think you'll find anything here in scripted rest because ultimately scripted rest is a layer above the rest framework uh scripted address sits on the same level as the trigger itself so they're both sort of first class citizens in in the platform is nice in terms of ways to create new apis and this completely is an alternative to script so is there a way for me to get to that endpoint from here because i know i can get to the scripted rest apis from here but i don't know if i can so the scripted one scripted rest api should be here your scope right now is google something something oh wait you created it in in the other sculptor yeah i created an artifact manager try looking up flow uh go to the f's in this giant list here low designer table api flow designer oh these are all flow apis so for example you know we can find uh you know agile board right agile board yeah edge of board and there's a whole bunch of methods but no art of uh under artifact manager create no create artifact oh well i guess i'll have to use postman to test this i think it's always better when a different tool is calling it anyway it feels more realistic to me it is more realistic when another tool does but i really do love there's the the rest api explorer so and i'm picking someone to find out where it shows up under there real time support all right is this the news man well no because it tells me i cannot upgrade that's all right i haven't upgraded in like two years i'm glad postman answered that question for us i don't yes yes it is uh so let's create a new request demo let's grab this [Music] and then we should have here this guy and we need some authorization over to the side for authorization creation uh let's see [Music] okay now i can pull it back on the screen and let's send it an empty one see what i get does not represent any resource oh it's uh because you are doing a get i think um [Laughter] that would have taken us a minute to find uh that part but i still failed in the same way but api artifact manager interesting um maybe i need to activate it you most likely do yeah because this is probably not a real thing yet did you i would think prior to yeah i would think prior to activation you can test it but like the platform's not going to respond to it right so hilariously you can't even test it well you can't test it because there is no app because there is no no so if you put a log step in there that will open up the test what do you put i'm curious what you put in the what the test window pops up with well we should try it out yeah i mean we should ask you for the i would think it's going to ask you for all that's going to ask me if you're asking so the cool thing about this this lets you focus on the business logic of the flow to say hey i can i can put values into the things that i defined even if i haven't figured out how to formulate the right json payload yet so it's kind of a nice way of separating does my flow work versus does my api call look the right way that is cool with the scripted rest api you don't know whether you have like an authentication issue or if you're passing something incorrectly that is nice yeah so it's kind of a nice now i now i can activate it because i actually have a log i haven't actually told the uh the like i haven't sent anything that the you you'd receive in postman yet right so you should get it but hopefully i want to get a failure yeah sweet here you go this is roughly what i expect to get which is not a failure but not anything useful well that's cool so would it would it show up in the rest api explorer now now that we activated it interesting question that's a good question i think it might and i think the other thing is is we were looking for a generic place for it but i'm realizing that we probably should have looked in the artifact artifact manager we did originally i i did okay let's see i did drop into this name space and look and there it is oh look at that only once it was activated that was the first place i looked was right here so interesting because i would have thought it would have showed up down below in the in the links where you got post post but yes what's under there uh there what do you mean well you get the api name yeah that is if you expand that you're gonna see the uh you can see okay okay yep yep got you yeah and it's really because each of those apis which in this case is the flow um is just going to have a single verb so in this case it's just post because it's post and you'll see whatever whatever you configured i love it it is here now and now i'm no longer even a little bit sad and hey look it returned the same thing in postman is it here well the execution id was a different execution but i i got the same type of result which is good uh so yay uh we are part of the way there um so now we actually need to make this flow do something with that information um what i don't know is how i i have not explored yet but i assume there's some flow lot where i my least you know surprise is underflow logic is going to be a way to send something as a response does anyone have a different lease i don't know that i would expect that to be logic i would expect that to possibly be in i would expect that to be the output of this honestly yeah so and actually i'm sorry i had an audio issue can you restate the question because i think i have a very important clarification to make but i want to make sure i understand the question before i do the short answer is as of this release you do not it is async only and part of that asynchronous designation is that this thing kicks off right away gives you a standard response and says the it gives you an execution and then you check in on the execution yeah because by the time you get a response the flow may not have even been picked up by the flow engine to run yet so there is no response to actually even return so there there's a future considerations around this and obviously more things that can come in some other release but at this time it's async which also means standardized response okay so that means i'm going to need to well i still need to be able to get the results of uh so well what that says is your original um your original design can't happen in a single call right get the thing get the results however it can it can be a two-step thing it can be an initiate and then a sweep up the result when and for my particular use case i can probably just pivot from that because my actual use case can't do a two-step call you could you could issue two slack commands one to create the artifact and then they would say what are my tasks or you could have one you could have an initiation right so you have an initiation of that you you start with that and then you could have say a flow on creation of artifact that does something different yeah so to solve my actual use case um i'm gonna do more like what you said dave which is i'll have my flow push something to slack because i invoke this from you know like i'll i'll have servicenow you know for something to where it came from versus getting it immediately um that's uh well that's i did not get that when i was reading about this feature so if we learned nothing else today i i learned that that this is a um this is async and it's right there in the name [Laughter] it is it is and uh and now we know why um but i think yeah i think to that point the use cases initially that you would probably be focused on are hey i have a process i want to kick off i want to receive a web hook things things of that nature where maybe the caller is less concerned about the results and it's more about the color being able to be the thing that kicks that flow off if that makes any sense yeah i struggle a bit how and we don't have to go too far into this because i want to still show some useful things on the screen here um but i'm wondering how this is more advantageous for me than just using the flow api to invoke a flow from a script address api well now i could just invoke a flow from whatever would have called this so i can use so you could create a scripted rest api that evokes a foreground flow gets the results that you were hoping to do and then puts the response back in the output of that script to rest api is that what you're thinking andrew um i was actually thinking just call the floppy api directly from where from wherever i'm trying to call like did you go in slack in this case i'll call the flow api directly like what am i i guess i'm getting more ability to control the parameters um so a lot of the reasons why i have used scripted rest apis in the past is so that i can control what the response is um more so than the input i mean i've done the input a little bit but that's just higher in my queue of use cases for me is controlling the output and so i'm trying to think through it because that's not a it's not a familiar pattern to me as much um why i think the the main thing with the flow apis today is those flow apis are all server side there there's not a generic hey run any flow from a rest endpoint uh type api available so i think that's one of the differentiating factors here is is that um you know this is a those are all servicenow apis direct correct yeah okay yeah and so this is the first step towards such an api okay and and they're you know again there are lots of thoughts around what to do next and uh but this is a short term this is still super powerful though on allowing me to you know put this in one spot um and and have these together um but yeah as you said the you know if if you can make it a you know synchronous perhaps in the future then the output uh you know in the setting that up will be also another uh significant step so let's uh continue on the path here so we are invoking this flow now um and we're collecting the data we need from the uh the body uh but we need to like do something with that right so we still need to uh you know parse that body and um or rather looks like we don't need to parse that body we have data pills right here for the that body that we can drop into what we need to do next which is uh you know create a uh a record could you create a body that's not an object i mean what if you just put those three data pills as so the body started as an object oh you weren't given a choice on that i was not given a choice okay okay i missed that yeah and i think that's another key kind of interesting thing about the rest trigger is we're you know there are guardrails around hey these are the kinds of essentially the the api that gets generated the caller needs to conform to the contract sure if you need full control and you want to say hey i want to i don't know i want to send my payload as base64 encoded after i sent it through some hashing algorithm you still have the power to do that and that's really where scripted rest comes into play because you want to fully control it and end and in this case we're saying hey this is a way to quickly send something up but you must conform to its format it is so we've got our type we've got our planned published date and i'll probably actually uh you know do some validation on this um before i go and put it in a record um do the lookup first i think i think you can do a create record from template can you oh yes i was gonna do from a template um i was gonna look up a template yeah well you can still put that action first yeah and then uh what was the last thing that i template template i don't need that here got it so create the record and then we need to i don't even know how to apply a template programmatically i probably have to create an action for that like i'll i'll probably have to create that action to to evoke that so when you're on a uh when you're on a regular table when you click the uh apply template that is uh you know that is a thing that is api callable um but that'll that'll be some custom work so new record so clicking this is you know inserting a bunch of data into this record from that template and so that is api callable i just don't have that api handy um so that that's not an option i thought i thought if you had no fields you could use a template yeah i thought there was a take care of that i hate to do this but take your fields out uh absolutely i i don't hate to do it at all ted tell me tell me your ways and i could have sworn i remember seeing templates template on there before uh template like where okay do do create a new action for you want a new action absolutely how about from template maybe template is it in creator update record maybe it's creator update create templated tape brand you and i are not crazy on this i wasn't gonna say anything because i was like maybe i am crazy every time i see it i'm like when would i use that i really want to use that try try creator update there it is third one yeah now it's the first one down set fields dynamically put her on there put her on there let's do it and uh wow okay maybe we are crazy maybe it was in paris and gone now i don't know i mean the thing existing and being crazy are also not mutually exclusive [Laughter] this is true shall we like do a quick look create a record from template i think i think we need an official sound for going off on a tangent but i love it [Laughter] here i got one for you oh that was that was special that was something i was a super friend meanwhile in the hall of justice and then jump out there how about we take out flow to designer and see if there's just a create record space on the template yeah and this is just in case anyone was wondering yes will you google this stuff too absolutely all the time all the time and and sometimes the results come up with me being the person who wrote the answer don't you hate that that has totally have i have totally everybody found either the blog post or like a community post is the first google hit for the thing you're looking for and then you look at like well who wrote that and you're like oh oh i see when what what what was i smoking that day i was being i had my smart hat on that day um so i don't see anything jumping out at me about templates and flow what i can say is that template is a input type in flow and so you can sort of create those nice key value pair collectors based on a set of fields and i do know that a i believe a data pill that is that contains the serialized form of that template which is a special key value pair convention yeah and i believe you can drop one of those onto the fields of this action and i think that will work but i haven't done it personally and i don't know if we can make it happen in nine minutes so that's uh maybe we're gonna have to look for that one something now yes so say say that again so i was clicking things and you were saying something that was very interesting and i think i missed a couple of keywords yes you know if you look in a template and if you actually look at the value that gets stored in the database it's that key value pair string it's like a query string and i believe you can drop one of those query strings onto the fields uh here i believe you can uh or some form of it no we're some places you can't just say we believe you can we're gonna go do it yeah because if you stick that in a string it's going to come out as a query string yep so that's that's the thing i can't remember if it works with the out-of-box action as it is or if it has to be template input so i hope i'm not sending a son away loose chase hey i love it i'm on i'm on board for the wild goose chase right now let's do it so there you go there's a template and you see how it's a big old encoded query string you can you can actually create a new record that way if you do assist absolutely underscore id equals minus one and sysparm under query equals that thing you will get fields loaded up so it's it's easy to script that um but let's see if uh like can i drop that there yeah where would you drop that i think you have to take out what if you what if you what if you looked up the so what if above all this you looked up the template yeah and then took the output of the template and used that as the data pill right could yeah i think there has to be a pill yeah yeah so so above your create artifact record yeah yep add a lookup record template table that that was uh gonna be we're gonna do something that i thought we had to do anyway was to get the template from the template table um and let's just go get the template table's name so it's under temperature just this template and put that in here left bracket is your friend yeah so it's right bracket so you learn nothing else from the stream today left bracket in table field drop-downs is your friend if you know the first nine characters of your table you can get the correct table uh much easier like task or you can actually get tasks otherwise you're like wait task there's only eight million and if you do it without the left bracket [Laughter] look at the size of that scroll bar so yeah user's the other one template uh and we're gonna look up the uh name um the name the template oh name and name is from template in my data pill template all right and we can potentially drop into here nope we can't uh we can't drop a field onto that no not into that yeah i'm trying to figure out what you would put into that yeah this is the part where this is where it may have to be a template input and so i might this is where the goose chase aspect probably comes in i know this can be done somewhere and it's just been a while so uh-huh that's what brad and i were doing it's like where uh where was that anybody i'm like chuck it's it's something that i'm like i don't think i've ever used it before but i remember seeing it multiple times it's always there right before the fields until you need it something for the show uh show notes or rattle later so uh pretty simply if if there isn't a like super awesome nice way to do it we can still like get it in action yeah with with creating an action for this no jordan we're not going back to jelly not on this show um so since we've got this we can you know we can pretty easily turn that into a record uh from a template uh with an action like the script will be super duper duper easy script because we've got all the data contained right here that we need like this is already pre-packaged ready to go poof field names and values uh so super easy script uh so with that uh i will stop the screen share and we can talk about what we did in the walls we hit unless you had something you wanted to see josh i was just going to suggest because i knew we were almost out of time i couldn't remember if you had brought up the execution view after you hit the flow from the uh postman from postman just to show that you know once that data has come in uh so so yeah so this execution id so when you kick this off this this made the flow execute and i was just wondering if if you could open the flow now on the instant side just to show the execution uh sure can that had occurred because it's pretty nice i mean and this is one of the beautiful things about uh using flow designer and integration hub at all right yeah you're no longer in there and then going in and trying to find the log of the rest call that happened 10 minutes ago or whatever the case is yes and so now you can start to see you know all of those things that you were defining as the inputs and all those things you're passing in from that you know from postman are just going to show up here as traditional objects and object structures within this ops view so it makes it very easy to explore and find the details oh the postman one uh so i drilled in to the postman one which isn't very interesting but if instead i grab the one where i actually put something in the body it will be slightly more interesting because i actually sent some stuff over in the body i swear i did on one of these runs sent some remember am i clicking the wrong thing also the and the question i asked at the very beginning is answered right there which is it's running as admin oh nice because there it is logged in as admin or where did that come from i auth admin okay so it wasn't running a system it ran as my user very cool so here in the execution view you know we had the runtime values of what was passed in this case it's the request body and we can see the you know the json request body here uh which is pretty great um and we didn't do anything else with that but the execution view is so the centralization of all this stuff into the here uh is just the best thing the i only have one complaint in this this area ever uh with that which is the the four each just is it's not it's not the greatest uh presentation uh for the for each but but it's all together in one window which is great my bug is that uh when you run a data stream you can't see the response payload because it's doing the pagination and then kneeling it out serially so if you want to see what the response payload is you got to do the test but if it only shows the first 20 records on the test and your stream dies about 250 records in you're kind of hosed yeah yeah so um that was uh the new asynchronous scripted wrist api trigger is available in flow designer with quebec um anything else that was uh you know that you want to take a moment and uh highlight um josh no i just think i would say uh we're excited we would love to hear from everyone about how this goes and what they like and don't like and we're excited about what's next so so no other quebec features that were like fancied you yeah that you deployed here in quebec oh you're gonna put me on the spot now yeah absolutely tell us about them uh well probably remote process sync that's a big one it's a big big box teeing it up for you now so remote process inc is a bi-directional framework for e-bonding so um there's a lot of good stuff there we released our first version of that in quebec and we're not done so we're excited about uh you know the feature state but definitely check out remote processing if you have bidirectional debonding needs and have complex correlation and order delivery and all the good things that you care about when you're keeping processes and sync between multiple systems and so to help people who have been doing this for a while in integration hub we have had the uh example servicenow to servicenow e-bonding spoke and then we moved to the remote instance spoke um in orlando or paris and you know last year sometime and then this year now we are moving to that next level of abstraction which is no longer locked into servicenow to servicenow or is it still locked into servicenow to servicenow and it's just process level in the quebec time frame it is still service now to service now um and it's but it's focused on process and uh and so these you know this is not a duplicative feature of say the remote instance book remote to spoke is much more like hey i want to call apis on the other side maybe on demand or ad hoc whereas remote process inc or we call it rps is the easy short acronym is more about sort of that long term maintenance and orchestration of these bi-directional processes which often have more complexity than you can really easily handle with just a couple of flows so that's kind of the difference and so this is you know keeping a uh like when i was a customer the last place i was a customer we had some integrations with some vendors that were also using servicenow and we had shared processes because they were providing services to us and we were requesting those services and getting help with those services and we needed bi-directional process sync and this would have solved my use case then i think which is i needed to communicate with a not my servicenow instance and keep two processes synced up without tons of overhead of making sure our processes were identical and the same tables and things no this is just two processes uh in two different servicenow instances yeah and they can be completely different it could be uh two you know could be custom process a and completely custom process b and they don't have to be the same at all and so that's one of the big exciting things is just how flexible that is yeah so it could be change management in mind and customer service management in theirs absolutely yep because they're providing customer service to me and i'm really executing a change and they're part of it yeah it's all about how do we do the work in the place that we do our work and relative to each side all right wrap us up brad let's wrap up well thanks for joining but before we leave uh let's go ahead and rate our beers so we will start with josh we rate our beers on a .25 scale uh so what do you think so the the dilliner weiss from mars community brewing with pickle uh really good it's a great sour i would say it's a four and a quarter yeah it's a solid 4.25 for me which says a lot wow that's a good sour i want one all right so i'm gonna tell you the sweet water 420 this is not an absolute rating this is a contextual rating i have been losing weight for the last six months which one of part of that involves drinking very little beer because it's full of alcohol and carbs this is like at least a 4.5 maybe more i'm going to say because oh it tastes good oh oh welcome back sweetwater 420. oh he called it the bud light a minute ago ago he's gonna give it like a three or two no it's the bud light in that it's ubiquito it's it's the ubiquitous craft beer that you can find in every uh kroger and uh food lion in in your life and looking good dave uh we can we can tell yes for a minute i thought it was michael butler on the screen uh my homemade margarita which is almost gone that whole tanker back there was full [Laughter] uh before i rate this i do have to remind you that there is a tech now coming up on february 23rd 8 a.m pacific time 11 yeah 11 a.m eastern go to bitly tn 84 reg we are going to be configuring the workspace jeremy duncan is going to be leading us through that so i want to give that final announcement tn bitly slash tn84 reg to get registered for that and uh if you can't find that go to the community bitly slash servicenow dash tech now and you can find it there the uh margarita whew i think i put a little too much tequila in here uh four and a half today nice uh so my drive-thru red um so i like red ales uh so they always uh you know move move up this one is sporting a little more booze in it than usual for a reds this is this is high for a red with 7.3 um which is more than i was expecting um and it's pretty good so it's a it's a four that's a good solid four if if the if uh the trigger had been synchronous it might have been a 425 or if i had known that it was asynchronous either way nice all right my bourbon barrel french press uh was really good i'm gonna give it a a four five it was excellent wow man we have the champions of beers yeah this is a good one today this is an all-star average an all-star team uh thank you so much for joining us uh josh and dave uh it's certainly a pleasure to hang out with y'all anytime uh but on the show is the very best so i appreciate y'all joining uh and sharing your insights uh with us on uh this today thanks for having us thank you for the invite gentlemen all right well thanks everybody for joining us and we will see you next week bye everybody bye [Music] you

View original source

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