Submitting a ticket to ServiceNow using bots

In this tutorial, we will configure a Make flow to submit a ticket to ServiceNow using The Bot Platform.

Knowledge Level: Intermediate

Purpose

In this tutorial, we will use a bot to submit a ticket to ServiceNow. A bot will capture the ticket information in attributes. At the end of the submission, we will post this information to a webhook in Make, which will pass on the information to ServiceNow. A ticket reference number will be returned to the bot user for reference.

Prerequisite

Setting up the bot

For this use case, you need two message parts:

  • A message to capture the short description of the issue
  • A second message to capture a detailed description of the ticket
  • A message to capture the priority level

Setting up the Make scenario

We will use the following modules in our scenario:

  • Webhook - To receive the request from your bot
  • ServiceNow (Create a ticket) module - To submit the ticket details to ServiceNow
  • Webhook response - To return the ticket number to the user

Step 1 - Setup Webhook in Make

In this step we will setup the webhook which will receive the ticket information from the bot.

Login to www.make.com

Create a new scenario and click the + sign to add a new connection. From the list, search for ‘Webhook’ and choose ‘Custom Webhook:

📘

Copy the webhook URL from the module and paste it into the bot's last message part where the user completes submitting the ticket information.


Step 2 - Configure the ServiceNow module in Make

In this step, we will add the ServiceNow module to our Make scenario. Here, we will use the attributes incoming from the webhook and create our ticket in ServiceNow.

This is the module where we will input our ticket details, using the information we collected from the bot when a user enters the ticket information. In this example, we collected:

  • Short description of the ticket
  • Detailed description of the problem
  • Urgency level (Low, Medium or High)

📘

For this example, we have captured limited information for the ticket. Depending on your use case and internal business processes, a number of fields can be captured via the bot and passed on to the ServiceNow module in Make.

Step 3 - Setup Webhook response

This is the last module in this scenario. This step enables us to respond to the bot user with a confirmation that their ticket has been registered in ServiceNow and provides them a reference for further follow up. Start by adding a webhook response module in the scenario.


You can compose the response message in anyway you would like or use the sample code below:

"{
  "recipient": {
    "id": "{{1.fbuser.fbid}}"
  },
  "message": {
    "text": "Your ticket has been successfully submitted. Your ticket number reference is {{7.task_effective_number}}"
  }
}"

Here's how the configuration looks on Make:

After configuring the last module, save your scenario and turn it on. If everything was setup correctly, the bot should respond with a ticket number at the end of the flow. The ticket should appear in the ServiceNow incident portal:

Learn more

If you enjoyed this tutorial and would like to build awesome integrations like these, Drop your details below and we'll be in touch