• DOCUMENTATION
  • WORKATO BLOG
  • PRODUCT BLOG
  • Return to Workato
  • Log in
  • ☰
  • Community/Discussions
New Topic
Discussions Enhancement Requests Application Enhancements
P

Paul Hutcherson

started a topic over 5 years ago
Planned

ServiceNow Attachments - Add Ability to Add Attachments

I'd like to request a feature.


The service now connector doesn't appear to allow for me to create an attachment in a record. We are attempting to post an MMS media image to an incident and ServiceNow does support post actions,


https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/integrate/inbound-rest/reference/r_AttachmentAPI-POST.html


However, it doesn't appear that I can accomplish this through the base app connection.

Allan Teng

said over 5 years ago

Hi Paul, thank you for suggesting this. Our team is planning to have this feature in the near future.

P

Paul Hutcherson

said over 5 years ago
That's great news.  In the meantime, I posted our attachments using the API that service now provides.  I was able to accomplish my objective relatively quickly. 

 

P

Prashant Gadgil

said about 4 years ago

Any update on this? I have this use case to be able to upload attachments to servicenow records.

Is this built into the workato product somehow? If so can someone send me link to its documentation.


If not, Paul, would you mind sharing your recipe?

P

Paul Hutcherson

said about 4 years ago
I'm hesitant to share the recipe as it's an HTTP call and scrubbing everything is challenging.  However, learning how to set it up is pretty easy, you simply need to use a post method into your instance name


Method: HTTP POST

Request URL: https://[[serviceNowInstanceName]].service-now.com/api/now/attachment/file?table_name=[[moduleTableName]]&table_sys_id=[[sys_id_of_destination_record]]&file_name=[[name_of_file]]


Request Body: Is the raw file contents. 


Response body from servicenow will be something like,

{
    "result": {
        "size_bytes": "26",
        "file_name": "blah",
        "sys_mod_count": "0",
        "average_image_color": "",
        "image_width": "",
        "sys_updated_on": "2017-02-10 22:34:20",
        "sys_tags": "",
        "table_name": "incident",
        "sys_id": "123456789",
        "image_height": "",
        "download_link": "https://instancename.service-now.com/api/now/attachment/123456789/file",
        "content_type": "text/plain",
        "sys_created_on": "2017-02-10 22:34:20",
        "size_compressed": "46",
        "compressed": "true",
        "table_sys_id": "123789",
    }
}


So take the following example,


I'm posting to an instance called, TestInstance into the Incident table against an incident that has a sys id of 998877665544.  You would post to the following url using an admin account,


Request URL: https://testinstance.service-now.com/api/now/attachment/file?table_name=incident&table_sys_id=998877665544&file_name=fileName.jpg


I created a callable recipe that takes all the parameters and handles the post, that way you can call it from a myriad of other recipes. 

P

Prashant Gadgil

said about 4 years ago

Hello,

What connector are you using or can we use to download a file? I am trying to download a file from Google drive and then putting the file as attachment to a record on SNOW table.  I am using Files By Workato/ Download file from URL connector to get content. But somehow the content is not downloaded fully. So I see an attachment on SNOW record, but the file cannot be opened.

Any ideas?

Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2020   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count