What is exactly Automator's "web content" in a quick action process (gear wheel)?
How can I use the output "web content"? What does it contain? What is the structure of this data? Is it a text, a list or other data?
What is the action to add here to obtain informations about the "web content"? Where is the documentation about the "web content" data? The documentation at https://www.macosxautomation.com/automator/services/index.html is useless about this question.
Sorry for the French screenshot. Here is a (automated) translation:
The process receives the current element web content in Safari.app.
The input is the whole selection. [ ] Output replaces the selected text
Image Download
Color Black
For example, I have tried to add this action:
But I obtain always an error:
Translation:
Automator was not able to convert the input data into the chosen type.
OK
Display the process
And I cannot know more because the workflow, as a quick action triggered with the contextual menu, then Service, then name of the workflow, don't display this:
Translation:
Results Options
0 items Name
Run the process to see the results.
Solution 1:
First : it does not seem that the input type "web content" is accepted by Safari (because it does not appear under Services menu) but if we use "no input" in Safari it then does appear in Services menu.
Simple example:
This example shows how to launch a QuickAction from the Services menu in Safari.
Because the QuickAction does not get any data as input we have to fetch the Safari current web page by :
- Get current Safari web page
- Retrieve content of the web page
- And finally download images
Click save, give a name and launch this new QuickAction from Services menu in Safari; it will download all images of the current web page in your computer.
To conclude : for a Safari quick action don't use the web content input type it does not work (imo)
And to answer your question : the type "web content" is the type of data that my 2nd block returns. It can be used by any block that accepts "web content" type as input (my 3rd block is an example of that).