How to send custom form data to Microsoft Power Automate
SEND CUSTOM FORM DATA INTO MICROSOFT POWER AUTOMATE
In this article, I will be explaining the steps to send form data directly to Microsoft Power Automate and trigger the Flow using PHP cURL and HTML.
STEP - 1
First, you will have to create a Custom HTML file and name it index.html
In the index.html file please must include Jquery CDN
This is CSS Style for the form. You can also include Bootstrap as I have used it in the form
HTML code will look like this
Also, Read - How to Connect SharePoint Using PHP
Now we need to send the Request without refreshing the page so we will have to use Jquery Ajax to achieve it .. So here is the Jquery code to send a request to our backend file
The above codes are for the index.html file now we are going to work on the PHP file.
So we are using PHP cURL to send the request to Microsoft Power Automate but before doing that we will have to generate a URL from flow to use on PHP
Our goal is to send the request to flow using our form so for that we will need request formate to send so we are going to use JSON for it.
We will also need a JSON schema defining the format of the request. So we are going to use some JSON Schema Generator online tool.
I used Liquid JSON Schema Generator
Copy Paste the above code and click on Generate Schema button. The tool will generate a schema like this
We will discuss STEP -2 in the Next Blog.
Also, Read - How to connect Tsheets using Microsoft Power Automate
If you find this blog post helpful then please share it with your friends on Social media. Thank you.