Google Custom Search Tool
The Google Custom Search Tool lets you pull up-to-date web results directly into your Nappai workflow.
Simply enter a search query, choose how many results you want, and the component will return a list of snippets that you can use in later steps.
How it Works
The component talks to Google’s Custom Search API.
- Credential – You must first create a Google Search API credential in Nappai’s credential section.
- The credential stores your Google Custom Search API key and Programmable Search Engine ID.
- In the component, just pick that credential from the “Credential” dropdown.
- Query – When you run the component, it sends the text you entered in the Input field to Google.
- Results – Google returns a list of matching pages.
- Output – The component turns each result into a Data object (containing the full result and a short snippet).
It also builds a Tool that can be used by other parts of the system to perform the same search.
Inputs
- Credential: Select the Google Search API credential you created in Nappai.
- Input: The search query you want to run (e.g., “Nappai automation”).
- Number of Results: How many search results to return (default 10).
- Start Index: The position in the result list to start from (default 1).
Outputs
- Data (method:
run_model
): A list of Data objects, each containing a search result and its snippet. - Tool (method:
build_tool
): A reusable Tool that can be called by other components to perform the same search.
Usage Example
- Create a credential
- Go to Credentials → Add Credential → choose Google Search API.
- Enter your Google Custom Search Api Key and Programmable Search Engine ID.
- Add the component to your workflow.
- Configure the fields:
- Credential – pick the credential you just created.
- Input – type
Nappai automation
. - Number of Results – set to
5
. - Start Index – leave at
1
.
- Run the workflow.
- The component will return 5 Data objects with snippets about Nappai automation.
- You can feed these into a text summarizer, a database, or any other downstream component.
Related Components
- Google Search Snippets – A simpler tool that returns only the snippet text.
- Web Scraper – Pulls data from a specific webpage instead of a search query.
- API Connector – Lets you call any REST API; useful if you want to use a different search engine.
Tips and Best Practices
- Keep your API key and engine ID confidential; never share the credential file.
- Limit the number of results to avoid hitting API quotas.
- Use Start Index to paginate through large result sets.
- Test with short queries first to confirm the component is working before scaling up.
Security Considerations
- The credential is stored securely in Nappai’s credential vault.
- Only users with permission to view credentials can see the API key and engine ID.
- Do not expose the credential in public workflows or share the workflow file without removing the credential reference.