> 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/references/call-workflow.md).

# Call workflow

Call Workflow is an action that allows the running script (parent Workflow) to call and execute another pre-created script (child Workflow) in the system. This is a powerful tool for breaking down complex processes into independently managed modules, helping to optimize the reuse of automation logic.

> ⚠️ Note that the Test action feature will not work with Call workflow.

#### Configuration parameters:

• Reference file: Select from your list of child workflows.

#### Mechanism of operation:

When the parent Workflow reaches the Call Workflow step, the system will pause the main flow and transfer execution rights to the child Workflow. After the child Workflow completes, the system will automatically return to the parent Workflow and continue executing the next steps.

You can create a child workflow by clicking the + sign in the upper right corner of the Main workflow -> Select Create new workflow (to create a new one) or Import from existing file (to choose from an existing file).

#### Real-world example: Automatic account login flow

Suppose you are scripting for bulk account management for MMO projects, instead of writing login code in every script, you create a separate Workflow named `login_module`:

• Step 1: In the main Workflow, after opening the browser, you drag the Call Workflow action.

• Step 2: In the Reference file section, you select `login_module`.

• Step 3: In the Parameters section, you pass the variables `$user` and `$pass` from the main Workflow to the child Workflow.

• Step 4: When the main Workflow reaches here, it will "call" `login_module` to complete the actions of filling in user/pass, clicking login, and handling captcha. After that, it will automatically return to the main Workflow to continue tasks such as running Tools, doing Airdrop, or posting products.

Technical notes:

• Ensure that the child Workflow has been saved and its logic checked before calling.

• Check the consistency of variable names between the parent and child Workflows to ensure data is transmitted accurately and without conflict. To use a variable from the child workflow, you write in the syntax: `$workflow_name_variable_name`, for example, as shown below, in the Main workflow, if the login\_module has a variable `$status`, then to use it in the Main workflow, you need to write `$login_module_status`.

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

<figure><img src="/files/JoCyLFCaXtXXUd8RMGM1" 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/references/call-workflow.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.
