# How to scaffold a pipeline using an OpenAPI specification

On the Digibee Integration Platform, you can create a scaffolded pipeline using an existing OpenAPI specification file. This automatically pre-configures the routes and sets up part of the flow, allowing you to speed up the creation of pipelines while ensuring that best practices for data flow creation are followed.

## **How to import an OpenAPI specification**

1. On the **Build** page, click **Create new**, then select **Pipeline from OpenAPI**.
2. In the pop-up window, upload a **YAML** or **JSON** file. You can upload the file by dragging and dropping or browsing your computer.
3. On the next page, you will see a preview of the route list. Review the information to ensure it’s correct. If something is incorrect, click **Upload a different file** to select a new file with the correct configuration.
4. Once you’re confident with the configuration, click **Confirm**.

{% hint style="info" %}
After confirming, you cannot upload a new file. However, you can manually edit the routes in the [**API Trigger**](/documentation/connectors-and-triggers/triggers/web-protocols/api.md) configuration form within the pipeline.
{% endhint %}

<figure><img src="/files/0pYRZ3dTkOZwqvC9LXP3" alt=""><figcaption></figcaption></figure>

## **Scaffolded pipeline**

After importing the OpenAPI specification file, the scaffolded pipeline will include the following elements:

* The [**API Trigger**](/documentation/connectors-and-triggers/triggers/web-protocols/api.md), which serves as the entry point for initiating the pipeline.
* A visual representation of the routes, each connected to a **Router** for managing different paths.
* [**Block Execution**](/documentation/connectors-and-triggers/connectors/logic/block-execution.md) connectors at the end of each route, logically organizing the pipeline into subflows to improve flow management and clarity.
* Response handling within the [**OnProcess**](/documentation/developer-guide/development-cycle/build-overview/pipelines/subpipelines.md#onprocess) and [**OnException**](/documentation/developer-guide/development-cycle/build-overview/pipelines/subpipelines.md#onexception) subflows of each **Block Execution**, facilitating more structured error and process management.

### **Creating the flow from the scaffolded pipeline**

#### **Configuring the trigger**

In the scaffolded pipeline, the trigger is pre-configured with the necessary routes. However, additional configurations must be done manually to ensure the trigger functions as you need. For detailed instructions on configuring the trigger, refer to the [**API Trigger**](/documentation/connectors-and-triggers/triggers/web-protocols/api.md) documentation.

#### **Configuring the subflows**

While part of the flow is already scaffolded, you will need to implement the integration logic by configuring the subflows of the [**Block Execution**](/documentation/connectors-and-triggers/connectors/logic/block-execution.md) connectors at the end of each route. This approach helps ensure that your integration follows best practices and remains manageable.

#### **Editing the routes**

You can edit the routes at any time through the trigger's configuration form. Once you have saved the trigger, any changes will be reflected immediately in the pipeline.

{% hint style="warning" %}
If you change the [**API Trigger**](/documentation/connectors-and-triggers/triggers/web-protocols/api.md) to another type of trigger, the **Router** is converted into a [**Choice**](/documentation/connectors-and-triggers/connectors/logic/choice.md) connector, and the previously configured routes will be connected to the **Choice** instead. You can copy the connectors within each [**Block Execution**](/documentation/connectors-and-triggers/connectors/logic/block-execution.md) and paste them elsewhere in the pipeline as needed.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.digibee.com/documentation/developer-guide/development-cycle/build-overview/pipelines/how-to-scaffold-a-pipeline-using-an-openapi-specification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
