> 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/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, optimizing the reuse of automation logic.

🎥 Watch the tutorial video: [Here](https://youtu.be/OOqmfpq8IUA).

> ⚠️ 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 (if creating new) or Import from existing file (if selecting from an existing file).

#### Practical example: Automatic account login flow

Suppose you are scripting for mass 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 this point, it will "call" `login_module` to complete the actions of entering user/pass, clicking login, and handling captcha. After that, it automatically returns to the main Workflow to continue tasks such as running Tools, doing Airdrop, or posting products.

Technical notes:

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

• Check for consistency in 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, 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="https://2961903581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIRrmOLZkhHBXdAiidIw%2Fuploads%2Fgit-blob-503baca97c5402a098e3a7d1e1a65114cdf6ba18%2Frf-01.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2961903581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIRrmOLZkhHBXdAiidIw%2Fuploads%2Fgit-blob-cbe73177baf148c27b3bc238d32685b06ad5853d%2Frf-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-en/action-guide/references/call-workflow.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.
