ServiceNow Flow Designer GlideFlow and FlowAPI
this is a quick intro to the api's available shim servers now Madrid that allow us to interact we have flow designer flows and actions programmatically so here I am in a flow this flow is triggered and when it is triggered it is posting a tweet and after that the calling incident is updated with a work node so let's do it the classic way first so tweet is inked and this meets the condition so it should be posted to Twitter the flow is is fired off and let's wait one or two seconds should be there any moment yep there it is so the work notice edits and when we click it it takes us to the incident and the text is X expected so this is the normal way what we can do as well now when we go to the this button and we click it we can click code snippets and it will generate both a surface ID code snippet as one that can be run in the client so in the browser and we can click on the link as well and that will take us to the dark sides where we can explore more information and when we click on the server side flow API we get all the methods and more code snippets as well so let's try this out quickly we are in this incident so let's copy the surface ID code snippet first and we will go to explore that is similar to the background script but a bit easier to read so here we have the incident and we need to pass it the current that needs to be a glide record so this is a prepared the only thing we need is to copy the SIS ID here of these incidents and this is another incident that has no no tweet at this point so let's past in the SIS ID of that one run it so it is run and it seems that it is all good and now you see that indeed in the records now the tweet is posted so that works quite well another thing we can do on the server side is call an action so that is this prepared script so so this is calling an action and input is tweet let's take a quick look in flow designer in the action you see that this action has only one input and a few outputs and for this one as well the couch snippet is available but as I said I already have prepared it so let's change the text a bit and run it so this is not run in the context of a flow so it won't update a record or anything but we do get the output of the of the flow which we could use programmatically as well of course and when we go to that outputted link we see that this is posted to Twitter as well so there are a few more api's you can explore them but this is hopefully gets enough to get you started and then we have the glide flow API that is the one on the client side and let's go to this incident again and save it this does not meet the condition to post another tweet so now let's do an inspection window and go to the console because that is the same as client side and we'll paste in this prepared script and then we need the sis ID of this records and let's run it so now it is running again and we already get a execution IDE back and some other things and now this has completed as well and this updates the record we have the updated short description so this is also quite good documented functions to get the execution state and lots more so opens up lots of possibilities to to integrate flow designer content within your pro codes in environment so don't let it hold you back be creative and use those flow designer flows and integration hub all the way thank you so far and let me know if you have questions and leave a comment if you like thank you
https://www.youtube.com/watch?v=HaRjNZh2JQI