ServiceNow

Add Comment to ServiceNow Incident

Adds a customer-visible comment to an existing ServiceNow incident.

Unverified

Add this first. This tool needs an access token, so add Get ServiceNow Access Token to the same bot. The bot calls it first and passes the token in.

What the model is told

Get a ServiceNow access token first if you do not already have one. Add a customer-visible additional comment to an incident, for example when the customer gives new information they want the team to see. You need the incident sys_id, which you can get from the Get ServiceNow Incident Status tool. Confirm the wording with the customer first.

Request

PATCHhttps://YOUR_INSTANCE.service-now.com/api/now/table/incident/{{sysId}}?sysparm_fields=number,sys_id

Headers

  • Content-Typeapplication/json
  • AuthorizationBearer {{accessToken}}
  • Acceptapplication/json

Body

{
  "comments": "{{comment}}"
}

Parameters

  • sysId stringThe incident sys_id from Get ServiceNow Incident Status.
  • comment stringThe comment text.
  • accessToken stringThe access_token value returned by Get ServiceNow Access Token. Reuse it for the rest of the conversation.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "7c5c8393-96bd-46f9-9a87-90367698cf71",
    "type": "HTTP_REQUEST",
    "label": "Add Comment to ServiceNow Incident",
    "name": "add_comment_to_servicenow_incident",
    "customName": false,
    "description": "Get a ServiceNow access token first if you do not already have one. Add a customer-visible additional comment to an incident, for example when the customer gives new information they want the team to see. You need the incident sys_id, which you can get from the Get ServiceNow Incident Status tool. Confirm the wording with the customer first.",
    "parameters": [
      {
        "name": "sysId",
        "type": "string",
        "description": "The incident sys_id from Get ServiceNow Incident Status."
      },
      {
        "name": "comment",
        "type": "string",
        "description": "The comment text."
      },
      {
        "name": "accessToken",
        "type": "string",
        "description": "The access_token value returned by Get ServiceNow Access Token. Reuse it for the rest of the conversation."
      }
    ],
    "config": {
      "endpoint": {
        "method": "PATCH",
        "url": "https://YOUR_INSTANCE.service-now.com/api/now/table/incident/{{sysId}}?sysparm_fields=number,sys_id"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Authorization",
          "value": "Bearer {{accessToken}}"
        },
        {
          "name": "Accept",
          "value": "application/json"
        }
      ],
      "body": "{\n  \"comments\": \"{{comment}}\"\n}",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.