trigger slack message in servicenow

ujjwala_678
Tera Contributor

Hi All,

I have this new request to send slack message in servicenow using scheduled job 

Any existing script include I can utilise for this?

How should I fetch data using scheduled job? I am newbie to this integration 

Please feel free to share your thoughts on this. All kinds of suggestions are highly appreciated.

Thank you 

6 REPLIES 6

SanjivMeher
Kilo Patron
Kilo Patron

Do you have integration hub subscription? If so you can use Flow Designer to trigger the Slack.

There are steps in below link

https://docs.servicenow.com/bundle/vancouver-it-asset-management/page/product/software-asset-managem...

 

There are videos on youtube too to understand the integration

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

 

 


Please mark this response as correct or helpful if it assisted you with your question.

Masoom_Patthan
Tera Contributor

Hello ujjwala,

Certainly, integrating Slack messages into ServiceNow using a scheduled job is a common and useful task. Here's a basic outline to get you started:

  1. Create a Slack App:

    • In your Slack workspace, create a new app.
    • Obtain the necessary credentials (e.g., API token) from the Slack app configuration.
  2. ServiceNow Script Include:

    • Create a Script Include in ServiceNow to encapsulate the logic for sending messages to Slack. You can use the 'HTTP' or 'Outbound REST Message' APIs for this.
    • Example Script Include (assuming you have the Slack API token):
      Find attached file
  3. Scheduled Job:

    • Create a Scheduled Job in ServiceNow.
    • Inside the Scheduled Job script, instantiate your Script Include and call the sendMessage function with the required parameters (e.g., channel and message).
  4. Data Fetching (if needed):

    • If you need to fetch data from ServiceNow, use GlideRecord or other appropriate methods based on your data source.

Remember to handle exceptions appropriately and log any errors for troubleshooting.

This is a simplified guide, and you might need to adapt it based on your specific use case and ServiceNow instance version.

Feel free to reach out if you have more specific questions or need further assistance.

 

Regards,

Masoom Khan

hi @Masoom_Patthan ,

thank you for your inputs on this.

I have couple of questions regarding this....Let me know if there's any way we can have a quick discussion on this?

Thank you,

Hi @ujjwala_678 

Thank you for reaching out, and I'm glad I could be of help with my inputs.

I'm definitely available for a quick discussion regarding the questions you have. Feel free to let me know when you're available, and we can schedule a time that works for both of us. Alternatively, we can connect on LinkedIn or any other platform you prefer for the discussion.

Looking forward to our conversation!


Best regards,
Masoom Khan
<script src="https://platform.linkedin.com/badges/js/profile.js" async defer type="text/javascript"></script>