cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pmwhelan
Helper V
Helper V

Get information about a web page?

Hi

Is it possible (in a flow) to give a URL and get back a page summary / description?

Thanks

P

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @pmwhelan,

 

Are you talking about the meta tags which you sometimes can find in the header of the HTML of a web page?

 

If so, you could use a HTTP action and use an indexOf to check if this tag is available. And if that is the case use a couple of split functions to retrieve the description.

 

Below is an example.

 

In this example I used the following W3Schools page:

https://www.w3schools.com/html/html_basic.asp

 

The HTML has this in the Header

<!DOCTYPE html>
<html lang="en-US">
<head>
<title>HTML Basic</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Keywords" content="HTML, Python, CSS, SQL, JavaScript, How to, PHP, Java, C, C++, C#, jQuery, Bootstrap, Colors, W3.CSS, XML, MySQL, Icons, NodeJS, React, Graphics, Angular, R, AI, Git, Data Science, Code Game, Tutorials, Programming, Web Development, Training, Learning, Quiz, Exercises, Courses, Lessons, References, Examples, Learn to code, Source code, Demos, Tips, Website">
<meta name="Description" content="Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.">

 

With the expression below you could find that last meta name tag

if(not(equals(indexOf(body('HTTP'), '<meta name="Description" content='), -1)), slice(split(split(body('HTTP'), '<meta name="Description" content=')[1], '>')[0], 1, -1), 'Not Found')

 

getmetanamedescription.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


pmwhelan
Helper V
Helper V

Thanks very much.

I am getting "The server did not received a response from an upstream server."

Any ideas?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,263)