The WAVES Blockchain Platform is a new type of internet based communications infrastructure, currently mostly known as being in Top 50 Cryptocurrencies , the platform actually offers a lot more. Its strength is in its ability to easily create your own token and cost effectively add data to its Blockchain Database. This creates a whole new era of opportunity to create new workflow efficiencies and monetisation possibilities. With this this in mind that I believe Microsoft Flow and WAVES Blockchain Platform provide a perfect match for business owners to cost effectively implement Blockchain Solutions. In this article and future series I will be exploring the opportunities combination of Microsoft Flow and WAVES Blockchain Platform offer.



WAVES BLOCKCHAIN CONNECTOR:

Unfortunately WAVES Blockchain Platform does not have native connector in Microsoft Flow. Fortunately I have created one for you to download and upload as a Custom Connector. You can download the file here and upload it under the Custom Connector "OpenAPI file":









If you require further instructions on importing custom connector my previous step by step article on setting up WAVES connector maybe useful, this can be found here. Please note the previous article connector is based on the Public Postman Collection file made available by WAVES, however my connector above includes an additional feature being retrival of Asset (custom token) Details which will be required in the workflow steps in this article and most likely future articles hence please use my custom connector referenced in this article.



The workflow logic is as follows:



Trigger: Recurr Every 3 Minutes (the most my subscription allows)







Action: Get Transactions by Address (input your wallet address here) as well as how many recent transactions to retrieve. In this case I used 50 (check last 50 transactions every three minutes).





Action: Parse the Data (this is required so we can access the Dynamic Content for future steps)



You can copy the JSON structure from this file



This is where is get a little complicated the process is, so I have done a short video explaining these steps. Essentially the process is:







WAVES has different data structures based on various functionalities (see example list here) in order to identify the dynamic content in each transaction type we need to inform Microsoft Flow of the JSON Schema for each transaction type. Therefore we need to identify the type of each transaction in the array of transaction items. Operate Switch Function based on the transaction type (i.e. number 3,4,7,10 or 11) Parse the JSON, the Schema for the transaction types can be found here. In order to keep track of transactions already been processed I have utilised Google Sheets (at the moment there is an issue with MS Excel "locking up" so using Google Sheets instead ) to keep record of some unique information about each transaction such as signature or proofs which is unique (or likely be unique in array of transactions to my wallet). Therefore next action is get rows within the Google Sheet. In order to be time effective I utilsied the filter array function to identify if the unique field (signature, proof) is listed in my Google Sheet. If it is the row will appear if not then the function will result in null. Therefore created condition, if filter array is null (this means the transaction was not recorded previously) which will then proceed to send the mobile notification & update the google sheets. Unfortunately there is no Asset ID for WAVES, therefore before we need to include a condition before the mobile/email notification to check if the Asset ID is null or not. If it is null this means the Token is WAVES and can proceed with this, if the Asset ID is not null we can look up the Asset Details using the additional feature I have included in the above linked custom connector. Using the Asset Details we can include important details of the Asset (such as name, issuer, reissuable) in the mobile/email notificaiton. Once complete we need to update the "Apply to Item" to bypass the first array of the JSON Schema to " body( 'Parse_JSON' ) [ 0 ] " See This Discussion Thread for More . Special Thanks to @Pieter_Veenstra for resolving this issue for me!

To help explain the above further I have prepared the following video:











A high level overview of the workflow logic is:



