---
schema_version: "1"
id: 452a7c33a0b1d94803b96bc12e67edd174d75b0d691c77c54ddb2ee8c228077e
title: "Flow Core Action: Prompt Template Actions"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_actions_generate_prompt_response.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_actions_generate_prompt_response.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1602b17ca48fa66631f037f48ac5ebf3b83dda8221779fc5caff3c477908b1f9
description: Creates responses based on the large language model (LLM) response for the specified prompt template and inputs.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Flow Core Action: Prompt Template Actions

Creates responses based on the large language model (LLM) response for the specified prompt template and inputs.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

In Flow Builder, add an Action element to your flow. In the New Action window, select the **Prompt Template** or **Prompt Template (Batch Generation)** category, and then select the name of the prompt template to use. Individual Generation returns results one at a time as they’re finished, while Batch Generation completes all requests before returning results to avoid hitting LLM rate limits. Batch Generation supports 10,000 generations per day. If the model supports batch processing, the limit is 50,000 per day instead. Look for **Batch Supported: Yes** under **Limits** in the **Models** dropdown in Prompt Builder. The actual time to complete depends on the model provider and may vary.

Batch Generation action has two paths: Completed and Timed out. Add elements to the Completed path to use the generated response. Add elements to the Timed out path to log errors and interruptions. Timeout Length should be set to one day. Click the **Prompt Template (Batch Generation)** action to update Set Timeout length as needed. After it is started, the job begins within two hours.

The API name for each action is prefixed with generatePromptResponse or `generatePromptResponseBatch`.

## Set Input Values

Input values are based on the input variables specified for the prompt template.

## Store Output Values

 
| Field | Description |
| --- | --- |
| **Prompt Response** | The prompt response generated by the action based on the specified prompt template and input. |

## Considerations when using Prompt Template Batch Generation

- Only use Batch Generation with Schedule-Triggered Flow and Record-Triggered Flow template types as they’re designed to handle batches of items.
- Before running a batch generation job, set a Default Workflow User in **Setup** > **Process Automation Settings** > **Process Automation Settings**, as the batch job will run in the context of this user. See [Process Automation Settings](https://help.salesforce.com/s/articleView?id=platform.automation_about_settings.htm&type=5&language=en_US) for more information.
- Limit request size to 10,000 items per day when using Schedule-Triggered or Record-Triggered Flow template types. If the model supports batch processing, the limit is 50,000 per day instead. Look for **Batch Supported: Yes** under **Limits** in the **Models** dropdown in Prompt Builder. If your requests exceed the daily limit, they are placed in a queued status until the limit resets.
- Limit request size to 1,000 items per hour when using WebSearch Retrievers.
- The resolved prompt size should not exceed 131,072 characters. Otherwise, the request may fail. We recommend keeping the resolved prompt well below this limit to avoid interruptions.
- Run and Debug actions in Flow Builder aren’t available for Batch Generation.

## Usage

This action is available only if the following are true. Otherwise, the action fails.

- Prompt Builder is enabled.
- The user who runs the flow has the Prompt Template User permission.
- The specified prompt template has an active version.

#### See Also

- [Prompt Builder](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_about.htm&type=5&language=en_US)