> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ServiceNow integration

[Back to list of enterprise systems](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems.md)

Use the ServiceNow integration to create, retrieve, update, and search records in ServiceNow tables, and to attach or find files. It also provides triggers for new or updated records.

| Authentication | Actions | Triggers |
| - | - | - |
| OAuth 2.0, Client Creds, OAuth Password, Basic | ([6](#supported-actions)) | ([2](#triggers)) |

## Supported actions

| Action | Use it to |
| - | - |
| [Create Record](#create-record) | Create a new record in a specified table |
| [Update Record](#update-record) | Update an existing record in a specified table |
| [Get Record](#get-record) | Retrieve a specific record by its ID |
| [Find Records](#find-records) | Search for records in a table using a query |
| [Attach File to Record](#attach-file-to-record) | Upload and attach a file to a record |
| [Find File](#find-file) | List or download file attachments from a record |

## Triggers

| Trigger | Fires when |
| - | - |
| [New Record](#new-record) | Triggers when a new record is created in a table |
| [Updated Record](#updated-record) | Triggers when a record is updated in a table |

## Prerequisites

* A ServiceNow instance and an account with access to the tables and records your tools will use.
* A ServiceNow domain and credentials for one of the authentication methods offered in Studio.

## Set up the integration

**1. Create a ServiceNow auth profile**

In **Tools**, select **New Tool** > **Action** > **ServiceNow** > **Continue** > **Manage profiles**. On **Project Auth Profiles**, select **New Profile** > **Integration Profile** > **ServiceNow** > **Continue**. Choose an authentication type and enter the required credentials. For OAuth 2.0, Studio supplies the authorization and token endpoints, the useraccount scope, and a callback URL to register in ServiceNow.

**2. Configure the action tool**

Return to the action builder, select the ServiceNow action and auth profile, configure its inputs, and create the tool. Then [assign the tool to an agent](https://koreai.mintlify.site/agent-platform/tools/actions.md#assign-an-action-to-an-agent).

## Action reference

The tables include required and optional inputs shown in the Studio action builder. Table and record dropdowns load values from the connected ServiceNow instance.

> [accordion] Create Record
>
> | Parameter | Type | Required |
> | - | - | - |
> | `table` | dropdown | Yes |
> | `fields` | object | Yes |
> | `sysparm_display_value` | dropdown | No |
> | `sysparm_fields` | array | No |
> | `sysparm_input_display_value` | boolean | No |
> | `sysparm_view` | dropdown | No |

> [accordion] Update Record
>
> | Parameter | Type | Required |
> | - | - | - |
> | `table` | dropdown | Yes |
> | `record` | dropdown | Yes |
> | `manual_sys_id` | string | No |
> | `fields` | object | Yes |
> | `sysparm_display_value` | dropdown | No |
> | `sysparm_fields` | array | No |
> | `sysparm_input_display_value` | boolean | No |
> | `sysparm_view` | dropdown | No |

> [accordion] Get Record
>
> | Parameter | Type | Required |
> | - | - | - |
> | `table` | dropdown | Yes |
> | `record` | dropdown | Yes |
> | `manual_sys_id` | string | No |
> | `sysparm_display_value` | dropdown | No |
> | `sysparm_exclude_reference_link` | boolean | No |
> | `sysparm_fields` | array | No |
> | `sysparm_query_no_domain` | boolean | No |
> | `sysparm_view` | dropdown | No |

> [accordion] Find Records
>
> | Parameter | Type | Required |
> | - | - | - |
> | `table` | dropdown | Yes |
> | `query` | string | Yes |
> | `limit` | number | No |
> | `fields` | array | No |
> | `sysparm_display_value` | dropdown | No |
> | `sysparm_exclude_reference_link` | boolean | No |
> | `sysparm_query_no_domain` | boolean | No |
> | `sysparm_view` | dropdown | No |

> [accordion] Attach File to Record
>
> | Parameter | Type | Required |
> | - | - | - |
> | `table` | dropdown | Yes |
> | `record` | dropdown | Yes |
> | `manual_sys_id` | string | No |
> | `file_name` | string | No |
> | `content_type` | dropdown | No |
> | `fileBase64` | string | No |
> | `encryption_context` | string | No |
> | `file` | file | No |

> [accordion] Find File
>
> | Parameter | Type | Required |
> | - | - | - |
> | `action_type` | dropdown | Yes |
> | `table` | dropdown | Yes |
> | `record` | dropdown | Yes |
> | `manual_sys_id` | string | No |
> | `filename` | string | No |
> | `attachment_sys_id` | string | No |
> | `accept_type` | dropdown | No |
> | `return_format` | dropdown | No |

The table selector includes common tables such as Incident (`incident`), Change Request (`change_request`), Problem (`problem`), Service Request (`sc_request`), Requested Item (`sc_req_item`), Catalog Task (`sc_task`), Task (`task`), User (`sys_user`), Group (`sys_user_group`), Configuration Item (`cmdb_ci`), and Knowledge (`kb_knowledge`). It can also return other tables available in the connected instance.

## Trigger reference

The optional filter uses a ServiceNow encoded query, for example: priority=1^state=1.

> [accordion] New Record
>
> Triggers when a new record is created in a table
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `table` | dropdown | Yes | ServiceNow table to work with |
> | `filter` | string | No | Encoded query to filter records (e.g., priority=1^state=1) |

> [accordion] Updated Record
>
> Triggers when a record is updated in a table
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `table` | dropdown | Yes | ServiceNow table to work with |
> | `filter` | string | No | Encoded query to filter records (e.g., priority=1^state=1) |

**Find Records** uses a default limit of 1,000 records. Large results may be trimmed to fit connector response limits.

## File attachments

For **Attach File to Record**, provide either a file input or the fileBase64 parameter. The file input accepts a file from an earlier step, a link, or file content. Server file paths are not supported. If the file name or content type is omitted, the connector uses the file name and infers the content type when possible.

For **Find File**, action\_type selects whether to list attachments or download a file. You can optionally filter by file name or provide an attachment sys\_id; the default accepted type is any file, and the default return format is a Base64 encoded string.

## Troubleshoot common issues

| Issue | Resolution |
| - | - |
| Authorization or table lookup fails | Check the ServiceNow instance URL or domain and confirm the selected profile's credentials can access the instance and table. |
| A record is not available in the dropdown | Select the correct table or enter the record sys\_id in manual\_sys\_id. |
| A trigger does not fire | Confirm the selected table and review the optional encoded filter query. |
| File attachment fails | Provide file content through File or fileBase64; server file paths are not supported. Confirm the record ID and attachment permissions. |
| A record search returns fewer rows than expected | Check the limit and query. Large responses may be limited by the connector. |

## Related articles

* [Auth profiles](https://koreai.mintlify.site/agent-platform/administration/integrations-settings.md#auth-profiles)
* [Action Tools](https://koreai.mintlify.site/agent-platform/tools/actions.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.