Post #19 of our Build Flows Faster series covering our new utility actions for Power Automate. Today’s lesson is about extracting data contained within HTML tables in Power Automate with Encodian utility actions.
Our utility actions are targeted at helping you build flows more quickly with less complexity, and they brilliantly only use 0.05 actions from your Encodian Flowr and Vertr subscription allowance. For example, under a standard plan that permits 500 actions per month (uses), you could use the utility actions 10,000 times!
Our ‘Parse HTML Table‘ utility action for Power Automate allows data to be extracted from HTML tables formatted as JSON, thus the JSON data can be parsed and easily consumed within your Power Automate flows.
For this post to work, we’ll work through a very simple scenario where I will manually pass a basic HTML table, parse the data, and email each row contained within the table.
For a more advanced scenario, please review the ‘Video Guide’, which details how to build a flow which extracts the Football Premier League table from the BBC Sport website before adding the data to a SharePoint list.
Consider the following basic and manually triggered flow:
Let’s configure the flow to process the ‘HTML’ table value provided and send each result back within an email.
1. Add the ‘Parse HTML Table‘ utility action
1.a HTML Data: Select the ‘HTML‘ property provided by the trigger action
We now need to trigger the flow, but why? The next step within the flow will be to parse the JSON data returned by the ‘Parse HTML Table‘ utility action. We need some sample data to generate the schema, which we can obtain by running the flow.
This flow will process an HTML table conforming to the following data structure:
<table> <tr> <th>Company</th> <th>Contact</th> <th>Country</th> </tr> <tr> <td>Alfreds Futterkiste</td> <td>Maria Anders</td> <td>Germany</td> </tr> <tr> <td>Centro comercial Moctezuma</td> <td>Francisco Chang</td> <td>Mexico</td> </tr> </table>
Remember, if the HTML table structure changes, you will need to re-create the JSON schema used to parse the JSON data returned by the ‘Parse HTML Table‘ utility action.
2. Manually test the flow:
3. Obtain the data returned by the ‘Parse HTML Table‘ utility action
4. Add the ‘Parse JSON‘ action and configure it as follows
4.a. Content: Select the ‘Result’ property provided by the ‘Parse HTML Table‘ utility action
4.b. Schema: Generate the schema using the data obtained from step 3 and as illustrated below
4. Add the ‘Send an email notification (V3)‘ action
4.a. To: Configure the ‘To’ value as required
4.a. Subject: Configure the email subject value as required
4.b. Body: Configure the email body as required, selecting the relevant properties provided by the ‘Parse JSON‘ action
NOTE: Power Automate will automatically wrap the ‘Send an email notification (V3)’ action in a ‘For each’ loop because the ‘Parse JSON’ action will provide an array.
Upon execution, the following emails are be generated:
If you require further advice or support regarding Encodian utility actions, please email our support team at support@encodian.com where the team would be delighted to help.
Managing Director