Microsoft Flow provides many features and integration options not available when using basic skybow actions.
But you can start a Microsoft Flow from skybow actions quite easily by using the HTTP Request action:
- Create a MS Flow with a Request trigger and the steps you want
- Configure the URL and JSON payload in an HTTP Request action type in Rich Forms or Action Links
So let's run through a simple example: We will create a new Google task when clicking action links on the display form of a SharePoint item.
Create a Microsoft Flow
First we will do the MS Flow side of things. So open the Microsoft Flow portal and sign in (or register if you haven't yet). Next select the "My Flows" and click on the "Create from blank" button:
As a trigger insert a Request trigger:
This will be our incoming API to call Microsoft Flow using an HTTP Post request.
We need to define the JSON schema to use for passing our parameters from the skybow action to Flow. Easiest is to use the "Use sample payload to generate schema" and set some example JSON. In our case we need this:
"Title": "Our title",
"AssignedTo": "some email"
Microsoft Flow will generate the JSON Schema for you then.
Next define the steps that should be executed once this Flow is called. For the sake of simplicity, let's just create a Google Task.
Add a new action using New Step / Add an action:
Search for "Google Task" and select the "Google Tasks - Create a task in a task list" action:
Connect using an existing Google account and configure the Task List ID, Title and Notes optionally using dynamic content:
As you can see above we can reuse parameters passed from our skybow Actions.
Before moving on to skybow Editor copy the URL generated by Flow in the Request trigger:
This should look something like: https://prod-10.westus.logic.azure.com:443/workflows/505b599b4d51451483eb11d077a4663d/triggers/manual/paths/invoke?api-version=2015-08-01-preview&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Rupn1NNUdWORChsv0lz0gp-NRi-7bmog0OmNtC2zYAg
Configure the skybow HTTP Request Action to call Flow
Now let's open a display form of a task list in solution studio online and configure an Action Link to start this MS Flow.
Add a new Action Link set a good title (i.e. "Create Google Task") and open the Action Builder using the actions symbol:
In the action builder add a new action of Type "HTTP Request" and set the following:
- Paste URL we got from MS Flow to the URL parameter
- Select "POST" as the Request Type
- Add a request header "Content-Type" with value "application/json"
- Data should be a valid JSON containing the values we need to pass:
NOTE: We need to add an empty line above the JSON block to avoid skybow's expression evaluator assuming it is a function expression. [We are working on providing a better option in a future update.]
When all configured it should look something like this:
Now save the form and try it out in runtime on the display form.
When the link is selected on the display form a new Google Task is created with the title containing the SharePoint tasks title and the user's name for the assigned user.
With this approach we can kickoff any actions possible with Microsoft Flow from skybow actions too and provide advanced scenarios in our solutions for integrating with other systems.