> For the complete documentation index, see [llms.txt](https://docs.workflowgen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.workflowgen.com/admin/workflow-applications/openai/openaiaddmessage.md).

# OPENAIADDMESSAGE

## Overview

The **OPENAIADDMESSAGE** workflow application allows you to update the message history of a conversation to add user or tool interactions. It's also possible to update the history directly from a sub-process.

## Required parameters

<table data-full-width="false"><thead><tr><th width="238.32476806640625" valign="top">Parameter</th><th width="110.18804931640625" valign="top">Type</th><th width="110.04266357421875" valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>CONTENT</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Message history in JSON format; follows the reference structure provided in OpenAI's documentation for the <code>messages</code> object:<br><a href="https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages">https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages</a>.</td></tr><tr><td valign="top"><code>ROLE</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Role to associate with the message; possible values ​​are <code>user</code>, <code>system</code>, <code>assistant</code>, or <code>tool</code></td></tr></tbody></table>

## Optional parameters

<table data-full-width="false"><thead><tr><th width="238.6097412109375" valign="top">Parameter</th><th width="110.165283203125" valign="top">Type</th><th width="110.04278564453125" valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>MESSAGE_HISTORY</code></td><td valign="top">TEXT</td><td valign="top">INOUT</td><td valign="top">Message history to be updated</td></tr><tr><td valign="top"><code>TOOL_CALL_ID</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">If <code>ROLE</code> is <code>tool</code>, this is the tool identifier</td></tr><tr><td valign="top"><code>ASSISTANT_TOOL_CALL</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">If <code>ROLE</code> is <code>assistant</code> and you want to add a list of tools to call, this is the list of tools</td></tr><tr><td valign="top"><code>REQUEST_ID</code></td><td valign="top">NUMERIC</td><td valign="top">IN</td><td valign="top">If the history is updated from another process, this is the number of the request to update</td></tr><tr><td valign="top"><code>REQUEST_DATA_NAME</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">If the history is updated from another process, this is the name of the data to be updated</td></tr></tbody></table>


---

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

```
GET https://docs.workflowgen.com/admin/workflow-applications/openai/openaiaddmessage.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.
