Use Case - Creating an Incident Task in ServiceNow

Create an incident record in ServiceNow based on the caller's information.

We want to create an incident Record in ServiceNow based on the information the caller gives us.

The flow is as follows:

  1. A caller calls the IT Helpdesk Number.
  2. In the Nimbus workflow there is a "Customer Input" element asking whether the caller wants to get help from an agent or if he wants to report an incident.
  3. If the caller chooses the incident report we save the decision into a Parameter.
  4. The Power Automate flow starts with a "OnUpdatedTask" Session Event item and checks on the "ParameterUpdatedTrigger Event. If the Parameter is “report incident” then the flow is triggered.

Show a preview of the flow...

 
 

PRECONDITIONS

  • Power Automate Premium subscription for the "Service Now" connector element.
  • A service Now connection. Alternatively a dev box as described below.
  • If you have a running ServiceNow instance to test your flow on, you can go directly to Step 3.
 

 Show Icon Legend

💡 = A hint to signal learnings, improvements or useful information in context. 🔍 = Info points out essential notes or related page in context.
☝ = Notifies you about fallacies and tricky parts that help avoid problems. 🤔 = Asks and answers common questions and troubleshooting points.
❌ = Warns you of actions with irreversible / data-destructive consequence. ✅ = Intructs you to perform a certain (prerequired) action to complete a related step.
 
 

How-To Steps

Create your ServiceNow dev box

  1. Sign up on https://developer.servicenow.com
  2. Go to the instructions on how to obtain a Personal Developer Instance (PDI) and create your instance.
     ✅ Note down the connection details for later!
  3. Check that in In ServiceNow the status of your instance should show "Online".
  4. Open and log into your box.
  5. Find the Incidents table and open it.
  6. Find the user who has read/write permissions on it (per default Incident.Manager)
  • You can always view connection credentials in My Instance ->"Manage instance password"
  • If you don’t use your instance for more than 10 days, ServiceNow will back it up. Recovery might take very long or cause errors, so we recommend creating a fresh one if you need to test again.
 

Prepare Nimbus parameters

🔍 In PowerAutomate we can evaluate the choice of the "Collect Information" workflow activity and create a ServiceNow ticket accordingly. 

  1. In this example we store the input into a Parameter called (CustomerChoice).
  2. For ServiceNow and the Flow we also need to create the parameter in Configuration -> Parameters -> Create new.
    1. ServiceNowUrl
    2. ServiceNowTicket
    3. ServiceNowSysId

Create the flow

  1. We start with "GetOnUpdatedTask" trigger element and want to listen to the "Parameter Updated" event.
  2. Add a ServiceNow element to the flow and connect to it with a user that has permissions to read and write to it.
  3. Rename it to “Add Incident
  4. Add the values
    • Short description Incident via Nimbus triggerOutputs()?['body/teamName']
    • Correlation display= triggerOutputs()?['body/id']
    • Actual start triggerOutputs()?['body/created']
    • Contact type triggerOutputs()?['body/customer/displayName']
  5. Add a Nimbus UpdateTask element and map the corresponding fields
    1. CustomContextParameters Name= ServiceNowUrl value= concat('https://dev123456.service-now.com/nav_to.do?uri=incident.do?sys_id=', outputs('Add_Incident')?['body/result/sys_id'])
      ✅ Adapt the URL according to your connection details above.
    2. Customer.CustomFields Name = ServiceNowSysId value= outputs('Add_Incident')?['body/result/sys_id']
    3. Customer.CustomFields Name = ServiceNowTicket value= outputs('Add_Incident')?['body/result/number']

Test your flow

  1. Run your flow by calling your main service number
  2. Input the corresponding user choice for the incident response team
  3. Verify in ServiceNow that the incident has been created

Table of Contents