PowerAutomate - Upload an Attachment (Preview)

ginsardi
Kilo Contributor

Has anyone had any sort of luck using the Upload an Attachment action of the ServiceNow Power Automate connector?

 

We have a new deployment this week, and I have a simple Microsoft Form that triggers a new incident to be created in ServiceNow. All that works great, but I can't for the life of me add a file attachment to the incident. My content, name, sys_id and table are all correct, but for whatever reason it keeps rejecting the content of the file and will just fail every time.

 

From what I can tell the connector is just sending an HTTP request. I'm curious if anyone has gotten it to work?

3 REPLIES 3

remid
Tera Contributor

I'm trying to accomplish the same thing but could not make it work either - not sure that connector is working quite yet

yesubabu Jonnal
Tera Contributor

Use the Http Action

& Use the below setup 

1.Base Path :https://XXXX.service-now.com/api/now/attachment/upload
2.Headers
Accept :application/json
Content-Type :application/json OR Content-Type :multipart/form-data


3 .Body -payload
-------------
{
"table_name": "sc_request",
"table_sys_id": {record sys_id} ,
"filename": "file path from your local data"

 

PFA Image 
}

Thanks for this! I'll give it a try.