Execute HTTP-Requests within SharePoint Workflows.
1. Add “HTTP-Request” Action to a SharePoint Designer 2010 Workflow
2. Configure the action
URL: The URL for the request
Method: The HTTP Verb: GET, POST; PUT; DELETE
Header: The HTTP Header for the request. Write each header in a new line:
HEADER LINE 1: ContentType: text/plain
HEADER LINE 2: …
HEADER LINE 3: …
Body: The Body of the HTTP-Request
User: The user name for requests that needs authentication e.g. “Contoso\Administrator”. Instead of using user name and password you can use Secure Store Credentials.
Password: The password for the user. Unfortunately there isn’t a masked text box :-( You could either specify the password in clear text or encrypted like described here: [Encrypt Passwords for SharePoint Designer Workflow Actions]
AppId: The The Secure Store Application ID. The Secure Store App have to define 2 Fields. One of type “User Name” and one of type “Password”. The Field Name doesn’t matter, important is the Field Type! ou have
to map the credentials of the SharePoint Service Accounts (AppPool/owstimer.exe). The secure store option will only works with SharePoint Server not with Foundation!
Response: The response of the HTTP-Request. The result should be XML because you can further process it.
Example: Twitter Search
The example writes result to to the Result field in the current list item.
Example 2: SharePoint ListsData.svc
Because the service must to authenticate, the example uses the secure store application test to get credentials. The app will look for the mapped credentials for the SharePoint Service Account of the current process (AppPool or owstimer.exe).
Usually you will process the resulting XML with the [Query XML Action].
3. Publish and run