Skip to main content

Delete the data saved on the clipboard

Power Automate Desktop allows you to input keyboards as hardware, so you can reproduce operations like copy and paste performed by users, but you can operate the clipboard directly by using actions.

In addition, since confidential information may be handled in the flow, it is desirable to return to the state before execution without leaving the data as much as possible.

This time, I will explain how to delete his clipboard value.

Details of "Clear the Contents of the Clipboard" action

This time, we use an action called "Clear the contents of the clipboard".

This action does not have a parameter.When executed, delete the information on the clipboard at the executable.

action

Incorporate into the flow

Add a sample flow with copy and paste

This time, as a sample, the value of the clipboard was rewritten, the value of the clipboard was deleted, and the variable was prepared to store the value of the clipboard after processing.

Copy the following code and paste it on the edit screen of Power Automate Desktop to add the target action.

Clipboard.SetText Text: $'''changed from power automate desktop'''
Clipboard.Clear _
Clipboard.GetText Text=> ClipboardText

The variable stores empty strings.

Operate Power Automate Desktop to add action

  1. From "Search for Action", enter "Clear the Contents of the Clipboard" and add the action.
  2. By execution, the information on the clipboard at the executed timing is deleted.

Exceptions that can occur

This action does not slow down the error, so you do not need to implement block processing.