> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/conversation-operations.md).

# Conversation operations

Use this operation to create, get, update, or remove a conversation in OpenAI. Refer to [OpenAI](/integrations/builtin/app-nodes/n8n-nodes-langchain.openai.md) for more information on the OpenAI node itself.

## Create a Conversation <a href="#create-a-conversation" id="create-a-conversation"></a>

Use this operation to create a new conversation.

Enter these parameters:

* **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
* **Resource**: Select **Conversation**.
* **Operation**: Select **Create a Conversation**.
* **Messages**: A message input to the model. Messages with the `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role will be assumed to have been generated by the model in previous interactions.

### Options <a href="#options" id="options"></a>

* **Metadata**: A set of key-value pairs for storing structured information. You can attach up to 16 pairs to an object, which is useful for adding custom data that can be used for searching via the API or in the dashboard.

Refer to [Conversations | OpenAI](https://platform.openai.com/docs/api-reference/conversations/create) documentation for more information.

## Get a Conversation <a href="#get-a-conversation" id="get-a-conversation"></a>

Use this operation to retrieve an existing conversation.

Enter these parameters:

* **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
* **Resource**: Select **Conversation**.
* **Operation**: Select **Get Conversation**.
* **Conversation ID**: The ID of the conversation to retrieve.

Refer to [Conversations | OpenAI](https://platform.openai.com/docs/api-reference/conversations/create) documentation for more information.

## Remove a Conversation <a href="#remove-a-conversation" id="remove-a-conversation"></a>

Use this operation to remove an existing conversation.

Enter these parameters:

* **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
* **Resource**: Select **Conversation**.
* **Operation**: Select **Remove Conversation**.
* **Conversation ID**: The ID of the conversation to remove.

Refer to [Conversations | OpenAI](https://platform.openai.com/docs/api-reference/conversations/create) documentation for more information.

## Update a Conversation <a href="#update-a-conversation" id="update-a-conversation"></a>

Use this operation to update an existing conversation.

Enter these parameters:

* **Credential to connect with**: Create or select an existing [OpenAI credential](/integrations/builtin/credentials/openai.md).
* **Resource**: Select **Conversation**.
* **Operation**: Select **Update a Conversation**.
* **Conversation ID**: The ID of the conversation to update.

### Options <a href="#options" id="options"></a>

* **Metadata**: A set of key-value pairs for storing structured information. You can attach up to 16 pairs to an object, which is useful for adding custom data that can be used for searching via the API or in the dashboard.

Refer to [Conversations | OpenAI](https://platform.openai.com/docs/api-reference/conversations/create) documentation for more information.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/conversation-operations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
