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

# Using the Plural Database in Your Projects

> Connect your Plural flows to a structured database using NocoDB REST APIs to read, write, and manage data in real time during interactions.

The Plural Database feature lets you connect your conversation flows to a structured, cloud-based database so your robot or avatar can read and write data during live interactions. This opens up dynamic use cases like storing user responses, personalizing conversations with previously collected information, logging interaction outcomes, and integrating with external data-driven workflows.

## How the Database Works in Plural

Plural's database functionality is powered by **NocoDB**, an open-source no-code database platform. You interact with it through its REST API, which your flow calls via a **Custom API Call** element whenever it needs to read or write a record.

This means you can:

* **Save** user inputs (such as names, preferences, or selections) to a database table during a conversation.
* **Retrieve** stored data and use it to personalize what the avatar says.
* **Update** records based on user actions, such as marking a question as answered or recording a rating.
* **Query** tables to drive conditional logic — for example, showing different content based on a user's membership tier stored in the database.

<Info>
  Full NocoDB REST API documentation — including endpoints, authentication, and query parameters — is available at [https://docs.nocodb.com/developer-resources/rest-apis/overview/](https://docs.nocodb.com/developer-resources/rest-apis/overview/).
</Info>

## Using the Database in Your Flow

<Steps>
  <Step title="Set up your NocoDB database">
    Create a NocoDB project and define the tables and fields you need. Generate an API token from your NocoDB settings — you will need this to authenticate your API calls from Plural.
  </Step>

  <Step title="Add a Custom API Call element">
    In your Plural flow, add a **Custom API Call** element at the point where you need to read from or write to the database. Enter your NocoDB REST API endpoint URL and your API token.
  </Step>

  <Step title="Map request and response data">
    Configure the request body to include any data you want to send (for example, a user's name saved to the `UserName` attribute). Map the response fields to Plural attributes so downstream elements can use the returned data.
  </Step>

  <Step title="Use database values in your flow">
    Reference the attributes populated by the API response in speech elements, conditions, or other elements to drive personalized, data-driven conversation paths.
  </Step>
</Steps>

## The Database Element

For projects that use Plural's built-in database integration directly, a dedicated **Database element** is available in the element picker. This element simplifies common read and write operations without requiring you to manually configure raw API calls.

See the [Elements Overview](/en/elements/overview) for full details on the Database element and its configuration options.

## Example Use Cases

<CardGroup cols={2}>
  <Card title="Lead capture" icon="user-plus">
    Save visitor names, email addresses, or phone numbers collected during a kiosk interaction directly to a database table for follow-up.
  </Card>

  <Card title="Personalized greetings" icon="hand-wave">
    Look up a returning visitor's name or preferences at the start of a flow and have the avatar greet them by name.
  </Card>

  <Card title="Survey logging" icon="clipboard-list">
    Record answers to rating or question elements so you can analyze response trends over time in your NocoDB dashboard.
  </Card>

  <Card title="Dynamic content" icon="table">
    Pull product names, prices, or availability from a live database table so the avatar always delivers up-to-date information without republishing your project.
  </Card>
</CardGroup>
