> 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-zh/action-shi-yong-zhi-nan/cookie/import-cookie.md). Agents can also search and read this documentation through its [MCP server](https://docs.gpmautomate.com/~gitbook/mcp).

# Import cookie

Import cookie 是将现有的字符串或结构化 cookie 数据文件加载到浏览器中的操作，使账号自动进入登录成功状态，而无需填写用户名/密码。

#### 配置参数：

* Cookie file：指向包含 cookie 结构的 `.json` 文件的绝对路径（或直接传入数据变量）。
* 结构格式：必须是标准的 JSON 格式。

#### 重要操作注意事项：

* 需要先执行 Go to URL：您必须先让浏览器访问正确的目标网站，然后才能调用此操作（例如：先进入 `facebook.com`，然后再 Import cookie Facebook 的 cookie，这样 cookie 才能正确匹配到对应的域名）。
* 仅在当前 session 中有效：加载进去的所有 cookie 数据仅在该次工作会话中临时生效。一旦关闭浏览器 Profile，这部分 cookie 将自动消失，不会覆盖保存到 Profile 的原始数据中。

<figure><img src="https://1806980278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiDNNiVZHPKSIcyshmOTB%2Fuploads%2Fgit-blob-c9012f5315767695f2b7303151f4338061da8293%2Fck-01.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1806980278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiDNNiVZHPKSIcyshmOTB%2Fuploads%2Fgit-blob-4ccdd264a8b9d51f8a8373ca02b7284c5d5e7930%2Fck-01b.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/cookie/import-cookie.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
