Check if a URL is valid and store response

Using Get Webpage Source works for valid URLs and not for invalid ones.

If a URL is invalid, I get a red error message.
How do I capture the fact that this URL is invalid beyond seeing the error message?

I guess my question would be what is your criteria for a “valid” URL?

eg. is it:

  • based on the structure of the URL?
  • whether or not the domain resolves to a valid IP address?
  • whether or not the website is online?
  • whether or not the website accepts connections?
  • whether or not the website requires authentication?
  • something else?

I’m asking Chat GPT 4o to find the URL.
Sometimes the URL is incorrect, e.g. .com.au instead of .com, or pureorganic.com vs pure-organic.com.

So based on “is this the correct URL for the company”.

If there is a technical issue with accessing the URL then that is fine, I at least want to have the correct one, but am not sure how to determine this.

If URL is wrong, then I can enter it manually after finding the right one based on company name.

What about sending a GET request to the URL? I think it probably returns something that you can determine an error, if it is not a valid URL.

1 Like

:+1: this would work, only issue I could see with that is if the url chatgpt generates is still a valid link but incorrect to the company

Or maybe do something like this, but I don’t know how you plan to construct the flow to test. Under the hood this column probably does a GET request as well.

I wouldn’t trust 4o’s ability to find the URLs though, it’s very likely it makes up URLs.

1 Like