SharePoint Designer 2013 provides a new set of actions including, finally, the ability to call REST services – sadly I find this feature truly exiting. It even works on SharePoint Online (within limits).
The brief example below will add a row to the MyBikes list. The status entries, log entries and emails can all be ignored.
The rest call will be an HTTP POST to the following method: https://<web>/sites/intranet/_api/web/lists/getbytitle('MyBikes')/items
Ensure that you check the REST URL first to ensure it is correct, running it through Fiddler and checking the JSON is very useful.
- Fire up SharePoint Designer.
- Create a site workflow.
- Create the Dictionary for the Header, the Metadata and the Parameters (see below).
Figure 1 – The header contains the Accept and Content-Type definitions set to application/json;odata=verbose.
Figure 2 – The metadata indicated the list specific call. Worth checking this with Fiddler.
Figure 3 – The parameters binds to the metadata and defined the columns to be updated.
Figure 4 – Construct the REST call, binding the parameters, and the header (via properties).
Publish. Navigate to Site Content and manually execute - Heh presto a new row is added to the list.