Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Not able to use "Copy Attachment to Folder" spoke action for copy attachment to SP from ServiceNow

as00929632
Tera Contributor

I want to copy attachment from ServiceNow to SharePoint. To achieve this functionality, There is one out of box spoke action "Copy Attachment to Folder" available in Microsoft SharePoint Online Spoke. This action needs 4 inputs.

 

1. Tenant

2. Site Location

3. Document Library Name

4. Folder Location

5. Attachment

 

My target SharePoint URL is https://<COMPANY_NAME>.sharepoint.com/teams/NonProdInstance/Shared Documents/Forms/AllItems.aspx

 

In this website, We have one folder - "MyAttachments". I want to copy attachments to this folder.

 

When I am passing below parameters, getting error - "Incorrect formatted Request"

 

1. Tenant: <passing tenant ID here, connection is working fine. I tested for other actions>

2. Site Location: https://<COMPANY_NAME>.sharepoint.com/teams/NonProdInstance

3. Document Library Name: Shared Documents

4. Folder Location: MyAttachments

5. Attachment: attachment sys ID

 

 

Please guide how can i achieve this functionality. what logic/step is missing??

 

2 REPLIES 2

kyzzy
Tera Expert

Hi, 

Your Site Location path is incorrect. The correct format will be "sites/SiteLocationName"

example: https://<COMPANY_NAME>.sharepoint.com/sites/SiteLocationName/DocumentLibrary/FolderLocation/attachment sys ID.txt

I hope this answer help you!

 

sjabali
Tera Contributor

Did you resolve this? I am getting the same error