Connectors
...
Actions
Add Attachment to Table
6 min
description adds an attachment to a servicenow table using the provided file name, table name, and system id endpoint url api/now/attachment/file method post inputs attachments (array) – required file to be uploaded file name (string) – required file (string) – required parameters (object) encryption context (string) sys id of an encryption context record specify this parameter to allow only users with the specified encryption context to access the attachment file name (string) – required table name (string) – required table sys id (string) – required sys id of the record in the table specified in table name that you want to attach the file to headers (object) content type (string) – required output example \[ { "status code" 201, "response headers" { "server timing" "sem wait;dur=0, sesh wait;dur=0", "content encoding" "gzip", "x is logged in" "true", "x transaction id" "89f9d2509783", "location" "https //dev130168 service now\ com/api/now/attachment/41f9dad09783111084d57e121153af94/file", "x content type options" "nosniff", "pragma" "no store,no cache", "cache control" "no cache,no store,must revalidate,max age= 1", "expires" "0", "content type" "application/json;charset=utf 8", "transfer encoding" "chunked", "date" "sat, 05 nov 2022 00 53 43 gmt", "keep alive" "timeout=20", "connection" "keep alive", "server" "servicenow", "set cookie" "glide user=; max age=0; expires=thu, 01 jan 1970 00 00 10 gmt; path=/; httponly; samesite=none; secure, glide user session=; max age=0; expires=thu, 01 jan 1970 00 00 10 gmt; path=/; httponly; samesite=none; secure, glide user route=glide f6d1c4085a807931391acf9b7192b09e; max age=2147483647; expires=thu, 23 nov 2090 04 07 50 gmt; path=/; httponly; samesite=none; secure, glide session store=09f91adc9743111084d57e121153afde; max age=1800; expires=sat, 05 nov 2022 01 23 43 gmt; path=/; httponly; samesite=none; secure", "strict transport security" "max age=63072000; includesubdomains" }, "reason" "created", "json body" { "result" { "size bytes" "5881", "file name" "test", "sys mod count" "0", "average image color" "", "image width" "", "sys updated on" "2022 11 05 00 53 43", "sys tags" "", "table name" "incident", "sys id" "41f9dad09783111084d57e121153af94", "image height" "", "sys updated by" "admin", "download link" "https //dev130168 service now\ com/api/now/attachment/41f9dad09783111084d57e121153af94/file", "content type" "application/json", "sys created on" "2022 11 05 00 53 43", "size compressed" "4343", "compressed" "true", "state" "pending", "table sys id" "1c741bd70b2322007518478d83673af3", "chunk size bytes" "700000", "hash" "8671fa6613cd1c6e82c0e1d6b940ae0771d1d8b3f56019f8274ed501407ffc2a", "sys created by" "admin" } } } ] output parameters status code (number) reason (string) json body (object) result (object) size bytes (string) file name (string) sys mod count (string) average image color (string) image width (string) sys updated on (string) sys tags (string) table name (string) sys id (string) image height (string) sys updated by (string) download link (string) content type (string) sys created on (string) size compressed (string) compressed (string) state (string) table sys id (string) chunk size bytes (string) hash (string) sys created by (string) response headers header type server timing string content encoding string x is logged in string x transaction id string location string x content type options string pragma string cache control string expires string content type string transfer encoding string date string keep alive string connection string server string set cookie string strict transport security string