---
title: Get Selected Text
description: 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

## 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

* "Select, then act" workflows: translate, summarize, look up or save the passage you just highlighted.
* Pair it with a [Context Menu](/nodes/builtin/trigger/contextmenu/) or [Hotkey](/nodes/builtin/trigger/hotkey/) trigger so you select text and run the workflow in one gesture.
* To keep links and formatting, use [Get HTML of Selected Text](/nodes/extension/gethtmlofselectedtext/). To read the whole page, use [Get All Text](/nodes/extension/getalltext/).

## Inputs and settings

**Output field name**: for example `selection`. Later nodes read it with `{{ $input.selection }}`.

## Outputs

One item with your field, for example `{ "selection": "the text you highlighted" }`.

## Dependencies and credentials

None. This node needs no connection and has no slots for other nodes.

## Example workflow

1. Add a [Context Menu](/nodes/builtin/trigger/contextmenu/) trigger, so the workflow appears when you right-click selected text.
2. Add **Get Selected Text** with **Output field name** = `selection`.
3. Add [Translate](/nodes/builtin/ai/localai/translate/) with **Text** = `{{ $input.selection }}`, **From** = English and **To** = French. It runs on your device.
4. Show the result with [Display Markdown](/nodes/extension/displaymarkdown/).

## 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

## Related nodes

* [Get HTML of Selected Text](/nodes/extension/gethtmlofselectedtext/): the same selection, with its markup.
* [Get All Text](/nodes/extension/getalltext/): all the text of the page.
* [Clipboard Write](/nodes/extension/clipboardwrite/): put a result back on the clipboard.