cancel
Showing results for 
Search instead for 
Did you mean: 
Automation Master
Automation Master

Call WebService error

Jump to solution

Hi,

I'm following Ben Stori‌ blog Get List Item Attachments using Web Services  to get the name of an attachment from a workflow task form so that it can be used later on in the workflow for building a hyperlink to it.

I'm getting a "Bad Request" response. First time using this action in O365 and there's plenty that looks wrong with what I'm doing, but hoping someone might be able to help me out with this.

Firstly I've built the dictionary

When I output this in an email I get this (are those additional backslashes meant to be there?)

{"Content-type":"application\/json;odata=verbose","Accept":"application\/json;odata=verbose"}

Then I build the URL

{Workflow Context:Current site URL}_api/web/lists/getbytitle('Workflow Tasks')/items(‍{Variable:vnumTaskID}‍)/attachmentFiles

When I output this in an email I get this

https://tenantname/sites/heals/_api/web/lists/getbytitle('Workflow Tasks')/items(117)/attachmentFiles

This looks right to me.

Then my Call Web Service action is configured with the following

Can anyone see why I'm getting the "BadRequest" error?

Thanks

Labels: (2)
0 Kudos
Reply
3 Replies
Highlighted
Automation Master
Automation Master

Re: Call WebService error

Jump to solution

Ignore me. The URL had a carriage return inserted into it, not sure why.

Reply
Automation Master
Automation Master

Re: Call WebService error

Jump to solution

I am glad you were able to get this working!

0 Kudos
Reply
Automation Master
Automation Master

Re: Call WebService error

Jump to solution

yes, ahem, user error.

0 Kudos
Reply