Jump to content

Automation Task: Get URL Hostname


aiyo
 Share

Recommended Posts

Hi

 

I really like the new workflow editor and in particular the Automation Task building block.

I have a workflow where I am getting the hostname of the URL of the frontmost tab in the frontmost browser opening the Trustpilot page for that domain. I have been trying to replace some of my own Applescript code with AT's. But when I try to pass the output from Get URL Hostname AT to the Open URL building block, the URL is never opened.

 

The URL in the Open URL block is set to: https://dk.trustpilot.com/review/{query}

 

The debug log:

[20:56:09.878] Trustpilot reviews[Keyword] Processing complete
[20:56:09.880] Trustpilot reviews[Keyword] Passing output '' to Automation Task
[20:56:10.027] Trustpilot reviews[Automation Task] Processing complete
[20:56:10.030] Trustpilot reviews[Automation Task] Passing output 'https://www.alfredforum.com/topic/18481-getting-started-with-the-alfred-5-early-access-%F0%9F%98%83/' to Automation Task
[20:56:10.061] Trustpilot reviews[Automation Task] Processing complete
[20:56:10.064] Trustpilot reviews[Automation Task] Passing output '(
    "alfredforum.com"
)' to Open URL

  

Link to comment
Share on other sites

The hostname is really that, it doesn’t include the scheme. In other words, you’re passing alfredforum.com but a valid URL would be https://alfredforum.com. Add the scheme to the URL before opening it.

Link to comment
Share on other sites

Posted (edited)
10 hours ago, vitor said:

The hostname is really that, it doesn’t include the scheme. In other words, you’re passing alfredforum.com but a valid URL would be https://alfredforum.com. Add the scheme to the URL before opening it.

 

The URL in the Open URL block is https://dk.trustpilot.com/review/{query} so I only need the hostname.

Open URL also works fine if I pass a hostname as an argument from the keyword block directly to the Open URL block.  But Open URL does not work when the hostname is supplied by the Get URL Hostname AT and no error is logged either.

Edited by aiyo
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...