---
schema_version: "1"
id: cc11c801876c7f734810e7dd9545c4f7df1ccae39ed741c9e454c2fda6c82bc4
title: Add a Related List with File Inputs to a Flex Prompt Template
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_add_related_lists_file_flex.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_related_lists_file_flex.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9a3469c46e335d6b205d012df7d6034bb4f8710200e7ca850bac841bce621882
description: Create a flex prompt template that includes a related list with file inputs.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Add a Related List with File Inputs to a Flex Prompt Template

Create a flex prompt template that includes a related list with file 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;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d73903e68">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d73903e68 ">To create and manage prompt templates in Prompt Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d73903e68 ">
              <p>Prompt Template Manager permission set</p>
              <ul>
                <li>Manage Prompt Templates</li>

                <li>Execute Prompt Templates</li>

              </ul>
              <p>OR</p>
              <p style="margin-bottom:0;">Customize Application permission set</p>
            </td>

          </tr>
        </tbody>
      </table>

Say you’re a Business Analyst that evaluates potential service providers for your clients. Your team spends a lot of time reviewing multiple files and images for each provider to determine if they meet the client’s needs. By using an LLM that can process file input, you can automate the analysis and summary of these details. This will help you quickly decide if a company is right for the client's specific problems.

To get started, create a prompt template.

1. In the Prompt Template Type dropdown, select **Flex**.
2. For the Prompt Template Name, enter Analyze Account.
3. In the description field, enter Summarize a company description and check its relevance using files.
4. Define a resource.
    1. Name: Account
    2. API Name: Account
    3. Source Type: **Object**
    4. Object: **Account**
5. Click **Next**, and you’re redirected to the Prompt Template Workspace.
6. Copy and paste the example prompt template
    1. To use the example prompt, copy the Image Verification for Account Relevance prompt in the [Flex Example Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_flex_example_templates.htm&release=264.0.0&type=5 "These example prompt templates cover a few use cases for flex."). Then, paste it into the Prompt Template Workspace.
    2. Before you can run this template in Prompt Builder, in the Prompt section, click **Insert Resource**. The search field appears the first time you click this option.
    3. Use the Resource field to replace the description placeholder with a real merge field. Add the related list to the prompt template, from the Resource picker, click **Account**, and click then **Notes & Attachments**.
        
        Prompt Builder grounds files in this related list that are Salesforce Files. Classic Attachment records aren’t included in the resolved prompt. See [Grounding with Related List Merge Fields](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_ground_related_list.htm&release=264.0.0&type=5 "Ground your prompt templates with your object’s related lists to add depth and context to your grounding.").
7. In Template Properties, under Models, select **GPT 4 Omni**.
8. Click **Save**.
9. Select an account to test the prompt template.
10. Click **Preview** to test the prompt template. In the Resolution, the attached images can also be previewed.

Prompt Builder grounds related-list files that are Salesforce Files. Classic Attachment records aren’t supported. If a file from **Notes & Attachments** doesn’t appear in the resolved prompt, then convert it to a Salesforce File or upload it from the **Files** related list, and preview again. File size and system limits aren’t the cause. See [Grounding with Related List Merge Fields](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_ground_related_list.htm&release=264.0.0&type=5 "Ground your prompt templates with your object’s related lists to add depth and context to your grounding.").

#### See Also

- [Create a Flex Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_create_flex_prompt_template.htm&release=264.0.0&type=5 "For any use case that isn’t covered by the other template types, a flex prompt template type is your solution. Craft a flex prompt template that uses AI to generate content for your unique business cases.")
- [Grounding with File Inputs](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_ground_file.htm&release=264.0.0&type=5 "Ground generative AI prompt templates with files so the AI model can use documents, spreadsheets, presentations, images, and email text in the resolved prompt.")