Jump to content

Open URL but if page comes back with a 400 status, open a different URL

Recommended Posts

I have a workflow setup to open a specific URL with the argument that I provide as part of the path.  I'd like to add a condition where if the URL that is created using my argument returns a 400 status, a different URL is opened.  I was thinking I could do it with the Utilities > Conditional action, but I can't seem to figure out how to get any information from the Open URL action.  Any suggestions on how I might accomplish this?  Thanks!

Link to comment

The Open URL action doesn’t return the status code. It doesn’t perform a web request, it simply asks macOS to open the given URL (which doesn’t have to be HTTP or open a browser). Update your Automation Tasks, I’ve just added one under URL Processing to get the response code.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...