TASK_SEARCH

Knowledgebase

TASK_SEARCH Function Knowledge Base

Function Overview

TASK_SEARCH is a powerful search function in Sheet Workflows that allows you to perform web searches directly from your Google Sheets. This function leverages the Tavily API to provide comprehensive, reliable search results that can be automatically inserted into your spreadsheet. TASK_SEARCH is ideal for gathering data, researching topics, or collecting information without leaving your spreadsheet environment.

Uses

  1. Collecting product information for market research.

  2. Gathering news and current events about specific topics.

  3. Researching companies or organizations.

  4. Finding statistics and data for reports.

  5. Checking facts for content creation.

  6. Discovering relevant resources on a topic.

  7. Monitoring mentions of your brand or products online.

  8. Collecting industry-specific information from trusted sources.

Syntax and Parameters

TASK_SEARCH(query, [max_results], [include_headings], [advanced_search_depth], [include_images], [include_domains], [exclude_domains])

Parameter Data Type Required Description
query

string

Required The search term or question you want to find information about.
max_results

number

Optional Maximum number of search results to return. Default is

5

.
include_headings

boolean

Optional Whether to include column headings in the output. Default is

TRUE

.
advanced_search_depth

boolean

Optional Whether to use advanced search depth for more comprehensive results. Default is

FALSE

.
include_images

boolean

Optional Whether to include images in the results. Default is

FALSE

.
include_domains

string

Optional Comma-separated list of websites to include in the search results.
exclude_domains

string

Optional Comma-separated list of websites to exclude from the search results.

Advanced Options

Controlling Search Depth

When you set

advanced_search_depth

to TRUE, the search will be more thorough but may take longer to complete:

=TASK_SEARCH("electric vehicle market trends", 10, TRUE, TRUE)

This performs a deeper search about electric vehicle market trends, returning up to 10 results with column headings.

Including Images

When

include_images

is set to TRUE, the search results will include relevant images where available:

=TASK_SEARCH("landmarks in Paris", 5, TRUE, FALSE, TRUE)

This will return information about Paris landmarks along with related images.

Filtering by Domains

You can focus your search on specific websites using the

include_domains

parameter:

=TASK_SEARCH("artificial intelligence news", 10, TRUE, FALSE, FALSE, "techcrunch.com,wired.com,theverge.com")

This searches for AI news specifically from TechCrunch, Wired, and The Verge.

Alternatively, you can exclude certain domains from your search:

=TASK_SEARCH("climate change data", 8, TRUE, FALSE, FALSE, "", "pinterest.com,instagram.com")

This searches for climate change data but excludes results from Pinterest and Instagram.

Examples

=TASK_SEARCH("healthy breakfast recipes")

This returns 5 search results about healthy breakfast recipes with column headings.

Research with More Results

=TASK_SEARCH("renewable energy statistics 2023", 10)

This returns 10 search results about renewable energy statistics from 2023.

Focused Company Research

=TASK_SEARCH("Tesla financial performance", 7, TRUE, TRUE, FALSE, "bloomberg.com,reuters.com,wsj.com")

This performs an advanced search for Tesla's financial performance from trusted financial news sources.

Product Comparison Research

=TASK_SEARCH("iPhone vs Samsung Galaxy comparison", 8, TRUE, FALSE, TRUE)

This searches for comparisons between iPhone and Samsung Galaxy phones, including images in the results.

Best Practices

  • Be Specific: The more specific your query, the more relevant your results will be.

  • Use Domain Filtering: When researching a particular topic, use

    include_domains

    to focus on trusted sources for that subject.

  • Limit Results Appropriately: Only request as many results as you need to avoid cluttering your spreadsheet.

  • Use Advanced Search Depth Sparingly: While more thorough, advanced searches take longer to complete and should be used only when necessary.

  • Format After Searching: The function will insert plain text, so apply any formatting or data processing after the search results are returned.

  • Plan Your Spreadsheet Layout: Ensure you have enough empty cells to the right of your function for the results to populate.

  • Consider Column Headers: If you're using multiple TASK_SEARCH functions, you may want to set

    include_headings

    to FALSE for all but the first one.

Troubleshooting

No Results Returned

  • Check your Tavily API key in the addon configuration

  • Verify your internet connection

  • Try a more general search query

  • Remove domain restrictions that might be limiting results

Error: "Tavily API key is not set in the configuration"

  1. Open the Sheet Workflows sidebar

  2. Go to the Configuration section

  3. Look for the Tavily service

  4. Input your API key and save

  5. If you don't have an API key, create a free account at app.tavily.com

Results Are Not Relevant

  • Make your query more specific

  • Use domain filtering to target reliable sources

  • Increase the search depth by setting

    advanced_search_depth

    to TRUE

Function Takes Too Long to Run

  • Reduce the number of

    max_results

  • Set

    advanced_search_depth

    to FALSE

  • Simplify your query

  • Remove image inclusion if not necessary

Images Not Appearing

  • Verify

    include_images

    is set to TRUE

  • Check if your query topic typically has associated images

  • Some images may not display properly due to source website restrictions

FAQ

Q: Do I need a Tavily account to use TASK_SEARCH?

A: Yes, you need to create a free account on app.tavily.com and get an API key.

Q: How many search results can I request at once?

A: While the function allows you to specify any number, for optimal performance and readability, we recommend limiting to 20 or fewer results.

Q: Can I search for images only?

A: The function primarily searches for text content. While you can include images in the results, it's not designed as an image-only search tool.

Q: Will the search results update automatically?

A: No, the results are static. If you want updated information, you'll need to run the function again.

Q: How current are the search results?

A: The results reflect what's available on the web at the time of the search through the Tavily API's index.

Q: Can I use TASK_SEARCH in combination with other functions?

A: Yes, you can process the search results with other Google Sheets functions to extract, analyze, or format the data further.

Q: Are there any usage limits?

A: Usage limits depend on your Tavily API plan. The free tier typically offers a limited number of searches per month.

Q: Does TASK_SEARCH work with languages other than English?

A: Yes, you can enter queries in other languages, though the best results are typically returned for English-language searches.

elisha

1 month ago

Categories
Features