> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guides/clipboard/get-clipboard-text.md).

# Get clipboard text

Get clipboard text is the action used to read (retrieve) all the text content currently stored in the clipboard memory of the computer – which is the text you just copied (`Ctrl + C`) from any source – and then save that value into an output variable.

This action is extremely flexible when you need to coordinate data processing between external software (like Excel, Notepad, other data scraping tools) and the GPM Automation browser.

#### Configuration parameters:

* Output variable: The name of the variable that stores the string of text retrieved from the clipboard.

> ⚠️ A very important note regarding Multi-threading: This action is not suitable for multi-threaded execution. The Windows operating system has only one clipboard shared across the entire computer. If you open multiple profiles running at the same time, threads will compete and overwrite each other's data, leading to one thread mistakenly retrieving data from another. Therefore, this action should only be used in single-threaded mode (1 profile at a time).

#### Real-world example: Retrieving a manually copied discount code to fill in the browser

Suppose you are running an automated ordering script in single-threaded mode. Before you click to run the thread, you browse the web and find a great discount code; you highlight the text and press `Ctrl + C` to save the string `GIAMGA50K` to your computer's clipboard.

In the GPM Automate script, when the browser navigates to the checkout page and needs to enter the code, you configure it as follows:

* Step 1: Call the Get clipboard text action, naming the output variable `$copiedText`.
* Step 2: Call the input action (e.g., Key press), passing the variable `$copiedText` into the discount code input field on the website.

Result: The system will automatically pull the string `GIAMGA50K` from the Windows clipboard and fill it directly into the website to apply the discount code, allowing you to seamlessly combine manual actions and automated running threads.

<figure><img src="/files/VvdII0O7xZ9UKeuQ3kEM" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-en/action-guides/clipboard/get-clipboard-text.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
