First look: Microsoft’s API mashup tool for the rest of us

09.05.2016
Not all cloud applications need to be cloud-scale. They’re often simple routing and switching apps that take information from one source, process it minimally, then pass it on. That’s where tools like IFTTT and Yahoo Pipes came into play, allowing you to quickly build and share information flows that linked one service to another. Sadly, Yahoo Pipes has been shut down, and IFTTT has concentrated on simple links to the Internet of things.

That means there’s space in the market for a new tool -- one focused on working with applications and services, and capable of handling more complex chains of operations than IFTTT’s basic one input to one output mapping. You could build microservices on Node.js to automate these sorts of connections between applications and between APIs, but that would be overkill. So would Azure Logic Apps or AWS Lambda.

Alongside the launch of its new visual development tool, PowerApps, Microsoft recently unveiled its new connection-based development tool, Flow. Like IFTTT and Pipes, Flow is designed to help you quickly hook together outputs and inputs to build applications that are triggered by an event on an input, and deliver responses to one or more services. Where IFTTT could scan a stream of tweets and save specific content to a file, Flow can take an input and use it as the basis for a more complex flow of information, querying multiple information sources and handling multiple actions as a result.

With initial support for 12 services (and many more APIs), Microsoft Flow is clearly designed to automate what would otherwise be tedious tasks. Supported services include Twitter, GitHub, Salesforce, Dropbox, Slack, and Office 365, giving you access to much of the Office Graph. Using these services, you could, for example, scan Twitter looking for mentions of a product and deliver them into a Slack channel for the product team, allowing the team to see what their users are saying about their product.

Microsoft provides a set of 63 initial templates that handle a variety of tasks, all of which are also ready for customization. The range of templates spans customer relationship management, devops notifications, and ways to manage your online life, bridging the gaps between storage, social media, email, and other cloud services.

I started by customizing one of the basic templates, taking tweets I sent and archiving them in a CSV file on my personal OneDrive. Editing a Flow is relatively easy. You’re presented with the key elements of a template in your browser as a basic flow diagram, inputs at the top of a screen, outputs at the bottom. You can click on a block to open up its properties. For example, in a Twitter block, you’ll find a standard Twitter query.

One key difference between Flow and IFTTT is support for conditionals. For example, if a file you need isn’t present, your flow can create it and place an initial set of data. Once it’s in place, an alternative path will add new data to the file. Flow offers a very basic set of conditional operators, but it’s enough to let you build relatively complex applications. You can chain inputs, queries, and conditionals, helping you control the flow of your flow, from input to your choice of outputs.

There’s a lot of flexibility in Flow. When you drill down into building your own flows rather than using the provided templates, you’ll find that you’re able to use Swagger API definitions to quickly hook arbitrary REST APIs into a flow. You’re also able to connect to an HTTP action, an option that would allow you to connect to a Web hook in an application like Slack, or to work with data sent over a Web form or via JSON That’s an important feature, as it means that you’re not limited to the default set of controls.

You’re also able to build a flow into a PowerApps app, giving it its own UI. Debugging is easy, with reports for each operation that let you drill down into each block, so you can see what went wrong -- and equally as important, what went right.

The result is a powerful little tool that can quickly scratch an itch. The ability to reach out into any API is significant, as is the support for a range of different input types. Microsoft has provided enough routes into Flow that you should be able to find one that will work with your choice of inputs -- even if they’re not among the specific triggers that Flow defines. Outputs are perhaps a little more limited at this stage. I would have liked to see better support for the Office Graph and its various entities, including more document types than Excel.

Some aspects of the Flow development process are still a little buggy, especially around its OneDrive integration. I found it nearly impossible to scroll through a long list of folders, for example, and I had to manually input the folder I was intending to use. Despite these teething problems, Flow is shaping up nicely as a replacement for the sadly lost Yahoo Pipes, albeit one designed for the API world we have today, rather than merely HTTP, RSS, and XML.

Flow is a service that makes sense quickly, even to nonprogrammers. It’s easy enough to get started by customizing a template, but once you build your own flows, the graphical layout of flow and program blocks quickly makes sense. If you want to go beyond the templates and default actions, then you’ll need to become familiar with the syntax of RESTful APIs. Flow’s support for the Swagger API description language should simplify things, at least where sites and services offer Swagger definitions.

With tools like Flow and PowerApps, Microsoft is finally serving a developer audience composed of information workers who want to solve small problems. Flow is not a general-purpose programming tool, but it is nonetheless both powerful and flexible. Flow is an on-ramp into a new style of application development, and it’s one that anyone can use.

(www.infoworld.com)

Simon Bisson