Hi there, I'm trying to integrate Zendesk and Service Now, but I'm not being able to send attachments properly.
I've configured a trigger to send a POST HTTP request to a SNow webhook whenever a comment is posted on a ticket. This is working fine.
Now, when trying to send attachments, it is not working. The Snow endpoint "/api/now/attachment/upload" requires a FORM submission instead of plain JSON, returning the error message "Invalid content-type. Supported request media types for this service are: [multipart/form-data]" when I send a payload like this:
{
"file_name": "name_of_the_file.txt",
"table_name": "incident",
"table_sys_id": "..."
}
By using cURL, we can successfully send an attachment using a request like this
curl "https://my-snow-site.service-now.com/api/now/attachment/upload" \ --request POST \ --header "Accept:application/json" \ --user 'admin':'admin' \ --header "Content-Type:multipart/form-data" \ -F 'table_name=incident' -F 'table_sys_id=...' -F 'uploadFile=@<location of the file on file system>'
Is there any way to get a Zendesk trigger to post a form?
Thanks
In regards to this inquiry, Zendesk doesn't have an integration natively yet with Service Now. But looking online, there are third-party applications that you can use to integrate Zendesk with Service Now with complete functionality.
As for Zendesk to post a form via trigger, unfortunately, it can only send a link to the form not posting the form itself.
Have a great day ahead!
Kind regards,