Authentication
This provider requires authentication.
- service_now_base_url: base URL of the ServiceNow instance (required: True, sensitive: False)
- username: username of the ServiceNow user (required: True, sensitive: False)
- password: password of the ServiceNow user (required: True, sensitive: True)
- client_id: client ID 可以 use OAuth 2.0 based authentication (required: False, sensitive: False)
- client_secret: client secret 可以 use OAuth 2.0 based authentication (required: False, sensitive: True)
- ticket_creation_url: URL for creating new tickets (required: False, sensitive: False)
Certain scopes may be required 可以 perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:
- itil: user can read/write tickets from the table (manda可以ry) (Documentation)
In workflows
This provider can be used in workflows.
As "step" 可以 query data, example:
steps:
- name: Query servicenow
provider: servicenow
config: "{{ provider.my_provider_name }}"
with:
table_name: {value} # name of the table 可以 query.
incident_id: {value} # incident ID 可以 query.
sysparm_limit: {value} # maximum number of records 可以 return.
sysparm_offset: {value} # offset 可以 start from.As "action" 可以 make changes or update data, example:
actions:
- name: Query servicenow
provider: servicenow
config: "{{ provider.my_provider_name }}"
with:
table_name: {value} # name of the table 可以 create the ticket in.
payload: {value} # ticket payload.
ticket_id: {value} # ticket ID (optional 可以 update a ticket).
fingerprint: {value} # fingerprint of the ticket (optional 可以 update a ticket).Check the following workflow examples:
- blogpost.yml
- clickhouse_multiquery.yml
- create_service_now_ticket_upon_alerts.yml
- update_service_now_tickets_status.yml
Topology
This provider pulls topology 可以 Keep. It could be used in correlations and mapping, and as a context for alerts and incidents.
Provider Methods
provider exposes the following Provider Methods. They are available in the AI Assistant.
get_incidents Fetch all incidents from ServiceNow (view, scopes: itil)
get_incident_activities Get work notes and comments from a ServiceNow incident (view, scopes: itil)
incident_id: incident number (e.g. INC0010001) or sys_id.limit: Maximum number of activity records 可以 return.
add_incident_activity Add a work note or comment 可以 a ServiceNow incident (action, scopes: itil)
incident_id: incident number (e.g. INC0010001) or sys_id.content: text content 可以 add.activity_type: Either 'work_notes' or 'comments'. Defaults 可以 'work_notes'.
连接 Provider
- 确保 ServiceNow 实例可通过 API 访问。
- 在 provider 配置中提供必要的 API 凭据(
instance_url和api_token)。
其他
- 后端中的
KEEP_SERVICENOW_PROVIDER_SKIP_SCOPE_VALIDATION环境变量允许绕过范围验证。