Skip to main content

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

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


I am glad you were able to get this working!


yes, ahem, user error.


Reply