Attachment to service API

Is there a way to attach files and use it in service api as file to upload it to other sites

Hi @sureshd,

You can use an entity node with the “Attachment” type which will prompt the user to upload a file and then you can use the entity node output to pass this to the service node API.

Regards,
Yoga Ramya

Hi @yogaramya.mendu ,
In my API I need to give like ‘uploadFile=@ location of the file on file system’, here how can I mention the location in kore.ai

Regards,
Suresh

Hi @sureshd,

When a file is uploaded to the entity node, the file object is returned as per the following screenshot:

image

Also, in the context object >> botUserSession >> channels, you can observe the attachment object.

Let us know if you need any further clarification.

Regards,
Yoga Ramya

Hi @yogaramya.mendu,

I can upload the image file and able to get the url,
image
after that i need to use this image file in a API(service node in kore.ai), by mentioning the filename along with path of the file for example in curl,
curl “https://instance.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=xxxxxxxxxx’ -F ‘encryption_context=undefined’-F ‘uploadFile=@ location of the file on file system’
So, how to do this in kore.ai service node, for example
image

I tried this, but it is not working

Hi @yogaramya.mendu,

Any update on this?

Here I need to attach the file in API, ‘uploadFile=@ location of the file on file system’.

Regards,
Suresh