---
schema_version: "1"
id: b4dfa511ed80438c0232ef6ea60503ebe2a72d67b9a599896e95602540b7bb62
title: Add the Search the Web Action to a Prompt Template
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/copilot_add_search_the_web_to_prompt_template.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.copilot_add_search_the_web_to_prompt_template.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1559b90e21b8d290d07f521610e0674eee8ec9a992daa1a032e9cbf48c9592fa
description: Add the Search the Web data action to a prompt template so your prompt can include current information from the web, such as current events, industry trends, and product information.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Add the Search the Web Action to a Prompt Template

Add the Search the Web data action to a prompt template so your prompt can include current information from the web, such as current events, industry trends, and product information.

### 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="d189299e73">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d189299e73 ">To create and manage prompt templates in Prompt Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d189299e73 ">
              <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>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)

Note The Search the Web agent action isn’t supported in Government Cloud.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)

Note When you run Search the Web in a prompt template, it uses your prompt template's token-based billing, not the separate billing used when it runs in an agent.

The search provider determines which service processes web search queries. If you don’t select a provider, the action uses BrightData as the default search provider.

1. From Setup, in the Quick Find box, enter Prompt Builder, and then select **Prompt Builder**.
2. Open an existing prompt template, or click **New Prompt Template** to [create one](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.").
3. In Template Details, click the **Resources** tab, and then select **Salesforce Data Action**.
4. From the list, select **Search The Web**. The action is inserted into your prompt body.
    
    ![Resources tab in Template Details with Salesforce Data Action expanded and Search The Web selected](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agent_search_the_web_prompt_template_resources.png)
5. In the prompt body, click the inserted **Salesforce Data Action: Search The Web** to open its properties.
    
    The properties show inputs: Search Query, Search Provider, and Allowed Domains.
    
    ![Edit Search The Web panel showing the three inputs: Search Query, Search Provider, and Allowed Domains](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agent_search_the_web_prompt_template_inputs.png)
6. In the **Search Query** field, enter what you want to search the web for.
    
    For example, enter current market trends in the electric vehicle industry. To run the same search every time, enter the text you want to search for. To run a search that's based on the record the template runs on, add inputs such as company information or product details. To refine your results, [add more inputs](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_new_input.htm&type=5&language=en_US).
7. (Optional) For **Search Providers**, [select a provider](https://help.salesforce.com/s/articleView?id=ai.copilot_set_search_provider_for_web_search_action.htm&language=en_US&type=5) to use for web search.
    
    The values are Brightdata, OpenAI, and You.com.
8. (Optional) In **Allowed Domains**, [enter a comma-separated list of up to 10 domains](https://help.salesforce.com/s/articleView?id=ai.copilot_customize_allowed_domains.htm&language=en_US&type=5) to restrict results to those sources.
9. Click **Apply**.
10. To show the web sources, click the **Properties** tab and turn on **Include Citations**.
    
    Citations appear in the Generated Response.
11. Click **Save & Preview**.
12. In Preview Settings, enter sample values for the prompt template inputs. For example, enter a company name for the Company Information input. Make sure **Generate Response** is turned on, and optionally select a **Response Language**.
13. Click **Preview** to see the generated response and citations.

#### See Also

- [Agent Action: Search the Web](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_ref_search_the_web.htm&release=264.0.0&type=5 "Retrieves real-time or external information that isn’t available in Salesforce CRM. Use it for questions about news, market trends, competitor details, and product comparisons, or when Salesforce answers need added context from the web.")