> 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/javascript/get-extension-id.md).

# Get extension id

Getting the extension id is the action of instructing the browser to extract the unique identifier (Extension ID) of the extensions installed within the current browser Profile. This ID is extremely important for you to use in subsequent commands, such as directly navigating to the configuration page or wallet of that extension (for example: quickly opening the MetaMask wallet, Tonkeeper, OKX Wallet...).

#### Configuration parameters:

* Extension name: The name of the extension displayed in the browser for which you want to retrieve the ID.
  * *Note*: The system applies a relative search mechanism, you do not need to enter the entire name accurately, just containing the characteristic phrase is sufficient (For example: you can just enter `MetaMask` or `OKX` instead of typing the full lengthy name).
* Output variable: The variable name to store the ID string after extraction (For example: store it in the variable `extId`).

#### ⚠️ Mandatory operational note for successful ID retrieval:

Due to the security mechanism and internal data flow management of the Chromium browser engine, if you are on a regular website and call this command immediately, the system will not be able to scan the list of extensions. To ensure this action works 100% accurately, you need to follow the procedure below:

* Must access the management page first: Your script must use the Go to URL action to access the internal browser address `chrome://extensions/` first.
* Must have a delay: After redirecting to the extensions management page, you must insert a short Delay command (about 1 - 2 seconds). This delay allows the browser's management interface to fully load the source code structure of the extensions, avoiding running too quickly which may cause the script to fail to capture the ID.

#### Practical example: Flow to retrieve extension ID to automatically open the wallet

When you are scripting automation for Crypto/Airdrop tasks, you want to get the ID of the MetaMask wallet to quickly access the wallet unlock page:

* Step 1: Use the Go to URL action ➔ Enter the URL: `chrome://extensions/`.
* Step 2: Drag the Delay action ➔ Enter the wait time: `2000` (equivalent to 2 seconds).
* Step 3: Drag the Get extension id action:
  * *Extension name*: `MetaMask` (just needs to contain this keyword).
  * *Output variable*: `metaMaskId`.
* Step 4: After having the ID stored in the variable `$metaMaskId`, you can use the next Go to URL action with the structure: `chrome-extension://$metaMaskId/home.html` to immediately open the wallet interface for processing without needing to manually click search on the toolbar.

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

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

<figure><img src="/files/ayT0DQqPj6ZAS4Aw2oB9" 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/javascript/get-extension-id.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.
