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
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, and Unlimited Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations |
| User Permissions Needed | |
|---|---|
| To create and manage prompt templates in Prompt Builder: | Prompt Template Manager permission set
OR Customize Application permission set |
Note The Search the Web agent action isn’t supported in Government Cloud.
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.
- From Setup, in the Quick Find box, search for Prompt Builder, and then select Prompt Builder.
- Open an existing prompt template, or click New Prompt Template to create one.
- In Template Details, click the Resources tab, and then select Salesforce Data Action.
-
From the list, select Search The Web. The action is inserted into
your prompt body.
-
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.
-
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.
-
(Optional) For Search Providers, select a provider to use for web search.
The values are Brightdata, OpenAI, and You.com.
- (Optional) In Allowed Domains, enter a comma-separated list of up to 10 domains to restrict results to those sources.
- Click Apply.
-
To show the web sources, click the Properties tab and turn on
Include Citations.
Citations appear in the Generated Response.
- Click Save & Preview.
- 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.
- Click Preview to see the generated response and citations.
Did this article solve your issue?
Let us know so we can improve!

