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

# Ai Prompt To Text

> Documentation for the Ai Prompt To Text action for Morf

![images/morf.svg](https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/morf.svg?fit=max\&auto=format\&n=EU2WCxuXGIUQcziR\&q=85\&s=ae6978dd2d8b4d3a340944239283af5c)

## Getting Started

Unlock instant, context-aware text generation using Morf's [AI Prompt to Text](https://docs.morf.health/docs/actions/morf/v1/ai_prompt_to_text.md) action directly in your automation. Configure the node's prompts, and use data from the event, the profile and outputs from earlier steps as context to automatically generate the text you need, right when you need it. Use the output in downstream nodes to...

* generate **structured summaries** from form responses and populate visit notes in your EHR
* send personalized **follow-up or reminder texts** to patients that write themselves
* capture high-level **appointment takeaways** in your EHR to automate the creation of appointment follow-up tasks for staff
* ...plus anything else you can dream up!

![Send custom appointment confirmation texts to patients following an appointment scheduled event.](https://mintcdn.com/morfhealth/4zxfvotdFqBvkrFr/images/ai_prompt_to_text_workflow.png?fit=max\&auto=format\&n=4zxfvotdFqBvkrFr\&q=85\&s=27595f1886710e4a8aa879e18d06e187)

### Get started

To begin using AI generated text in Morf:

1. Add the [AI Prompt to Text](https://docs.morf.health/docs/actions/morf/v1/ai_prompt_to_text.md) node to your workflow when you want text generated.
2. Give the node a descriptive object name (i.e. `appointment_summary` or `confirmation_text` ). You’ll use this object name when referencing the output in downstream nodes.
3. Map the Prompts parameter to an array. Add all prompts as static values in individual array entries. The number of prompts will not change the response format — one text string is generated per node.
4. To use the AI generated text later in the workflow, reference the node's `response` (i.e. `appointment_summary.response` , `confirmation_text.response` ).

# Parameters

**Action** `Parameters`

**parameters**

**Prompts** `[]string` *required*

**Model** `ai.models.v1.Model`

```json Allowed Enumeration Values theme={null}
GPT4_1
GPT4_1_MINI
O3
GEMINI2_0_FLASH
GEMINI2_5_PRO
```

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "response": "The customer's sentiment is positive."
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "response": "The AI's response to the prompt"
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**AIPromptToTextResult** `Fetch Action Response Object`

**fields**

**response** `string` *required*

The AI's response to the prompt

```json CEL theme={null}
$result_object_key.response
```

```json Example theme={null}
"The customer's sentiment is positive."
```


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