Integration Series | Slack and ServiceNow Integration | Slack Webhook Integration | Slack | Part - 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome back to my youtube channel my name is dunya patel guys uh this is the part two of slack integration series right so in first part of this slack integration series we have seen that how we can do a quick integration using a web book as box right but using a web book uh spock's guys or options was very limited i can say here i have listed on using a web spokes we can post a message we can post change details we can post our incident details and we can post problem details only these many things we can do using a book as books but guys when we are talking about the slack spocks so using these guys they have done a categorization basically so they have done in three categorization so one is the channel management second one is the notification management and the third one is the user management so all three uh combines guys we can do with the slack spocs basically so if you are doing with the web books means you can see here over here so notification management only they can allow only for limited options right but if we are integrating with the slack then see how we can integrate it guys fine so let's understand guys over here like what is the channel management basically and what are the things we can do using a channel management right so using a channel management guide first of all you have to provide a permission we will see how we can provide this permission to our slack channel basically so channel uh channels right in groups right i am right side mp i am rights fine so using this channel management guys so this is your slack spoke basically we can add a channel we can add a user to uh channel we can archive channel create a channel look for the channel history look for the conversation remove user from the channel these many steps we can do it from the service now no need any manual intervention in slack basically right so on top of that guys in the notification management here we have these four option which we have seen in the web books but on top of that we have a post actionable message post approval message also we can find it out post response to slack update approval record all this thing we can do under the notification management so in user management guys we can create a user we can deactivate users and we can look for the users as well so these are the scope i can say guys or scope of integration these many stuff we can do using a slack spoke integration right so let's talk about guys so what are the things we have to do from the slack side integration right from the slack side basically so i have done a categorization for the slack and the second one is the service now so both way if you have if your client has given you the admin rights to go ahead and do the modification based on your need then you you just do the this following the steps basically fine guys so here i can say uh you have to follow the five steps so first of all what you have to do basically guys uh first of all you have to log in with your admin account right so if you don't have admin account then definitely you have to create we have seen in the last video means part one video of this series how we can create our slack account right and how we can create our workspace basically now we have to create a app so let's start it now guys because this is the important part and if you are not taking care then your um slack partner whoever they're from your client end they will take care of it but you have to tell them these are the options or these are the permission you have to grant it from your slack end so we'll see over here so that you can do a practice in your personal dev instance before starting a actual implementation in your client environment right so now i have already logged in in guys over here so this is my channel basically yeah right so here fine so here is our all the apps we have installed it so what we have to do guys so basically we have to add one app so if you are going through the new so i'm not going to uh showcase with the existing ones i'm going to create a brand new for you right so how we can do so so for that guys what you have to do just type api dot slack dot com you will be redirected over here and just start building up here you just click on the start building i have just clicked it out and here now it is asking to create a slack app basically so for this guys i have already created this one servicenow helpdesk app one so let me open it over here right so this i have already created openings like it is saying so if you are going to create a new so here is the way you can create it just create the a new app over here so just let me create service now help desk just creating with this and this guy basically this is a workspace basically over here so once you will create your account it will create a workspace for you also so for me this is my workspace the same worker space i am selecting over here so once you create your account only then it will ask you to select your workspace fine and just click on the create app it's very simple right now guys what you have to do now we have created the app but the second thing we have to provide the permission right so here i have listed down the permission so first of all we have created the app and i have noted on that means you have to go to api.slack.com right so i went through and i have created the app now third point it is saying guys you have to set the url means our instance url basically right so uh here let me copy it this one and we have to go over here and it is our url just click on the permission it will ask you to update the url as well fine so redirect url over here it is there so just add a url fine so here we have to provide our dev instance url right so dev let me do it guys fine so this is the url and after url you have to just provide the auth underscore redirect dot do find just click on the add and the save url it saves successfully now guys the second thing we have to do that we have to define our scope over here like we have to define our permission right so just click on the add on the scope permission over here and give all this required uh permission this app basically right so once you will do that guys like for admin that means all this thing is there guys like a chat chat dot chat underscore right so all this thing it is listed down over here guys fine so if you are not giving this many permissions your app will not communicate with the service now basically so you have this is the mandatory scope i can say guys so we have to have provide this so a scope add-on iscope provide the below permission right so once you do it guys so here it will ask you to install app to workspace i'm not going to do it guys because this is the last step you have to do it once you will do that this will start reflecting over here basically so right now it is there guys so you as you can see here my app is listed on here servicenow hell does app one which i have created earlier so once you do the installation it will start reflecting app over here fine so this is your final step you have to do it so this is the only way or guys and this is the only things you have to manage from the slack side right so once you install it your job is done your slack side job is over now fine so i'm hoping that you can do it yourself this guy's in your slack application right fine now let's move on to our servicenow side so servicenow site guys first of all we have to enable the integration of plugin so guys integration hub plugin is a paid plugin so we cannot enable directly typing a plugin from here right so for that guys what you have to do you have to have uh one dev account developer account right so if you are working with the client and you are going to implement with the client environment then definitely you must be having a high account using that high account you can enable the integration hub plugin right and so for those who are uh implementing a developer your personal developer instance and then you know that you have to go developer.servicenow.com and go to uh activate over here plugin right so where is manage and activate plugin right and just type for the um integration hub so guys uh we are interested on this plugin basically service now integration of installer right just install this plugin by default it will activate it over here right so let me show you i have already activated so for me it is visible integration up is visible for me right so yeah after activating your plugin integration hub option would be like this fine so first step guys things we have to do that you have to activate the plugin now the second step guys so this is basically uh we have to create your our auth profile basically the way we are doing for the others any third party integration we are creating a uh auth profile like application registry right so what you have to do guys you have to go here auth under the application registry right so guys so once you will activate the plugin uh one auth profile will be also created for you from from the slack side basically so this is the one by default it is got created and now you can see here or the application it is in slack means we know that we are working with the scoped application right so let me just move it to the slack over here fine so this this is the by default i have not created guys so this is the white default created by servicenow once you will activate the that plug-in basically right so here i have a given the name like you can just modify your name and the guys this thing we have to fill it very carefully so this details we will be getting from our slack channel basically right so let's talk about one by one guys so this is the free text name whatever you want you want to give it and this one guys client id we will be getting from our account basically so we have created our account so this is our account right so we have to just go to our basic information right the way we have created your app basically right so here i have created the app and once you go to the basic information just scroll down it will give you the client id right so just copy this client id and do the stuff so this is for our different one let me select anyway you can create as many as you want application as you can see here right now we have about three just now we have created the snsd right but i have done all these things using your service now help desk app one so i have selected this and look for the this client id so same like whatever the client id in your case it would be present over here under the basic information you have to fill it over here right so i have filled the client id now the second thing guys you have to click fill the client secret id so same details you will be getting from here just click on the showcase and just copy it client secret so that figure also i it is over here now that this should be a all application scope make it active and now guys uh authorization url you have to keep it like http um colon double slack slash slack.com auth slash version two slat authorize so this is the one you have to keep it this is the static one no need to chain in your case also if you are implementing the same thing in your client environment also this static things it should go so let me showcase you i have already noted down all this thing so authorization url it will go from here fine so token url would be like this api slash auth dot v2 slash access right and the redirection url guys so by default it will take from your servicenow instance but no need to feel it and the token revocation url no need to just do it leave it blank as it is and the uh default grant type guys you have to select your authorization code so by default this would be selected resource owner password credentials but you have to select with the authorization code fine just save it right click and do your uh insert or update your record after filling all the details right you know that for these are details is very very important please don't do not share these details to anyone if you are implementing in your client environment right so using these details anyone can take like a post a message in your slack then fine so next thing what you have to do once you save the record by default this profile will get created for you but we have to go to the auth entry page like the way we are doing for the other third party integration right so for any third party integration we have to fill this auth into entity scopes basically so guys so these are the things we which i have mentioned we have to enter the in the scope so same whatever we have given the permission in the scope side in the slack side same things we have to update it over here as well so as of now i have updated as you can see a 10 is there so admin channel slide chat rights uh chat right about everything like you have to enter it just like this is the free text and just enter it and then this enter it fine so this way you have to do it guys let me just reload it so that it will not create a problem fine so it's a simple things we we have to enter it so from where you will get these details so here is the one we can get the details fine guys now second thing once you will that that uh done your activity over here you have to just right click and save the record and now again go back to your auth entity profiles open this profile and choose the same which you have entered over there so right now i have to choose it like i have not showed the others chat application all this thing but here you can just choose it like a group i am under underscore right sorry clone write this amp and write redux it chats and the user read emails so once you will provide it these details and right click and save the record again so basically we have to complete our application registry form over here basically auth profile right using these details fine and this details will come from here don't worry guys i will upload this uh in this video in the description below so that you can get it from there right fine so we have done our first step second step and the third step fill all the required details we have already filled it these are the details we have filled it client id secret id grant type authorization code i have already listed down now navigate to integration hub and create a credentials so we have done with first activity that means we have created our profile now second is a fourth step it is saying integration hub and create a credentials basically so type our integration up and we have to look for the credentials right so here is the credentials fine so just click it on this and just look for the credentials so here you have to create basically a credentials just click on the new and just look for the auth dot 2.0 credentials click it provide a name provide your auth profile which just now we have created this one in this case we have created this one and the save the record right so let me show you showcase you i have already created with this name select this one and this same i have selected over here nothing x type we have to do fine here guys uh once uh okay fine let me create it one new so that you will understand over here what i'm trying to explain because we have to do it test and this one and submit just open the test one it will show you like this auth access reference token not available verify that one the next step in this guys it is saying click on the get auth token related links basically so i'm talking about this guys so we have to click on this basically get art token fine so basically this guy right now once you click it it will ask you some to provide a permission basically so you will be redirected to this page here you have to click the allow it will get allowed to you find so i'm not going to do that with this fine just going to cancel it i'm just going to deactivate it i have already created my credentials which is here so once you will it will get activated it will showcase you like your accent token is available and it will expire on this date by default it will give you only for 30 minutes guys so for that what we have to do you have to just go to auth basically we have to edit it manually i have already done it i have listed down that steps as well so go to integration hub connection and credentials alias and create the record before that i was talking about this guys so before that you just change the expiry one so how you can do so here you have to go to auth and just clear look for the manage tokens right so basically this token will get x bar on this but once you will get auto can click on this little link this will give you only for half an hour so how we can manage like you just click on the manage token and just look for your uh token link so this is our auth token credentials right so here you have to do it manually so you just change it 22 like that and save it fine so then it will not ask you to change it in every half an hour basically right now the second thing guys we have to do over here now we have to create a integration connection and alias one record on that so just go to integration hub so guys uh each and every steps we have to follow base the way i'm just guiding you right so just follow the same step when you are implementing in your pdi right so here what you have to do you have to create one credentials alias basically right so same this is a kind of one record guys so i have already created so basically i have not created this is created by the slack application right so i'm using the same i have not created the new one so here i've just given the name and the connection type by default it would be the http right so don't change this one basically so by default it would be ssd and we are looking for the asset hstp only fine only things you have to do or once you will come on this page then this connection would be not there so you have to create the connection so what what you have to do you have to just click on the new button over here right so once you click on the new button let me open it in the new tab just say you need to enter the few details just give the one connection on name over here i have given the http connection select your credentials just now we have created right so it's like essay and i have created it in that case guys alias by default it will get selected and the connection url you have to provide guys this one https columns double slash api.slack.com right i have listed on this as well over here in the point eight get and uh get uh create one http connection from the related list of the connection and the credentials aliases select the your credentials and fill connection url as this one fine guys so this is like a very static one you know for every uh integration like it doesn't matter whether you are implementing with your personal data instance with or with your client one you have to use the same one fine guys so once you create it it will make one record for you over here now we are done uh guys so here this is the configuration basically uh we will be doing from the slack side as well as the um your service now side right so let me uh just navigate again by uh this one guys so basically a ninth step we have to follow i have listed on all the step over here so let me recap on quickly for you so first of all you have to indicate um enable the plugin over here right so you know that how to enable just you have to create one profile or authentic auth profile basically you have to create and then um you have to fill the required details which will be this basically so in this basically three or four so columns are a static value which you need to fill it once you will make your authentication profile then definitely you have to go to the integration hub and click create a credentials once you create a credentials click just validate your token basically so token will be taken from here right so for every uh application it has one token so it will take it from the verification token from here right so this is our in this case this is a token number right so now you have to create one um just extend your expiry date of your token right and create a alias over here connection and credentials areas and where you have to go i have listed down the step as well fine then you have to create one http connection and fill the details with connection url as a apis dot slack.com right and the last step guys we have to work with the flow designer right so now let's move on guys so it's time to uh showcase our demo basically right so just go here and go designer right i'm going to get one designer over here so i'm going to create a new create a channel fine guys so i have just given the name create a slack channel right nothing else i'm just giving and let me put it as a description this fine when created for it and right guys now what we are going to do guys so let's take one scenario so whenever we are creating a change request basically and whenever we are getting emergency change request that time we want to create a channel and we want to add user whoever assigned to that assigned person right so this is the use case scenario guys i'm going to follow in this so first of all we have to get a trigger condition so basically we wanted to create a channel so definitely we wanted to run it only one time while creating only so i have selected the trigger as a create fine now the table i'm interested for a change request right so i have selected the table as a change request and in the condition i'm going to select a change type as a emergency right so for that we have to select a type and type is emergency fine we are done with the criteria means this workflow or basically a flow designer will get trigger whenever changed emergency change request will get created or generated right now our trigger point is ready now we have to deal with our actions so here we have to look for the slack so guys in last example on in my last video we have seen using a slack uh webhooks right so we have a limited option only four option we have to do add the activity but in the slack as you can see guys we have a many options right we can add a user to channel we can our cab channel create a new channel guys remove user from the channel so whatever the um um this information we are seeing it over here i have already listed on over here right if you have seen my first video we can do the activity this activity this activity and this activity we can do so right so same activity over uh option i can say it is visible for us for the slack right it's a good right so without writing a single lens line of code guys we can do integration with the slack right as of now we have not written any a single line of scripting right we have done a customization only for like filling our token id and the secret id all these things stuffs but we have not done any custom scripting as of now before that guys how uh we are doing a scripting in the integration you know very well right so we have to do lots of thing in the integration but nowadays service now is giving us to basically service now making our life easy whenever we are working on the integration third party integration basically right so let's not talk much about that so we know that how servicenow is performing nowaday so what we are interested we are interested to create a channel basically so here is the one so create a channel if you can look into this guy so what are the input you have to provide and as a what output what you will be getting and if you are getting an error then what error you will be getting fine guys so here you just go through all this thing while implementing it will showcase for you as well so here i'm just going to select the create channel fine guys so once we will create a channel then it will ask for the name basically right so what i'm going to do i'm going to select a name so what i'm going to do over here so change basically i'm going to create a channel name using a um whatever the um number uh change request number is generated with the same name so in that case we will be selecting a number right and number and then let's say i'm just adding a info right so this thing so only this thing let's check it out now guys so we will see one by one step i will cover many things in this workflow design okay so just be with me so as of now i have created that trigger point and the second step is the create channel so let me showcase you what we are getting whether we will be getting errors and whether it will get succeed if it will get succeed we can see the channel name over here right fine so let me test it guys so here our servicenow has given awesome functionality we can do a testing with before going to a actual environment right so let me select anyone over here and i'm just going to click on run so now it says uh it's got executed successfully and let me check the things guys over here it is saying uh created over here so now editing saying channel name is invalid error we got it guys right so here we can check whether it got successful or not and then everything guys so what are the error what kind of error it is giving invalid name a special character so it's saying over here right so let me showcase to you guys over here this thing right you can just do a troubleshooting so this thing i wanted you to showcase basically this name it will not take basically right on that case guys what we will be doing so basically it will not take the upper case it will take only the lower case what i am going to do if you will give the static value well and good but i don't want to go with the static value definitely i'm going to write a script then so for that what you have to do guys so just click on the this fx function and here we have to write our code so only one or two line of code i will be writing so what i'm going to do i'm just going to copy this so this is the sample script service now as givens right so this is a kind of object and whatever the data we wanted to get it we will be getting it so let's see it guys current dot we want number so we have a number right so what we will be doing over here say number right so this is the variable name we got the number and then again we will be saying uh where a channel name basically i'm just giving a short form channel name okay my mistake or we can just name it like a cname channel name and using that what we are going to do i'm going to keep number plus info right so i'm just appending that static and i'll be returning this value basically return c name dot to case fine so by default uh it will give us like um change request it will give us in the capital so here while returning we are just returning it as a lowercase value right i hope you got it so this is basically a way to get this current object means current record so here is the current dot whatever the attribute details you want you just get it from here right and once we will have the number we have a store in the number uh variable over here and then we have created another variables called the cname means like a channel name and here number plus underscore input basically we are doing a string concatenation over here and then finally after making it in the lower case we are returning the value fine so we will save this and we are done over here we will save this and just click on the test again and i'm selecting this let's see what it will happen this time and let's go it's saying null object converted to an object find this i wanted to say okay you guys basically so channel name what it is giving oh it didn't get saved okay fine so i have to do it again guys basically so what do we have to do sorry guys but again i have to write it down again so let me do it quickly show here say num here i'll be selecting a number cname is equal to plus underscore info right and here we will be returning return cname dot to lower case fine so let me turn and this time i will save it again guys let me see it again fine now it is there so let's run our test case over here select any let's do it this time i hope so it should give us one channel name and now got success message right so we have to check it guys over here so what name it got given change this one so just look for the here go to channel brow channel and this got it guys this one right so channel name got created over here because it is not displaying over here because we have not added it so in the next step guys i'll be adding a users also so that by default it will uh come in this left navigation basically right but in this case guys we have created a successfully channel right so let me cancel it now next thing guys let me add it one more so i hope you are clear how we can create a channel right so let me showcase to again this name i have given fine so next step guys what i'm going to do i'm going to add a user to that um channel basically so whatever the channel it's getting created i'm going to add a user on that so for that again we have to select a slack and add a user to channel select it over here and here we have to provide the channel id so channel id what we will be doing we will be selecting from previous steps basically so here we will select channel and the channel id right now it got created so here we have to give the user id guys so for in my case how you will get a user id so just go over here in your case like how you can find your user id here you have to go to view profile right and in the view profile just click on the more and here you can find the uh copy member id basically so this is your basically nothing but a uh user id right so uh in this case i have already uh created users right so let me show case to you in users table right let me do it uh updated and something i tell you just for that i have given guys yeah so i have created one uh basically uh sorry guys i have created one um slack id over here as you if you can see it over here this is the like custom field i have created a slack id and i have given this user id this is basically nothing but our slack id right so i'm going to fetch this id dynamically so in each and every user's record we will be putting one slack id right so this is just for to so case you guys so based on your circumstances and based on your requirement and the scenario you have to build the logic basically right so what i'm going to do in this case guys or what i'm going to say um user id is the record this change request and the assign to and assign to a reference and then i'm going to say slack id right so it means that it will look for the assigned to of the that emergency changed emergency change request right so here i will just keep the done over here and we will save it so basically uh let's say it over here so change over here let me open any change right so i have given the condition as a emergency chain so i'm going to create a emergency change from here so it will look for the uh whoever the assigned person is there for that slack id right so here is the thing is fine fine fine everything is fine so let's go over here and this time what i'm going to do i'm going to activate it i'm not going to run through the test environment i'm just going to activate it so that we can while creating a record uh it will create a one um channel and it will assign uh that uh assign to me it will take as a signing in our slack channel as well fine so how it will be happen over here so i have selected the ideal user so it will because it will look for this assigned to field i am going to do that save over here fine so here i have created it i hope so it will create one channel and it will add one user so as you can see it over here guys so one channel is got created with the change request name uh triple zero six so same change request number is there so and uh here one id is already there let me close it and here it is saying joined this uh with ranja patel right so flow designer has created a channel it has added me right if you are giving a like this one as a over here whoever would be there in this case watch list it will add then it will add those people in the uh your channel group by default right so it's dam easy right to create a um flow designer if you are not aware about the flow designer guys as of now i have not created a video but i'm planning to create a video on the flow designer just to showcase or this slack integration i'm just creating it over here right so next thing guys so we are we have now successfully posted our message also and we have created the channel we have added the user to that channel we can many do the many things so we can just now the post the um our details as well to the same channel right so what we are going to do over here so in this case guys so if we want to take a confirmation that whether that channel is got created or not we can update it in the work node so how we can do that let me do it quickly guys again i have to edit one and just go to update record over here update record over here we are taking in this case record we will be taking a change request right so table is also change request filled work note i'll be taking and here i will be taking um one message we will be passing my channel has been slack channel slack channel has been created and here in the slack channel in this case i'll be mentioning the channel name as well right fine so turn it save this and again we have to activate it again we have to create one new change request an emergency change request basically in this case uh it will create a channel in our slack over here and it will update the message as well so let's check it out guys so i'm just adding this users just saying here paste and save it now we have saved our emergency change over here now we are expecting one work node should be updated with the channel name basically right it will take your it's got created because we have received it over here guys so as you can see here three uh triple zero seven is got created and now uh it has added me as well right and now we are expecting that it should update our data in the work note as well right but it's not updated let me just replace it it didn't update it let me check what happened to this guy so change request record has been created fine everything looks fine so whatever we are going to do is just we are going to do a testing on that case here we will create a record and here we are signing ptl user and will be submitting the record fine got created and now we will run the test so in this case also guys it should create one channel and let me say check it out the mirror is there write access table change request scope doesn't have the right access to change request okay so basically uh we have not defined or write access to our change request that's why it is not updating our change request right but we can do it easily guys so is everything is coming over here as well so change request work note is this this thing it will get updated basically right once the we will provide details to that fine guys i hope you guys are now clear with how we can do the integration uh slack integration with service now basically right so if you have any comment you know that where you can reach out to me we have our telegram group you can just connect me over there i will reply uh but as much as possible like i'm getting a mini request so definitely whenever i will get time definitely i will reply to that thanks guys thanks for watching if you have any query you can leave a comment in the description below as well thank you
Info
Channel: ServiceNow Helpdesk
Views: 2,356
Rating: 5 out of 5
Keywords: ServiceNow Helpdesk, integration in servicenow, web services servicenow, servicenow integration, servicenow integration hub, servicenow slack integration, servicenow slack integration hub, integration hub, integrationhub, servicenow slack webhook, slack integration with servicenow, integration, slack integration, integration hub servicenow spokes, integration hub microsoft teams, integration hub spokes, slack spoke servicenow, slack webhook integration, servicenow slack bot
Id: G2gJOLTzDuM
Channel Id: undefined
Length: 49min 16sec (2956 seconds)
Published: Sun Sep 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.