Power Automate Integration

Modified on Thu, 20 Jun at 11:52 AM

Power Automate

Power Automate allows you to integrate your OneBlink forms with third-party systems, allowing you to create integration workflows with systems that do not come out of the box with the platform.


Some popular examples of these integrations include SQL Server, Power Bi, Sharepoint,  Salesforce and Excel.



Getting Started

To use the OneBlink connector, you’ll need a premium Power Automate account, you may find you already have a licence with your Office 365 account, or if not you can sign up for a trial or paid account from their site:


https://flow.microsoft.com/


Once you have your account, you’ll be able to find the OneBlink connector in the Power Automate connector list.


To use the connector, you’ll need your API key from the OneBlink Console.



Getting Your Power Automate Key

You can create a Power Automate key using the Integrations menu. Click the Setup Integration button.



From here click the Create Power Automate Key button. 


This will create a new Power Automate key. 

From here you can view, copy and delete your Power Automate Keys. If you need to create another Power Automate key you can do so by adding a name and clicking the Create Power Automate Key button. 




Creating a OneBlink Flow

If you haven’t used Power Automate before, the best place to get started is to log into your Power Automate account and select Learn from the side menu. Microsoft has created a lot of great tutorials for beginners to advanced.


Create a trigger

Select the trigger that runs when a form is submitted, “Triggers when a OneBlink Form submission occurs”. This is the trigger that will start your flow.


The first time you select the OneBlink connector, you’ll be asked to enter the name of your connection (this can be anything), as well as enter the API Key from the OneBlink Console.


Trigger conditions

When setting up your trigger make sure you add a Label and Form. The label will help identify the flow, and then selecting the form will ensure that the flow only runs when that form is submitted. If this is not set the flow will run when any form in the account is submitted. 




Add an Action

Generate Form Submission PDF

This trigger will allow you to generate a PDF of the submission data similar to the Email + PDF submission event. 

This PDF can then be added to other connectors. This action has the same PDF configuration as any of the platform workflow events that include the generation of a PDF. 



Retrieve Form Submission Data

This trigger allows you to retrieve the form submission data meaning anything that was added to the form . This action will bring back an object containing both the form definition and the submission data, allowing you to build out your flow from to include the data captured in the form.




Retrieve Form Submission Attachment

This action allows you to retrieve any attachments from the form submission (Camera, Files, Signature, Checklist-Files), and pass them into your flow. This will require getting the element's attachment ID, this can be obtained using the Parse JSON connector, see below.



Parse JSON

The next stage of the flow is completely up to you however, in most cases you will probably want to use the Parse JSON connector to take your data and turn them into dynamic values you can use in further flows.


In order to parse the JSON value, you will need access to the form JSON Schema. 


The easiest way to get the JSON schema is to navigate to the forms menu and select the side menu of the form. This will give you the option to “View Schema”.


From here, you can copy the schema to your clipboard and paste it in the Parse JSON connector. See below:

NOTE: When using the Parse JSON Schema, make sure to NOT use the “Use sample payload to generate schema“ option as it can break the schema and instead paste the scheme directly into the input.


The Content for the Parse JSON connector will need to be 'Submission Data'.



Tips and Tricks


Renaming Attachments


The usual way to name attachments as they are being uploaded is to use the Dynamic content "FileName" which will ensure the attachment being uploaded has the same name as when it was added to the form. 


If you want to rename an attachment as it is being uploaded, you will need to obtain the attachment extension to ensure the attachment being uploaded is using the correct format, this can be done using a substring expression. 


Camera Element


When uploading an attachment using the camera element, set the file name to what you want it to be (e.g submission ID, attachment ID, or something you hard code) and then open the expression tab and enter the below expression replacing the word 'camera' with the name of your camera element:


substring(body('Parse_JSON')?['camera']?['fileName'],lastIndexOf(body('Parse_JSON')?['camera']?['fileName'],'.'))


This will then take everything after the dot "." in the FileName which will be your attachment extension. Allowing you to rename the attachment as part of the flow. 


Files elements


Since you are able to upload multiple files as part of the one files element you will need to do this in an Apply to each loop. Set the file name to be what you want it to be and then open the expression tab and enter the below expression:


substring(items('Apply_to_each').fileName,lastIndexOf(items('Apply_to_each').fileName,'.'))


This will then take everything after the dot "." in the file name, this will be your file extension.  Allowing you to rename the files as part of the flow. See this in the example below where the file name is being set to the Submission ID + the file extension. 





Get Help

If you require assistance setting up your Power Automate integration or have questions, please create a support ticket or reach out to us at [email protected].


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article