Simon Bisson
Contributor

If IFTTT can’t, then Microsoft Flow can

analysis
Mar 22, 20176 mins
APIsSoftware Development

Miss Yahoo Pipes? Microsoft's low-code tool for application mashups does a better job in meeting business needs

Way back when, in the heady days of Web 2.0, there was a service that could connect the output of one website into the input of another, tweaking the content a little as it flowed from one service to the next. That service was Yahoo Pipes, which was discontinued two years ago. It’s still sadly missed by many looking for a bit of DIY plumbing to build the web they want. When Yahoo closed Pipes, many workflows were lost, including some that had been running for years.

Thus, it should be no surprise that others are trying to replicate some of Pipes’ functionality. If This Then That (IFTTT) is probably the best known, with its simple trigger- and output-based flows. Although IFTTT is focused on consumer scenarios, it’s found some business use for building personal applications (or as IFTTT calls them, applets) that scratch a very personal itch. At a larger scale, Zapier offers more complex applications, with multistep branching workflows.

Introducing Microsoft Flow

Microsoft recently brought its own tool to the table: Flow. Like Zapier, it gives you the option of basic conditional branches, with a multistep, multi-action workflow. Unlike the other services, it’s very much focused on the enterprise world, building on tools developed for the PowerApps low-code departmental development tool.

Flow gives you a choice of pricing plans. The basic free service gets you access to a core set of services, based on Office 365, Azure, and Dynamics 365, with popular external services like Dropbox and Basecamp. If you pay for a subscription or use Flow as part of an Enterprise Office 365 subscription, you get better performance and more features. The premium subscription tier adds access to a wider selection of services, including Salesforce.com.

Unlike other options, Flow lets you install a local gateway on your network to link Flows to local data and your own applications. With the Flow gateway installed on a server, you can connect Flow to a local instance of SQL Server or SharePoint. Usefully the gateway is the same one used for Azure Analysis Services, PowerApps, Power BI, and Azure Logic Apps, so one installation can support several types of applications and services.

Flow vs. IFTTT

I’ve been using Flow for a while now, as part of my personal social media archiving process. My IFTTT-based applet took a Twitter feed and copied specific tweets into a OneNote notebook, but the applet was unstable due to bugs in the OneNote API it was using. Without the option of error-based branching, there was no way to create a new page in my notebook when connections to a full one started failing.

The Flow application with which I replaced my IFTTT applet is very similar: It takes a feed and delivers the results to a cloud-hosted Excel spreadsheet. Unlike my IFTTT applet, the Flow application contains conditional error-handling code, so if it can’t find the spreadsheet I created, it starts appending data to a new one. With alerts in Flow’s iOS app, I can see if there are any problems as soon as they occur, letting me keep my app running without losing data.

That’s a basic example of what you can build with Flow. Like many no-code development options, it’s targeted at users who don’t have the time to build a full application and need only a simple set of features.

Hooking together a basic workflow in a visual development environment on a smartphone or in a browser is a step on the road to turning everyone into a developer. The next logical step is moving from Flow to Microsoft’s low-code PowerApps as users demand more features.

Adding custom services to Flow

Although Flow has a wide collection of service endpoints that can be hooked together to build simple applications, it also lets you work with any RESTful API. If a service isn’t popular enough for Microsoft to build a Flow connector itself, you can use Flow’s Custom API tool to add your own connectors with very little code.

The Custom API tool lets you take Flow from beyond its software world into IoT, where REST is widely available for low-bandwidth connections to hubs. If you wanted to trigger a Philips Hue bulb to glow in your choice of color when there’s a new post on InfoWorld’s RSS feed, you can take a Swagger definition of the Hue bridge API and use it to build your custom connector.

Swagger is an important part of the Flow custom API story. It’s as close as we get to a standard for describing APIs, using a human-readable dialect of YAML (Yet Another Markup Language) to describe the structure of an API’s messages, along with the available commands. If you’re to connect and translate messages from one service to another, Swagger is an excellent way to get started.

If you don’t have a Swagger definition for the API you want, Flow lets you work with Postman, a tool for automatically generating Swagger files. With Postman, you can build a REST request and send it to the service API. The resulting response is captured by Postman and used to build the YAML description of the call you made. You repeat the process for all the requests you want for your Flow custom API. But note that the resulting Swagger file won’t contain all possible RESTful calls—only the ones you choose.

Once you’ve collected all the calls you need for your endpoint, export the Swagger file and upload it to Flow. The calls you’ve documented can be made into Flow actions, copying sample requests from documentation to complete the actions. Flow has tools to test new actions in custom APIs, so you can check that everything works as expected before using the new endpoint in your application. Although you can’t share custom APIs with others, you can at least employ them in team Flow applications, so colleagues can work with the applications.

Flow is a welcome addition to the enterprise toolkit, providing a business-grade version of what Yahoo Pipes and IFTTT do for hobbyists. With it, your users can build simple apps that solve specific business needs. It’s worth enabling for your Office 365 users and perhaps even taking out a separate subscription for the premium services. But be prepared for those who want access to PowerApps when Flow isn’t enough!

Simon Bisson
Contributor

Author of InfoWorld's Enterprise Microsoft blog, Simon Bisson prefers to think of “career” as a verb rather than a noun, having worked in academic and telecoms research, as well as having been the CTO of a startup, running the technical side of UK Online (the first national ISP with content as well as connections), before moving into consultancy and technology strategy. He’s built plenty of large-scale web applications, designed architectures for multi-terabyte online image stores, implemented B2B information hubs, and come up with next generation mobile network architectures and knowledge management solutions. In between doing all that, he’s been a freelance journalist since the early days of the web and writes about everything from enterprise architecture down to gadgets.

More from this author