> 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-guide.md).

# ACTION GUIDE

- [📦Some default variables](https://docs.gpmautomate.com/automate-en/action-guide/some-default-variables.md): Some default variables used in Automate
- [🧱Blocks](https://docs.gpmautomate.com/automate-en/action-guide/blocks.md)
- [Normal block](https://docs.gpmautomate.com/automate-en/action-guide/blocks/normal-block.md): Normal block
- [For](https://docs.gpmautomate.com/automate-en/action-guide/blocks/for.md): For is a command block used to repeat a group of actions a predetermined number of times. This loop uses a default counter variable called $loopIndex to track the progress of the iteration.
- [While](https://docs.gpmautomate.com/automate-en/action-guide/blocks/while.md): While is a command block used to repeatedly execute a group of actions continuously until a condition is met.
- [If, Else if and Else](https://docs.gpmautomate.com/automate-en/action-guide/blocks/if-else-if-and-else.md)
- [Guide to writing Conditions](https://docs.gpmautomate.com/automate-en/action-guide/blocks/writing-conditions.md): When using control blocks like If, Else if, or While, you need to set up a condition expression for the system to check at runtime. This expression will return a result of True (true) or False (false)
- [📊Variables](https://docs.gpmautomate.com/automate-en/action-guide/variables.md)
- [Set variable](https://docs.gpmautomate.com/automate-en/action-guide/variables/set-variable.md)
- [Increase variable](https://docs.gpmautomate.com/automate-en/action-guide/variables/increase-variable.md): Increase variable is used to add a numeric value (defined in the Increase by section) to a variable.
- [Decrease variable](https://docs.gpmautomate.com/automate-en/action-guide/variables/decrease-variable.md): Decrease variable is used to subtract a numerical value (defined in the Decrease by section) from a variable.
- [Count](https://docs.gpmautomate.com/automate-en/action-guide/variables/count.md)
- [⚙️Workflow](https://docs.gpmautomate.com/automate-en/action-guide/workflow.md)
- [Exit loop](https://docs.gpmautomate.com/automate-en/action-guide/workflow/exit-loop.md)
- [Next loop](https://docs.gpmautomate.com/automate-en/action-guide/workflow/next-loop.md)
- [Stop](https://docs.gpmautomate.com/automate-en/action-guide/workflow/stop.md)
- [Throw](https://docs.gpmautomate.com/automate-en/action-guide/workflow/throw-is-already-an-english-word.md)
- [Delay](https://docs.gpmautomate.com/automate-en/action-guide/workflow/delay.md): Pause for a period of time.
- [🔤Text & number](https://docs.gpmautomate.com/automate-en/action-guide/text-and-number.md)
- [Random text](https://docs.gpmautomate.com/automate-en/action-guide/text-and-number/random-text.md)
- [Split text](https://docs.gpmautomate.com/automate-en/action-guide/text-and-number/split-text.md)
- [Read JSON](https://docs.gpmautomate.com/automate-en/action-guide/text-and-number/read-json.md)
- [Regex](https://docs.gpmautomate.com/automate-en/action-guide/text-and-number/regex.md)
- [Random number](https://docs.gpmautomate.com/automate-en/action-guide/text-and-number/random-number.md)
- [Math execute](https://docs.gpmautomate.com/automate-en/action-guide/text-and-number/math-execute.md)
- [2FA code](https://docs.gpmautomate.com/automate-en/action-guide/text-and-number/2fa-code.md)
- [📁File & Folder](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder.md)
- [File exists](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/file-exists.md)
- [Copy file](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/copy-file.md)
- [Move/rename file](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/move-rename-file.md)
- [Delete file](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/delete-file.md): Delete file according to the File Path.
- [File read all text](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/file-read-all-text.md)
- [File read all lines](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/file-read-all-lines.md)
- [File read random line](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/file-read-random-line.md)
- [File write all text](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/file-write-all-text.md)
- [File append line](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/file-append-line.md)
- [Create empty excel](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/create-empty-excel.md)
- [Read excel file](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/read-excel-file.md)
- [Write excel file](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/write-excel-file.md)
- [Append excel file](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/append-excel-file.md): Add new data to the end of an existing Excel file without overwriting the current content.
- [Folder exists](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/folder-exists.md)
- [Create folder](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/create-folder.md)
- [Move / rename folder](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/move-rename-folder.md)
- [Delete folder](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/delete-folder.md)
- [Folder get file list](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/folder-get-file-list.md)
- [📋Clipboard](https://docs.gpmautomate.com/automate-en/action-guide/clipboard.md)
- [Get clipboard text](https://docs.gpmautomate.com/automate-en/action-guide/clipboard/get-clipboard-text.md): Get the existing text content in the clipboard.
- [Set clipboard text](https://docs.gpmautomate.com/automate-en/action-guide/clipboard/set-clipboard-text.md)
- [🌐HTTP](https://docs.gpmautomate.com/automate-en/action-guide/http.md)
- [HTTP Request](https://docs.gpmautomate.com/automate-en/action-guide/http/http-request.md)
- [HTTP Download](https://docs.gpmautomate.com/automate-en/action-guide/http/http-download.md): Download a file to your computer via the HTTP protocol.
- [🖼️Image Search](https://docs.gpmautomate.com/automate-en/action-guide/image-search.md)
- [Wait to image](https://docs.gpmautomate.com/automate-en/action-guide/image-search/wait-to-image.md)
- [Image exists](https://docs.gpmautomate.com/automate-en/action-guide/image-search/image-exists.md)
- [Image search](https://docs.gpmautomate.com/automate-en/action-guide/image-search/image-search.md)
- [Example combination for Image](https://docs.gpmautomate.com/automate-en/action-guide/image-search/combined-example-for-image.md)
- [Image to Base64](https://docs.gpmautomate.com/automate-en/action-guide/image-search/image-to-base64.md)
- [🤖AI](https://docs.gpmautomate.com/automate-en/action-guide/ai.md)
- [ChatGPT](https://docs.gpmautomate.com/automate-en/action-guide/ai/chatgpt.md)
- [DeepSeek](https://docs.gpmautomate.com/automate-en/action-guide/ai/deepseek.md)
- [📧Mail](https://docs.gpmautomate.com/automate-en/action-guide/mail.md)
- [Read mail code](https://docs.gpmautomate.com/automate-en/action-guide/mail/read-mail-code.md)
- [Read outlook (Oauth2)](https://docs.gpmautomate.com/automate-en/action-guide/mail/read-outlook-oauth2.md)
- [🧭Navigation](https://docs.gpmautomate.com/automate-en/action-guide/navigation.md)
- [New tab](https://docs.gpmautomate.com/automate-en/action-guide/navigation/new-tab.md)
- [Active tab](https://docs.gpmautomate.com/automate-en/action-guide/navigation/active-tab.md)
- [Close tab](https://docs.gpmautomate.com/automate-en/action-guide/navigation/close-tab.md)
- [Close all tab](https://docs.gpmautomate.com/automate-en/action-guide/navigation/close-all-tabs.md)
- [Go to URL](https://docs.gpmautomate.com/automate-en/action-guide/navigation/go-to-url.md)
- [Back URL](https://docs.gpmautomate.com/automate-en/action-guide/navigation/back-url.md)
- [Reload](https://docs.gpmautomate.com/automate-en/action-guide/navigation/reload.md)
- [Get URL](https://docs.gpmautomate.com/automate-en/action-guide/navigation/get-url.md)
- [Wait URL Changed](https://docs.gpmautomate.com/automate-en/action-guide/navigation/wait-url-changed.md)
- [🎯Element](https://docs.gpmautomate.com/automate-en/action-guide/element.md)
- [Wait element](https://docs.gpmautomate.com/automate-en/action-guide/element/wait-element.md)
- [Get element attribute](https://docs.gpmautomate.com/automate-en/action-guide/element/get-element-attribute.md)
- [Get element text](https://docs.gpmautomate.com/automate-en/action-guide/element/get-element-text.md)
- [Count element](https://docs.gpmautomate.com/automate-en/action-guide/element/count-element.md)
- [🖱️Mouse](https://docs.gpmautomate.com/automate-en/action-guide/mouse.md)
- [Mouse click](https://docs.gpmautomate.com/automate-en/action-guide/mouse/mouse-click.md): Click the mouse on an element.
- [Mouse try to click](https://docs.gpmautomate.com/automate-en/action-guide/mouse/mouse-try-to-click.md)
- [Mouse move](https://docs.gpmautomate.com/automate-en/action-guide/mouse/mouse-move.md)
- [Mouse press and hold](https://docs.gpmautomate.com/automate-en/action-guide/mouse/mouse-press-and-hold.md)
- [Mouse release](https://docs.gpmautomate.com/automate-en/action-guide/mouse/mouse-release.md)
- [Mouse scroll](https://docs.gpmautomate.com/automate-en/action-guide/mouse/mouse-scroll.md)
- [⌨️Keyboard](https://docs.gpmautomate.com/automate-en/action-guide/keyboard.md)
- [Key press](https://docs.gpmautomate.com/automate-en/action-guide/keyboard/key-press.md): Type content on the website.
- [File upload](https://docs.gpmautomate.com/automate-en/action-guide/keyboard/file-upload.md)
- [Select dropdown](https://docs.gpmautomate.com/automate-en/action-guide/keyboard/select-dropdown.md)
- [📜Scroll](https://docs.gpmautomate.com/automate-en/action-guide/scroll.md)
- [Random scroll](https://docs.gpmautomate.com/automate-en/action-guide/scroll/random-scroll.md)
- [Scroll to top](https://docs.gpmautomate.com/automate-en/action-guide/scroll/scroll-to-top.md)
- [Scroll to bottom](https://docs.gpmautomate.com/automate-en/action-guide/scroll/scroll-to-bottom.md)
- [Scroll to element](https://docs.gpmautomate.com/automate-en/action-guide/scroll/scroll-to-element.md)
- [🔀Switch](https://docs.gpmautomate.com/automate-en/action-guide/switch.md)
- [Switch to default](https://docs.gpmautomate.com/automate-en/action-guide/switch/switch-to-default.md)
- [Switch to frame](https://docs.gpmautomate.com/automate-en/action-guide/switch/switch-to-frame.md)
- [Switch to popup](https://docs.gpmautomate.com/automate-en/action-guide/switch/switch-to-popup.md)
- [🍪Cookie](https://docs.gpmautomate.com/automate-en/action-guide/cookie.md)
- [Import cookie](https://docs.gpmautomate.com/automate-en/action-guide/cookie/import-cookie.md)
- [Export cookie](https://docs.gpmautomate.com/automate-en/action-guide/cookie/export-cookie.md)
- [⚠️Alert](https://docs.gpmautomate.com/automate-en/action-guide/alert.md)
- [Accept alert](https://docs.gpmautomate.com/automate-en/action-guide/alert/accept-alert.md)
- [Cancel alert](https://docs.gpmautomate.com/automate-en/action-guide/alert/cancel-alert.md)
- [📑Tab & Popup](https://docs.gpmautomate.com/automate-en/action-guide/tab-and-popup.md)
- [Wait popup](https://docs.gpmautomate.com/automate-en/action-guide/tab-and-popup/wait-popup.md)
- [Has popup](https://docs.gpmautomate.com/automate-en/action-guide/tab-and-popup/has-popup.md)
- [💻Javascript](https://docs.gpmautomate.com/automate-en/action-guide/javascript.md)
- [Execute JS code](https://docs.gpmautomate.com/automate-en/action-guide/javascript/execute-js-code.md)
- [Get extension id](https://docs.gpmautomate.com/automate-en/action-guide/javascript/get-extension-id.md)
- [Screenshot](https://docs.gpmautomate.com/automate-en/action-guide/javascript/screenshot.md)
- [🔗References](https://docs.gpmautomate.com/automate-en/action-guide/references.md)
- [Call workflow](https://docs.gpmautomate.com/automate-en/action-guide/references/call-workflow.md)
- [📊Google service](https://docs.gpmautomate.com/automate-en/action-guide/google-service.md): Read and write content to Google Sheets
- [Read google sheet](https://docs.gpmautomate.com/automate-en/action-guide/google-service/read-google-sheet.md)
- [Write google sheet](https://docs.gpmautomate.com/automate-en/action-guide/google-service/write-google-sheet.md): Write data to Google Sheets
- [📱Phone - App](https://docs.gpmautomate.com/automate-en/action-guide/phone-app.md)
- [Install app](https://docs.gpmautomate.com/automate-en/action-guide/phone-app/install-app.md): Install application file (.apk) from the computer to the mobile device.
- [Is app installed](https://docs.gpmautomate.com/automate-en/action-guide/phone-app/app-installed.md): Check if an application is installed on the device or not.
- [Uninstall app](https://docs.gpmautomate.com/automate-en/action-guide/phone-app/uninstall-app.md): Uninstall an application from the device by package name.
- [Start app](https://docs.gpmautomate.com/automate-en/action-guide/phone-app/start-application.md): Open (launch) an installed application on the device.
- [Stop app](https://docs.gpmautomate.com/automate-en/action-guide/phone-app/stop-application.md): Force stop an application running on the device.
- [Clean app data](https://docs.gpmautomate.com/automate-en/action-guide/phone-app/clean-application-data.md): Delete all data of an application, restoring the app to a state as if it were newly installed.
- [📲Phone - Device](https://docs.gpmautomate.com/automate-en/action-guide/phone.md)
- [Lock device](https://docs.gpmautomate.com/automate-en/action-guide/phone/lock-device.md): Lock the device screen.
- [Unlock device](https://docs.gpmautomate.com/automate-en/action-guide/phone/unlock-device.md): Wake up and unlock the device screen.
- [Toggle service](https://docs.gpmautomate.com/automate-en/action-guide/phone/toggle-service.md): Toggle a system service on the device (Airplane mode, Wi-Fi, Mobile data, Location).
- [Check network](https://docs.gpmautomate.com/automate-en/action-guide/phone/check-network.md): Check the device's network connection by pinging Google.
- [Reconnect](https://docs.gpmautomate.com/automate-en/action-guide/phone/reconnect.md): Reconnect ADB — reset the ADB connection between the phone and computer.
- [🧭Phone - Navigation](https://docs.gpmautomate.com/automate-en/action-guide/phone-navigation.md)
- [Press back](https://docs.gpmautomate.com/automate-en/action-guide/phone-navigation/press-back.md): Press the Back button on the device.
- [Press home](https://docs.gpmautomate.com/automate-en/action-guide/phone-navigation/home-button.md): Press the Home button to return to the main screen.
- [Press menu](https://docs.gpmautomate.com/automate-en/action-guide/phone-navigation/menu.md): Press the Menu key of the device.
- [📁Phone - File](https://docs.gpmautomate.com/automate-en/action-guide/phone-file.md)
- [Push file](https://docs.gpmautomate.com/automate-en/action-guide/phone-file/push-file.md): Push (copy) a file from the computer to the mobile device.
- [Pull file](https://docs.gpmautomate.com/automate-en/action-guide/phone-file/pull-file.md): Pull (copy) a file from the mobile device to the computer.
- [📋Phone - Clipboard](https://docs.gpmautomate.com/automate-en/action-guide/phone-clipboard.md)
- [Copy clipboard](https://docs.gpmautomate.com/automate-en/action-guide/phone-clipboard/copy-clipboard.md): Read the clipboard content of the device and save it to a variable.
- [Set clipboard](https://docs.gpmautomate.com/automate-en/action-guide/phone-clipboard/set-clipboard.md): Place a text snippet into the device's clipboard.
- [Paste clipboard](https://docs.gpmautomate.com/automate-en/action-guide/phone-clipboard/paste-clipboard.md): Paste clipboard content into an element on the screen using XPath.
- [👆Phone - Action](https://docs.gpmautomate.com/automate-en/action-guide/phone-action.md)
- [Guide to determine XPath & coordinates](https://docs.gpmautomate.com/automate-en/action-guide/phone-action/xpath-and-coordinates-guide.md): Use the GPM UI Automator tool to obtain the XPath or coordinates of an element on the phone screen.
- [Touch](https://docs.gpmautomate.com/automate-en/action-guide/phone-action/touch.md): Tap on an element by XPath or by coordinates on the screen.
- [Scroll](https://docs.gpmautomate.com/automate-en/action-guide/phone-action/scroll.md): Scroll the device screen in a direction or according to the coordinates of the start and end points.
- [Screenshot](https://docs.gpmautomate.com/automate-en/action-guide/phone-action/screenshot.md): Capture the screen of the device and save it to the computer.
- [Press key](https://docs.gpmautomate.com/automate-en/action-guide/phone-action/key-press.md): Send a key event to the device.
- [Type text](https://docs.gpmautomate.com/automate-en/action-guide/phone-action/text-type.md): Type a text string into a specified input field using XPath.
- [🎯Phone - Element](https://docs.gpmautomate.com/automate-en/action-guide/phone-element.md)
- [Get element data](https://docs.gpmautomate.com/automate-en/action-guide/phone-element/get-element-data.md): Get an attribute of an element on the screen by XPath and save it to a variable.
- [Has element](https://docs.gpmautomate.com/automate-en/action-guide/phone-element/has-element.md): Check whether an element exists on the screen or not, returning the result to a variable.
- [💻Phone - Shell](https://docs.gpmautomate.com/automate-en/action-guide/phone-case.md)
- [Execute ADB](https://docs.gpmautomate.com/automate-en/action-guide/phone-case/execute-adb.md): Run an ADB command targeting the device and save the result into a variable.
- [Execute CMD](https://docs.gpmautomate.com/automate-en/action-guide/phone-case/execute-command.md): Run a shell command inside the device (via adb shell) and save the result to a variable.


---

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