> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Importing Langflow tools

Once you finish your Langflow flow, you can import it into watsonx Orchestrate. You have two options:

* [Import by Langflow flow name](#importing-langflow-flow-using-langflow-flow-name)
* [Import by Langflow flow JSON](#importing-langflow-flow-using-langflow-flow-json)

## Importing Langflow flow using Langflow flow name

To import a flow by name, pass the Langflow flow name in the CLI import command. This method works only if you use Langflow integrated with watsonx Orchestrate Developer Edition during the import process. Otherwise, the command fails.

The command imports the latest version of the specified Langflow flow with its global variables. If a flow with the same name exists, the command updates it.

To import a Langflow flow using its name, run:

```bash BASH theme={null}
orchestrate tools import -k langflow -n <langflow-flow-name>
```

<Expandable title="command flags">
  | Flag            | Type   | Required | Description                                                                                                  |
  | --------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------ |
  | `--kind` / `-k` | string | Yes      | The kind of tool to import, this is always `langflow` for Langflow based tools.                              |
  | `--name` / `-n` | string | Yes      | the Langflow flow name to import from Langflow. If a tool with the same name exists, the command updates it. |
</Expandable>

## Importing Langflow flow using Langflow flow JSON

You can also import a flow using its exported JSON file. After you finish the flow, share it and export it as a JSON file for watsonx Orchestrate. When exporting, select **Save with my API keys**. For more information, see [Import and export flows](https://docs.langflow.org/concepts-flows-import).

<Frame caption="Save with my API keys option">
  <img src="https://mintcdn.com/ibm-2e3153bf/WF5WkPioIlkOTs8R/assets/langflow/share-example.png?fit=max&auto=format&n=WF5WkPioIlkOTs8R&q=85&s=b5bfeca1561041bfa07384d4f5bdb1a0" width="747" height="442" data-path="assets/langflow/share-example.png" />
</Frame>

<Note>
  **Note:**

  If your Langflow flow uses global variables, bind these variables to watsonx Orchestrate connections first. For more information, see [Binding global variables to connections](./binding_variables).
</Note>

Then, to import a Langflow flow, run:

```bash BASH theme={null}
orchestrate tools import -k langflow -f <json-file-path> -a <app-id> -r <requirements-file-path>
```

<Expandable title="command flags">
  | Flag                         | Type   | Required | Description                                                                                                                                                                                                    |
  | ---------------------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `--kind` / `-k`              | string | Yes      | The kind of tool to import, this is always `langflow` for Langflow based tools.                                                                                                                                |
  | `--file` / `-f`              | string | Yes      | The path to the file of the shared JSON you want to import (or a URL containing the file).                                                                                                                     |
  | `--app-id` / `-a`            | string | No       | The application ID of a [connection](/connections/overview) related to your Langflow flow. Use connections to authenticate or configure global variables. You can include multiple `--app-id` flags if needed. |
  | `--requirements-file` / `-r` | string | No       | The path to a `requirements.txt` file that lists all Python packages needed to run the Langflow flow.                                                                                                          |
</Expandable>
