Tag Archives: Workflow

Microsoft Power Automate SDK to Build Externalized Applications

When I first started looking at Microsoft Flow, the previous name of Microsoft Power Automate, I recognized the high value and potential uses within my organization. Almost innumerable Connectors to 3rd party applications, “sensing” / triggers for many of the applications participating. Huge potential, and won’t “break the bank” with a 15 USD price per user/month which contains all of the “Premium Connectors.”

I started automating processes for both personal and business. I upped my social media game, for example, sending a mobile notification to myself when there was a potentially interesting tweet. Or, if there was an RSS feed containing keywords I was monitoring, I sent myself an email with the news article. My client had needs around Microsoft Azure DevOps (ADO) that it was not capable of doing “out of the box,” so I took on those automated workflows with ease.

Venture using New Business Model with msflowsdk

Then I thought it would be great to commercialize some of these workflows. However, there were several technical limitations I came to realize. First, to execute one of these workflows manually, you would have to execute it from within the MS Power Automate web or mobile application. The user must be logged in with your Power Automate credentials to execute “your” workflow manually. As a Power Automate user, you could “Share” Power Automate flows with other Power Automate users. Unfortunately, that would require your web app customers to have Power Automate accounts paying as much as 15 USD per month. We would have to think in terms of a generic “Production” application user, potentially shared with all external, commercial users.

Providing Custom Interface using HTML and JavaScript

Then I realized there was one way to present the Power Automate Flows without the Power Automate Web UI or the Power Automate iPhone app, and that would be to use the MS Flow SDK to build HTML and JavaScript Web applications. Unfortunately, you would still have to log in with your Power Automate user, that has access to the flow, but the User Interface was highly customizable by using MS Flow SDK.

Using “Generic” Test User for MS Power Automate

  • Limit the user’s access who does have access to your Microsoft Power Automate workflows. As micro as possible to granularize the permissions, such as execute XYZ Power Automate Flow without permission to read/see ALL the Power Automate Workflows, At the moment, that doesn’t seem possible (TBD). I need to recheck in Azure Portal and client app registration.
  • Does my approach to commercializing MS Power Automate apps even supported from a Microsoft business perspective? I don’t know yet. I read the article: Types of Power Automate licenses and need to reread this document.
  • Need the ability to grant “Execute” access to specific MS Power Automate workflow users without the ability to create or read any workflows of their own, limited Power Automate, User License?

Create an Azure AD User For Each Customer

  • Technical seamless implementation would be required to add Azure AD users who have paid a commercial fee for the Web app powered by Power Automate, or I embed advertisements into the Azure, Power Automate, Custom Web App.

The Experiment – SMS Delay

Wouldn’t it be fun to send a text message with a delay, enter a text message, and parameterize the delay in N minutes? How fast could I write the app across multiple platforms, desktop, and mobile? The backend and mid-tier would probably be the longest aspect of the development of this app. You probably need to put it in a responsive Web App to resize it to fit the platform. But the N tiers of the stack, how fast can I develop that? Less than an hour using Power Automate.

Power Automate Workflow

This Power Automate Workflow has three steps in the workflow: the “Manual Trigger,” the “Delay,” and leveraging the Twilio Action – Send Text Message (SMS), which happens not to be a “Premium” connector.

Power Automate: SMS-Delay
Power Automate: SMS-Delay

Front End Code to Integrate

With a combination of HTML, JavaScript, and the MS Flow SDK, I was able to put the SMS-Delay app together rather swiftly, including everything from Azure Authentication to my app to execution.

SMS Delay UI
SMS Delay UI

Give SMS-Delay a Try

Would you like to try out this Power Automate manual workflow? Please provide ANY login you would like to use for Azure AD authentication, and the user must have access to Microsoft Power Automate FREE license. Once you provide the user name to me, I will update Azure AD to include your permissions to the app and then send you a note to give the app a try: SMS Delay Application (rosemansolutions.com)

To Be Continued

For the next steps, I’d like to…

  • Publish the project HTML and JavaScript code I used to create this app
  • Solve the riddle of the Power Automate authentication
  • Create this and many other applications using the MS Flow SDK

Anonymous Authentication or Limited Authentication

Limiting the authentication, using very granular controls of Power Automate which may or may not yet be implemented. Have a limited Power Automate user with grant permissions ONLY to execute a specific workflow.

Is it possible to execute a Power Automate workflow with anonymous credentials and not necessarily have a Power Automate user account?

Level Up Social Media with Microsoft Power Automate

Create Automated Workflows with Microsoft Power Automate

I’ve been using this powerful workflow automation platform since it was called Microsoft Flow, and was free for low volume usage. Essentially, users can pick any sources of data, create triggers, transform data to a multitude of target systems, and notify through a multitude of opportunities, such as eMail and push notifications. The platform is boundless through “Connectors” to just about any 3rd party platforms from SalesForce to an Oracle database. The basic plan after the free trial is 15 USD per month.

Connectors and Templates: Ready, Set, Go

1st, define your connectors, such as your Google Email account connection details, and your Twitter account information. 2nd, select from one of the many “out of the box” predefined templates, such as from the “Social Media” category.

MSFT Power Automate Templates
MSFT Power Automate Templates

Twitter Use Cases – Configure In Minutes

Once you’ve signed up for the Power Automate SaaS platform, you can start creating workflows in minutes. At first I used the “Templates”, but it is much easier to create workflows from scratch. Here are a few opportunities foe getting started

Retweet based on Tweet Search Criteria

  • Define what tweets you would like to retweet using query search criteria of words, a combination of hashtags, phrases with simple AND and OR logic.
  • Optionally, add a condition before performing an action within the workflow. In this case, we can allow the retweet only if the retweet count is greater than N retweets.
  • Select the returned Tweet ID to perform the “Retweet” action
  • Optionally, add notifications, such as emailing yourself each time you retweet and include elements of the tweet within your Email, such as the tweet text, tweet user ID, or a dozen of other tweet elements.

Catalog Tweets when they meet your Tweet Criteria

  • Define what tweets you would like to store in your “data” repository.
  • Select from one of a multitude of data targets ranging from Excel spreadsheets, Google Sheets, SQL Server, Oracle Database, and dozens of other repositories.
  • Based on the data target, perform the mapping of available tweet elements to the data target fields, such as a database, table, and fields.

And Beyond

Microsoft Power Automate can do automated workflows beyond the social media capabilities highlighted here. I have a wish list of “Triggers” and “Actions” not yet supported by the platform. I’d like to have the same “Trigger” criteria we have with Twitter extended to LinkedIn, and trigger LinkedIn posts based on query criteria, extract, and load into en external data source.

Microsoft Flow – Platform Review

It looks like Microsoft created a generic workflow platform, product independent.

Microsoft has software solutions, like MS Outlook with an [email] rules engine built into Outlook.  SharePoint has a workflow solution within the Sharepoint Platform, typically governing the content flowing through it’s system.

Microsoft Flow is a different animal.  It seems like Microsoft has built a ‘generic’ rules engine for processing almost any event.  The Flow product:

  1. Start using the product from one of two areas:  a) “My Flows” where I may view existing and create new [work]flows. b) “Activity”, that shows “Notifications” and “Failures”
  2. Select “My Flows”, and the user may “Create [a workflow] from Blank”,  or “Browse Templates”.  MSFT existing set of templates were created by Microsoft, and also by a 3rd party implying a marketplace.
  3. Select “Create from Blank” and the user has a single drop down list of events, a culmination events across Internet products. There is an implication there could be any product, and event “made compatible” with MSFT Flows.
    1. The drop down list of events has a format of “Product – Event”.  As the list of products and events grow, we should see at least two separate drop down lists, one for products, and a sub list for the product specific events.
    2. Several Example Events Include:
      1. “Dropbox – When a file is created”
      2. “Facebook – When there is a new post to my timeline”
      3. “Project Online – When a new task is created”
      4. “RSS – When a feed item is published”
      5. “Salesforce – When an object is created”
    3. The list of products as well as there events may need a business analyst to rationalize the use cases.
  4. Once an Event is selected, event specific details may be required, e.g. Twitter account details, or OneDrive “watch” folder
  5. Next, a Condition may be added to this [work]flow,  and may be specific to the Event type, e.g. OneDrive File Type properties [contains] XYZ value.  There is also an “advanced mode” using a conditional scripting language.
  6. There is “IF YES” and “IF NO” logic, which then allows the user to select one [or more] actions to perform
    1. Several Action Examples Include:
      1. “Excel – Insert Rows”
      2. “FTP – Create File”
      3. “Google Drive – List files in folder”
      4. “Mail – Send email”
      5. “Push Notification – Send a push notification”
    2. Again, it seems like an eclectic bunch of Products, Actions, and Events strung together to have a system to POC.
  7. The Templates list, predefined set of workflows that may be of interest to anyone who does not want to start from scratch.   The UI provides several ways to filter, list, and search through templates.

Applicable to everyday life, from an individual home user, small business, to the enterprise.  At this stage the product seems in Beta at best, or more accurately, just after clickable prototype.  I ran into several errors trying to go through basic use cases, i.e. adding rules.

Despite the “Preview” launch, Microsoft has showed us the power in [work]flow processing regardless of the service platform provider, e.g.  Box, DropBox, Facebook, GitHub, Instagram, Salesforce, Twitter, Google, MailChimp, …

Microsoft may be the glue to combine service providers who may / expose their services to MSFT Flow functionality.

Create from Blank - Select Condition
Create from Blank – Select Condition

 

Create Rule from Template
Create Rule from Template

Create from Blank Rule Building UI
Create from Blank Rule Building UI

 

Update June 28th, 2016:

Opportunities for Event, Condition, Action Rules

  • Transcoding [cloud] Services
  • [IBM Watson] Cognitive APIs
    • e.g. Language:Translation; E.g.2. Visual Recognition;
  • WordPress – Create a Post
    • New text file dropped in specific folder on Box, DropBox, etc. being ‘monitored’ by MSFT flow [?] Additional code required by user for ‘polling’ capabilities
    • OR new text file attached, and emailed to specific email account folder ‘watched’ by MSFT Flow.
    • Event triggers – Automatic read of new text file
      • stylizing may occur if HTML coding used
    • Action – Post to a Blog
  • ‘ANY’ Event occurs, a custom message is sent using Skype for a single or group of Skype accounts;
    • On several ‘eligible’ events, such as “File Creation” into Box,  the file (or file shared URL) may be sent to the Skype account.
  • ‘ANY’ Event occurs, a custom mobile text message is sent to a single or group of phone numbers.
  • Event occurs for “File Creation” e.g. into Box; after passing a “Condition”, actions occur:
    • IBM Watson Cognitive API, Text to Speech, occurs, and the product of the action is placed in the same Box folder.
  • Action: Using Microsoft Edge (powered by MSN), in the “My news feed” tab, enable action to publish “Cards”, such as app notifications

Challenges \ Opportunities \ Unknowns

  • 3rd party companies existing, published [cloud; web service] APIs may not even need any modification to integrate with Microsoft Flow; however, business approval may be required to use the API in this manner,
  • It is unclear re: Flow Templates need to be created by the product owner, e.g. Telestream, or knowledgeable third party, following the Android, iOS, and/or MSFT Mobile Apps model.
  • It is unclear if the MSFT Flow app may be licensed individually in the cloud, within the 365 cloud suite, or offered for Home and\or Business?

Applying Gmail Labels Across All Google Assets: Docs, Photos, Contacts + Dashboard, Portal View

Google applications contain [types of] assets,  either created within the application, or imported into the application.    In Gmail, you have objects, emails, and Gmail enables users to add metadata to the email in the form of tags or “Labels”.  Labeling emails is a very easy way to organize these assets, emails.   If you’re a bit more organized, you may even devise a logical taxonomy to classify your emails.

An email can also be put into a folder and this is completely different than what we are talking about with labels.  An email may be placed into a folder, and have a parent child folder hierarchy.  Only the name of the folder, and it’s correlations to positions in the hierarchy provide this relational metadata.

For personal use, or for small to medium size businesses, users may want to categorize  all of the Google “objects” from each Google App,  so why Isn’t there the capability to apply labels across all Google App assets?  If you work at a law firm, for example, and have documents in Google Docs, and use Google for email, it would be ideal to leverage a company wide taxonomy, and upon any internal search discover all objects logically grouped in a container by labels.

For each Google object asset, such as email in Gmail, users may apply N number of labels to each Google Object asset.

A [Google] dashboard, or portal view may be used to display and access Google assets across Google applications, grouped by Labels .  A Google Apps “Portal Search” may consist of queries that contain asset labels.  A  relational, Google object repository containing assets across all object types (e.g. Google Docs), may be leveraged to store metadata about each Google asset and their relationships.

A [Google] dashboard, or portal view may be organized around individuals (e.g. personal), teams, or an organization.  So, in a law firm, for example, a case number label could be applied to Google Docs,  Google Photos (i.e. Photos and Videos),  and of course, Gmail.

A relatively simple feature to be implemented with a lot of value for Google’s clients, us?  So, why isn’t it implemented?

One better, when we have facial recognition code implemented in Photos (and Videos), applying Google labels to media assets may allow for correlation of Emails to Photos with a rule based engine.

The Google Search has expanded into the mobile Google app.

Leveraging Google “Cards“, developers may create “Cards” for a single or group of Google assets.   Grouping of Google assets may be applied using “Labels”.   As Google assets go through a business or personal user workflow, additional metadata may be added to the asset, such as additional “Labels”.

Expanding upon this solution,  scripts may be created to “push” assets through a workflow, perhaps using Google Cloud Functions.  Google “Cards” may be leveraged as “the bit” that informs users when they have new items to process in a workflow.

Metadata, or Labels, may be used such as “Document Ready for Legal Review” or “Legal Document Review Completed”.