> 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/set-clipboard-text.md).

# Set clipboard text

Set clipboard text is the action used to assign (write) a string of text or the value of a variable to the operating system's clipboard. This action is equivalent to highlighting text and pressing the Copy shortcut (`Ctrl + C`) on a computer.

This action is often used as a buffer before you use the paste command, allowing you to quickly input long text passages or special characters into a browser without the risk of typing errors.

#### Configuration parameters:

* Text: The raw text content (or variable containing data) that you want to load into the clipboard.

> ⚠️ A very important note regarding Multi-threading: Similar to the action of getting text, Set clipboard text is not suitable for multi-threading. Since the Windows operating system uses a single shared Clipboard for the entire system, having multiple profiles write data to the Clipboard at the same time will cause contention, with the later thread overwriting the data of the previous thread and leading to incorrect results. It is advisable to use this action for single-threaded scenarios.

#### Real-world example: Automatically copy and paste long article content

When you need to fill in a very long text (such as a complexly formatted sales article) into an input field on a website. If you use the regular typing action, the system will take a long time to type each character and sometimes encounter Vietnamese font errors. The optimal method is to use the Clipboard:

* Step 1: You call the Set clipboard text action, filling in the article content in the Text field (or passing the data variable `$postContent`).
* Step 2: You click on the input field on the website, then call the Key press action with the key combination `Control+V` to paste the entire text passage into the website immediately.

Result: The entire content of the long article will be pasted into the website in an instant, ensuring that the formatting is preserved, there are no typing errors, and the script execution speed is maximized.

<figure><img src="/files/TtLlBbb73l5NwXuRCw31" 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/set-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.
