Automator workflow to search selection - "There was a problem with the input to the service"

Viewed 467

I have bult a simple Automator workflow called "Search with duckduckgo" which is supposed to search the selected text in any application using duckduckgo in my default browser. My workflow works properly in some applications, and it fails, most notatbly in Preview when I am trying to search words from a PDF. I get the error message "There was a problem with the input to the service".

Can you explain the error message, the proper way to debug it, and how to get to to work?

My workflow: I selected Workflow recieves/text and then I have a Run javascript with the function below to build the URL, I finally, I used Display Webpages

function run(input, parameters) {
   return "https://duckduckgo.com/?q=" + encodeURI(input)
}

I am using MacOS Catalina, and here are screenshots.

My Automator worflow

The error message

0 Answers
Related