Change the clipboard data
Power Automate Desktop can send keyboard input as hardware input, so it can reproduce user operations such as copy and paste. By using actions, you can also work with the clipboard directly.
This article explains how to overwrite the clipboard value directly.
The action to use
Section titled “The action to use”The action used here is called “Set clipboard text.”
Details of the “Set clipboard text” action
Section titled “Details of the “Set clipboard text” action”The action has the following parameter.
| Parameter | Value |
|---|---|
| Clipboard text | The string to set on the clipboard |

You can enter a string directly or use a value stored in a variable.
The flow uses the same clipboard that you normally use, so be aware that any data you copied to the clipboard before the run will be overwritten.
Implement by copying and pasting
Section titled “Implement by copying and pasting”As a sample, I prepared a flow that sets a string on the clipboard and stores that string in a variable.
Copy the following code and paste it into the Power Automate Desktop flow designer to add the actions.
Clipboard.SetText Text: $'''changed from power automate desktop'''Clipboard.GetText Text=> ClipboardTextImplement in Power Automate Desktop
Section titled “Implement in Power Automate Desktop”-
In “Search actions,” type “Set clipboard text.”
-
Set the parameter as follows.
Parameter Value Clipboard text changed from power automate desktop -
When you run the flow, the clipboard value at that moment is overwritten.
Possible exceptions
Section titled “Possible exceptions”If a problem occurs while setting the clipboard contents, the action fails with the error “Can’t set clipboard contents.”
We recommend adding error handling with an “On block error” block.