serviceNow.json•11.6 kB
{
"nodeType": "n8n-nodes-base.serviceNow",
"displayName": "ServiceNow",
"description": "Consume ServiceNow API",
"version": 1,
"properties": [
{
"name": "tableName",
"displayName": "Table Name or ID",
"type": "options",
"default": "",
"description": "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
"required": true,
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"upload",
"getAll"
]
}
}
},
{
"name": "id",
"displayName": "Table Record ID",
"type": "string",
"default": "",
"description": "Sys_id of the record in the table specified in Table Name that you want to attach the file to",
"required": true,
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"upload"
]
}
}
},
{
"name": "inputDataFieldName",
"displayName": "Input Data Field Name",
"type": "string",
"default": "data",
"description": "Name of the binary property that contains the data to upload",
"required": true,
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"upload"
]
}
}
},
{
"name": "options",
"displayName": "Options",
"type": "collection",
"default": {},
"description": "Name to give the attachment",
"placeholder": "Add Field",
"options": [
{
"name": "file_name",
"displayName": "File Name for the Attachment",
"type": "string",
"default": "",
"description": "Name to give the attachment"
}
],
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"upload"
]
}
}
},
{
"name": "attachmentId",
"displayName": "Attachment ID",
"type": "string",
"default": "",
"description": "Sys_id value of the attachment to delete",
"required": true,
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"delete"
]
}
}
},
{
"name": "returnAll",
"displayName": "Return All",
"type": "boolean",
"default": false,
"description": "Whether to return all results or only up to a given limit",
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"getAll"
]
}
}
},
{
"name": "limit",
"displayName": "Limit",
"type": "number",
"default": 50,
"description": "Max number of results to return",
"typeOptions": {
"minValue": 1,
"maxValue": 500
},
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"getAll"
],
"returnAll": [
false
]
}
}
},
{
"name": "download",
"displayName": "Download Attachments",
"type": "boolean",
"default": false,
"required": true,
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"get",
"getAll"
]
}
}
},
{
"name": "outputField",
"displayName": "Output Field",
"type": "string",
"default": "data",
"description": "Field name where downloaded data will be placed",
"displayOptions": {
"show": {
"resource": [
"attachment"
],
"operation": [
"get",
"getAll"
],
"download": [
true
]
}
}
},
{
"name": "operation",
"displayName": "Operation",
"type": "options",
"default": "upload",
"description": "Upload an attachment to a specific table record",
"options": [
{
"name": "Upload",
"value": "upload",
"description": "Upload an attachment to a specific table record"
},
{
"name": "Delete",
"value": "delete",
"description": "Delete an attachment"
},
{
"name": "Get",
"value": "get",
"description": "Get an attachment"
},
{
"name": "Get Many",
"value": "getAll",
"description": "Get many attachments on a table"
}
],
"displayOptions": {
"show": {
"resource": [
"attachment"
]
}
}
},
{
"name": "short_description",
"displayName": "Short Description",
"type": "string",
"default": "",
"description": "Short description of the incident",
"required": true,
"displayOptions": {
"show": {
"resource": [
"incident"
],
"operation": [
"create"
]
}
}
},
{
"name": "additionalFields",
"displayName": "Additional Fields",
"type": "collection",
"default": {},
"description": "Which user is the incident assigned to. Requires the selection of an assignment group. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
"placeholder": "Add Field",
"displayOptions": {
"show": {
"resource": [
"incident"
],
"operation": [
"create"
]
}
}
},
{
"name": "updateFields",
"displayName": "Update Fields",
"type": "collection",
"default": {},
"description": "Which user is the incident assigned to. Requires the selection of an assignment group. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
"placeholder": "Add Field",
"displayOptions": {
"show": {
"resource": [
"incident"
],
"operation": [
"update"
]
}
}
},
{
"name": "dataToSend",
"displayName": "Data to Send",
"type": "options",
"default": "columns",
"description": "Use when node input names match destination field names",
"options": [
{
"name": "Auto-Map Input Data to Columns",
"value": "mapInput",
"description": "Use when node input names match destination field names"
},
{
"name": "Define Below for Each Column",
"value": "columns",
"description": "Set the value for each destination column"
},
{
"name": "Nothing",
"value": "nothing",
"description": "Don't send any column data"
}
],
"displayOptions": {
"show": {
"resource": [
"tableRecord"
],
"operation": [
"create"
]
}
}
},
{
"name": "inputsToIgnore",
"displayName": "Inputs to Ignore",
"type": "string",
"default": "",
"description": "List of input properties to avoid sending, separated by commas. Leave empty to send all inputs.",
"displayOptions": {
"show": {
"resource": [
"tableRecord"
],
"operation": [
"create"
],
"dataToSend": [
"mapInput"
]
}
}
},
{
"name": "fieldsToSend",
"displayName": "Fields to Send",
"type": "fixedCollection",
"default": {},
"description": "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
"placeholder": "Add field to send",
"typeOptions": {
"multipleValues": true
},
"displayOptions": {
"show": {
"resource": [
"tableRecord"
],
"operation": [
"create"
],
"dataToSend": [
"columns"
]
}
}
},
{
"name": "getOption",
"displayName": "Retrieve Identifier",
"type": "options",
"default": "id",
"description": "Unique identifier of the user",
"required": true,
"options": [
{
"name": "ID",
"value": "id"
},
{
"name": "Username",
"value": "user_name"
}
],
"displayOptions": {
"show": {
"resource": [
"user"
],
"operation": [
"get"
]
}
}
},
{
"name": "user_name",
"displayName": "Username",
"type": "string",
"default": "",
"description": "Unique identifier of the user",
"required": true,
"displayOptions": {
"show": {
"resource": [
"user"
],
"operation": [
"get"
],
"getOption": [
"user_name"
]
}
}
},
{
"name": "authentication",
"displayName": "Authentication",
"type": "options",
"default": "oAuth2",
"description": "Authentication method to use",
"options": [
{
"name": "Basic Auth",
"value": "basicAuth"
},
{
"name": "OAuth2",
"value": "oAuth2"
}
]
},
{
"name": "resource",
"displayName": "Resource",
"type": "options",
"default": "user",
"options": [
{
"name": "Attachment",
"value": "attachment"
},
{
"name": "Business Service",
"value": "businessService"
},
{
"name": "Configuration Item",
"value": "configurationItems"
},
{
"name": "Department",
"value": "department"
},
{
"name": "Dictionary",
"value": "dictionary"
},
{
"name": "Incident",
"value": "incident"
},
{
"name": "Table Record",
"value": "tableRecord"
},
{
"name": "User",
"value": "user"
},
{
"name": "User Group",
"value": "userGroup"
},
{
"name": "User Role",
"value": "userRole"
}
]
}
],
"credentialsConfig": [
{
"name": "serviceNowOAuth2Api",
"required": true
},
{
"name": "authentication",
"required": false
},
{
"name": "resource",
"required": false
}
],
"io": {
"inputs": [
"Main"
],
"outputs": [
"Main"
],
"outputNames": [],
"hints": {}
},
"wiring": {
"role": "generic",
"requires": [],
"optional": [],
"consumedBy": [],
"consumes": [
"Main"
],
"produces": [
"Main"
]
}
}