logo

NJP

Making a ServiceNow Spoke part 1

Import · Feb 14, 2020 · video

hello and welcome to this beginners tutorial on making a spoke in ServiceNow a spoke is a scoped application containing flow designer content dedicated to a particular application or record type even though serious now has a lot of out-of-the-box folks ready to use sometimes you might need to make your own so in this video I just want to go through the very basics on setting one up and I'll make a part two later to focus on more advanced features first allow me to introduce myself my name is andres vegans cow and our work is a principal architect in Tsarist area in norway if you need to get in touch with me you can slip an email or through linkedin the addresses are shown at the screen so a spoke is a reusable element for use in a flow designer it is an application with inputs and outputs and in between has steps with different actions creating a spoke means taking some inputs creating actions and linking these together to produce an output in the flow designer you then have this spoke optionally connected with other spokes to have your flow work so in this tutorial we'll just make the spoke with a simple action step let's begin so the first thing you need to do to make a spoke is to create a scope application so let's get into studio I'll just create one called hello world spoke so by adding the name spoke at the end here it will show up in the flow designer a spoke let's just use this one so to start off you need to create an application file and you need to find the flow designer action just to create one of those now this shows up as a pop-up so I need to just paste this into my browser window you can see it she's gonna call this my test action or just gonna ignore everything else for now so this is the action window it has inputs and outputs and that steps in between so let's first start out with defining one input let's call it your name I'll keep it a string you can see there's a lot of different types the ServiceNow provides I'll get go through some more of these in another video I guess alright so I have your name as a variable use in my step ServiceNow provides a lot of out-of-the-box steps both in the ServiceNow data for updating records creating records that type they also have these utilities and integrations I'll just use the script utility for now so you have to define input variable if you're taking something from the inputs see if we can find it we use this data pill picker to say I need it from the inputs let's call your name that means we should have name here the same time the output variable I will call message and in my cold I'm going to keep it really simple and say that outputs message equals hello + inputs aim so this should take the input we have here and just build a string saying hello the name and it should be passed to the outputs variable called message go to the outputs a create one call this message and this should also be I should call this message as well there's somebody's I'm not allowed to I'll just throw it away I'll make anyone right now I need to link this one to the value in the script step so I'll just go back and forth between these two some reason it will give me this one so the variable I just created this message I can use the data pill picker again and say I need a value from script step now and the message which came from there I'll point back to it so script step message is here in the script step and I defined it here in the output variables which is set the value is set in the script field which is getting the input here from the inputs let's run a test you click test up here and it knows that I'm expecting an input called your name so I'll just write my name anders and run this one then you can actually click here and see everything that goes in and out so you can see here that I'm testing this my test action and the variable name your name got the value anders and then the output data the message resulted in hello enters and the steps was for our example just one script step but if you had several you'll have them listed below each other here and you can see the values as they populate down down the chain so you know that if something is wrong you know you can find out where it went wrong and you can fix it and then you can keep adding actions in in here if you want to like add a new step to add one below or one above between inputs and this description as well when you're ready you can just publish it let's just do that now right this means that if I now enter the flow designer I'll just open one of my existing flows here this one this is the flow I made and I can add an action here and I can look for the one we just made action hello world this Spock is here and the action is here I'll just use this one it's added there you go and if you want to add value coming from your previous spoke you use the data pill picker you find the value in the image search in this example it's just place it in there and you're good to go you activate it and your flow is working fine so that's all for now I plan to create a lot of video contents in the future we're also bringing some very talented people in the community and have some live streams as well so thank you for watching my bill bartmess or drop me one [Music]

View original source

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