nodes / extension
Get Selected Text
Get the selected text from the page of the actual openend tab
Read the text you have highlighted on the active tab into a field.
Try it
Section titled “Try it”My first workflow: a workflow with 3 steps, starting with When Started and ending with Edit Fields.
What it does
Section titled “What it does”Get Selected Text takes whatever text is currently selected (highlighted with the mouse) on the active tab and stores it in the field you name in Output field name. You get plain text, without formatting.
The output holds only the new field. Turn on Include input fields to keep the incoming item’s fields next to it.
The node fails when nothing is selected, so the rest of the workflow does not run on empty text.
When to use it
Section titled “When to use it”- “Select, then act” workflows: translate, summarize, look up or save the passage you just highlighted.
- Pair it with a Context Menu or Hotkey trigger so you select text and run the workflow in one gesture.
- To keep links and formatting, use Get HTML of Selected Text. To read the whole page, use Get All Text.
Inputs and settings
Section titled “Inputs and settings”| Setting | Type | What it does |
|---|---|---|
| Output field name (required) | Text | The name of the output field. |
| Options | Group | The options for the node. |
| Options › Include input fields | Toggle | Whether to include the input fields in the output. Default: Off |
Output field name: for example selection. Later nodes read it with {{ $input.selection }}.
Outputs
Section titled “Outputs”-
Output
One item with your field, for example { "selection": "the text you highlighted" }.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”- Add a Context Menu trigger, so the workflow appears when you right-click selected text.
- Add Get Selected Text with Output field name =
selection. - Add Translate with Text =
{{ $input.selection }}, From = English and To = French. It runs on your device. - Show the result with Display Markdown.
Common issues
Section titled “Common issues”- “No content found”. Nothing was selected on the active tab when the node ran. Select the text first, and keep that tab active while the workflow runs.
- Selected text inside a box on the page is not picked up. Text selected inside an embedded frame (some editors and comment widgets) is not read; only the main page is.
- The node fails outside the extension. This node runs in the browser extension; install it or run the workflow from the extension.
Recipes with this node
Section titled “Recipes with this node”Related nodes
Section titled “Related nodes”- Get HTML of Selected Text: the same selection, with its markup.
- Get All Text: all the text of the page.
- Clipboard Write: put a result back on the clipboard.