Skip to content

Google Custom Search Tool

Google Custom Search Tool runs searches with a Google programmable search engine, the one you create in your Google account to search the whole web or only the sites you choose. It returns the title, link and a snippet of each result.

You can use it as a tool, connecting its Tool output to the Tools input of an agent: the agent decides when to search and what to type. You can also use it as a step in the flow, writing the search in Input and collecting the results from the Data output.

When to use it

  • You want an assistant to search only your company’s websites or a list of trusted sources.
  • A support agent checks your public help centre before answering.
  • A flow looks for updates on your industry’s official websites.
  • You already have a Google programmable search engine and want to use it in NappAI.

Configuration

You need a Google Search credential with your Google key and the identifier of your programmable search engine (Programmable Search Engine ID). See Credentials.

FieldWhat it does
Credential (required)The Google Search credential used for searches.
InputThe text to search for. Only used with the Data output; when you connect the Tool output the field is hidden, because the agent writes the search.
Number of ResultsHow many results each search returns. Defaults to 10 (Google’s maximum per search).
Start IndexPosition of the first result, to skip the first ones: 11 starts at the eleventh. Defaults to 1.

Output

  • Tool: connects to an agent’s Tools input. The agent receives the results of every search it runs.
  • Data: a list with one item per result, with its title, link and snippet.

When you connect one of the two outputs, the other one is hidden.

Example

An insurance company wants its assistant to answer questions using only the information on its public website.

  1. In your Google account, create a programmable search engine limited to the insurer’s domain.
  2. Create the Google Search credential with the key and the search engine identifier.
  3. Add Google Custom Search Tool, pick the credential and connect its Tool output to the agent’s Tools input.
  4. A customer asks “What does the basic home insurance cover?”. The agent searches the insurer’s website and answers with what it finds.