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

# Pinecone

Let's learn how to connect Engini to Pinecone.

Use Pinecone in your workflows to store, update, delete and look up records in your vector indexes, search for similar records, and manage your indexes.

To get started, create an account at [Pinecone](https://www.pinecone.io).

## Add a Connection to Pinecone in Engini

### Prerequisites

* A Pinecone account.
* A Pinecone API key. In the [Pinecone console](https://app.pinecone.io), open *API keys* and create or copy a key.

### Connecting Engini to Pinecone

1. Enter your Engini account at [https://app.engini.io](https://app.engini.io/).

2. Navigate to the Connections page by clicking on Connections in the left sidebar or by clicking [here](https://app.engini.io/connections).

   ![Engini - Connections page](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/connections-page.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=4a40143bc5953175bdbec921d3202afc)

3. Click on the "New Integration" option located at the top bar.

   ![Engini - New Integration button](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/new-integration-button.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=fb92c0da91feed93d7396ad5fd57214f)

4. Choose the Pinecone option from the available applications.

   ![Pinecone - Choose Application](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-choose-application.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=7f48fb2c272c73317e4fd53b4e1a2be7)

5. Enter the following details in the "New Integration" form and press Save:

   ![Pinecone - New Integration form](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-new-integration.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=372d51416669eb9d1e5cae1c5472d951)

   <ol>
     <li>*Connection Name -* Enter a name that helps identify the Pinecone connection.</li>
     <li>*API Key -* Enter your Pinecone API key. You can copy it from the API keys page of the Pinecone console.</li>
     <li>*Save -* Click Save to create the connection.</li>
   </ol>

## Actions

Every action that works with records starts with an *Index Id* field. Click it to choose one of the indexes in your Pinecone account.

**Note:** *Create or Update Text Records* and *Get Similar Records by Text* work only with an index that has integrated embedding, which means Pinecone turns your text into vectors for you. The other record actions work with any index.

### Create or Update Records

Adds records to an index. A record that already exists is replaced.

![Pinecone - Create or Update Records action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-create-or-update-records.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=a70b0ddbab1026e226e915a518c1c295)

1. *Index Id -* The Pinecone index to write to.
2. *Records -* The records to add, as a JSON array. Each record has an `id`, its `values` (the vector) and, optionally, `metadata`, for example `[{"id": "rec-1", "values": [0.1, 0.2, 0.3], "metadata": {"genre": "drama"}}]`. The number of values must match the dimension of the index.
3. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

The following is optional and is added through Add Field:

* *Namespace -* The namespace to write the records to. Leave it empty to use the default namespace.

### Create or Update Text Records

Adds records to an index from their text. Pinecone creates the vectors for you, so this action needs an index with integrated embedding.

![Pinecone - Create or Update Text Records action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-create-or-update-text-records.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=8c80a6c8c52d8879f82f3e8c39904049)

1. *Index Id -* The Pinecone index to write to. It must have integrated embedding.
2. *Namespace -* The namespace to write the records to, for example `my-namespace`.
3. *Records -* The records to add, one JSON record per line. Each record has an `_id` and the text field that your index is set up to embed, for example `{"_id": "rec-1", "chunk_text": "Apples are good for digestion."}`.

### Delete Index

Deletes an index from your Pinecone account.

![Pinecone - Delete Index action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-delete-index.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=6d2e5f0e0ca6da90cceda7a0b275fd2f)

* *Index Id -* Click the field and choose the index to delete.

### Delete Records

Deletes records from an index by their ids.

![Pinecone - Delete Records action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-delete-records.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=e08018f9754881bd180dec4b9e26896c)

1. *Index Id -* The Pinecone index the records are in.
2. *Record Ids -* The ids of the records to delete, for example `id-1, id-2`.
3. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

The following is optional and is added through Add Field:

* *Namespace -* The namespace the records are in. Leave it empty to use the default namespace.

### Get Index

Gets the details of one index.

![Pinecone - Get Index action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-get-index.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=0ef858d1c554252b764b60fc0592e99b)

* *Index Id -* Click the field and choose the index to get.

### Get Indexes

Gets all the indexes in your Pinecone account. This action has no fields to fill in.

![Pinecone - Get Indexes action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-get-indexes.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=293f85cc28c21d755e95d85d6bfec132)

### Get Record

Gets one record from an index by its id.

![Pinecone - Get Record action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-get-record.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=aacd203f51a4720c4423cbc8778b3211)

1. *Index Id -* The Pinecone index the record is in.
2. *Record Id -* The id of the record to get, for example `record-1`.

### Get Similar Records

Finds the records in an index that are most similar to a vector or to an existing record.

![Pinecone - Get Similar Records action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-get-similar-records.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=bb686d1304e519c8d370026405092e76)

1. *Index Id -* The Pinecone index to search.
2. *Number of Results -* How many similar records to return. The default is 10.
3. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

All of the following are optional and are added through Add Field:

* *Query Vector -* The vector to search with, as a list of numbers. Use it, or *Record Id*, to say what to compare against.
* *Record Id -* The id of an existing record. Pinecone searches for the records most similar to it.
* *Namespace -* The namespace to search. Leave it empty to use the default namespace.
* *Metadata Filter -* A filter on the records' metadata, written as JSON, for example `{"genre": "drama"}`. Only records that match are returned.
* *Include Metadata -* Choose whether each returned record includes its metadata.
* *Include Values -* Choose whether each returned record includes its vector values.

### Get Similar Records by Text

Finds the records in an index that are most similar to a piece of text. Pinecone turns the text into a vector for you, so this action needs an index with integrated embedding.

![Pinecone - Get Similar Records by Text action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-get-similar-records-by-text.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=d50a28d088cf77b438686907139883f5)

1. *Index Id -* The Pinecone index to search. It must have integrated embedding.
2. *Namespace -* The namespace to search, for example `my-namespace`.
3. *Query Text -* The text to look for similar records to, for example `apples for digestion`.
4. *Number of Results -* How many similar records to return. The default is 10.
5. *Metadata Filter -* Optional. A filter on the records' metadata, written as JSON, for example `{"genre": "drama"}`. Only records that match are returned.
6. *Add Filter -* Click Add Filter to choose which fields of each record are returned (*Fields To Return*). To learn more about using filters, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-filters).

### Update Index

Changes the settings of an existing index.

![Pinecone - Update Index action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-update-index.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=f3310a9c1fbdeac6f76aec4506198ea0)

1. *Index Id -* Click the field and choose the index to update.
2. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

All of the following are optional and are added through Add Field:

* *Deletion Protection -* Choose enabled or disabled to turn deletion protection on or off for the index.
* *Tags -* The tags to attach to the index, as key and value pairs, for example a tag key and its value.

### Update Record

Changes an existing record in an index.

![Pinecone - Update Record action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-update-record.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=333716e871c7882d774bb977c3479085)

1. *Index Id -* The Pinecone index the record is in.
2. *Record Id -* The id of the record to update, for example `record-1`.
3. *Add Field -* Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, [click here](https://docs.engini.ai/help/workflows/workflow-editor.md#add-fields).

All of the following are optional and are added through Add Field:

* *Namespace -* The namespace the record is in. Leave it empty to use the default namespace.
* *Values -* The new vector values of the record, as a list of numbers.
* *Metadata To Set -* Metadata to set on the record, written as JSON, for example `{"genre": "drama"}`.

### Send API Request

This activity allows you to send a custom API request directly to Pinecone's API.

![Pinecone - Send API Request action](https://mintcdn.com/engini/Fhn3O7koUQ3Q2A-B/help/assets/apps/pinecone/pinecone-send-api-request.png?fit=max\&auto=format\&n=Fhn3O7koUQ3Q2A-B\&q=85\&s=eb9301161ff078fc7d075e5468ac3913)

1. *Base Url -* The root URL of the Pinecone API. It is filled in from your Pinecone connection and can't be edited here.
2. *Relative url -* You can specify additional path segments or parameters that need to be added to the end of the Base Url. This allows you to customize the specific request you want to perform.
3. *Method -* Select the HTTP method (e.g., Get, Post, Put, Delete, Patch). The default is POST.
4. *Body Type -* Defines the format of the data in the body of your request. The default, application/json, means the body contains a JSON-formatted payload.
   * *application/json* – Sends the request body in JSON format. Commonly used by REST APIs.
   * *Custom (use Content-Type header)* – Allows you to define a custom body format by manually setting the Content-Type header. Add a `Content-Type` row in *Add Headers* with the media type you need (for example `application/xml`). With any other Body Type, a Content-Type you type in *Add Headers* is not sent; Engini sets it from the Body Type.
   * *application/x-www-form-urlencoded* – Sends the body as URL-encoded key-value pairs, commonly used in form submissions.
   * *file* – Sends a file as the request body.
   * *multipart/form-data* – Sends form data that may include both text fields and files.
   * *text/html* – Sends the request body as HTML content.
   * *text/plain* – Sends the request body as plain text.
   * *text/xml* – Sends the request body in XML format.
5. *Body -* Contains any data that is being sent to the server.
6. *Add Headers -* Additional metadata about the request, such as the type of data Engini can accept, the length of the request body, and authentication information.
7. *Add Queries -* The query refers to the parameters or data that are included in the URL of an HTTP request to provide additional information or instructions to the server.

For the full list of endpoints, see the [Pinecone API reference](https://docs.pinecone.io/reference/api/introduction).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.