Clay Icon

Troubleshooting Undefined Responses in Perform Search for Data Enrichment

·
·

I am using the Perform Search to enrich some data. It is fairly basic trying to get accurate websites for some cities, but I am getting a fair amount of "undefined" responses. The logic I am using is fairly simple. What would cause the outcome to be undefined?

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    There could be several reasons for "undefined" responses when using the Perform Search feature: 1. Insufficient or incorrect input data: Ensure you're providing a clear Google search query. 2. Language or country settings: Check if you've specified the correct language and country for your search. 3. API limitations: The Google Custom Search JSON API might have restrictions or rate limits affecting your results. 4. Query formatting: Make sure your search query is properly formatted, especially if using dynamic columns. To troubleshoot further, could you share the exact JSON you're using for the search? This would help identify any potential formatting issues.

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·
    {
      "answerBox": {
        "title": "Marion CountyIndianapolis / County",
        "answer": "Marion County"
      },
      "search_results": [
        {
          "title": "Marion CountyIndianapolis / County",
          "answer": "Marion County"
        }
      ],
      "related_searches": [
        {
          "query": "Indianapolis city balance indiana official website phone number"
        },
        {
          "query": "Indianapolis city balance indiana official website login"
        },
        {
          "query": "Indianapolis city balance indiana official website employment"
        },
        {
          "query": "Indianapolis city balance indiana official website 2022"
        },
        {
          "query": "Indianapolis city balance indiana official website 2020"
        },
        {
          "query": "Marion County, Indiana property search"
        },
        {
          "query": "indiana.gov mycase"
        },
        {
          "query": "indiana.gov login"
        }
      ],
      "link_to_google_search": "https://www.google.com/search?q=Indianapolis%20city%20(balance)%20Indiana%20official%20website&hl=en&gl=us",
      "results_returned_count": 1
    }
  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    Based on the JSON you provided, it appears that you're not getting "undefined" responses. The JSON shows a successful search result for Marion County. However, if you're experiencing "undefined" responses in other cases, it could be due to: 1. Insufficient or incorrect input data in your search query 2. API limitations or rate limits 3. Formatting issues in your search parameters To troubleshoot further, could you share an example of a search query that's resulting in "undefined" responses? This would help identify any potential issues with your input or formatting.

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    But it is in the actual table

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    There could be several reasons for "undefined" responses in your table when using the Perform Search feature: 1. Insufficient or incorrect input data in your search query 2. API limitations or rate limits 3. Formatting issues in your search parameters To troubleshoot, try these steps: 1. Double-click the row with "undefined" results. If it shows "waiting for its inputs," click "re-run this cell." 2. Toggle the auto-update off and on again, then accept the run prompt to update all rows. 3. Check your Body section for formatting errors, ensuring keys are in double quotes and separated by commas. To help further, could you please copy and paste the JSON you're using for the search into the chat?

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    This occurred on 1,178 records of 32,037

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    Also happened in this table for 39/3,102 records

  • Avatar of Summiya B.
    Summiya B.
    ·
    ·
  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    Why did the search work for over 95% off cases and not those?

  • Avatar of Summiya B.
    Summiya B.
    ·
    ·

    check space is missing only in first 2 inputs rest of them have spaces

  • Avatar of Summiya B.
    Summiya B.
    ·
    ·

    if you remove spaces between all of them it willl show error for all of of them

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    I’m confused. Nothing changed on my end running on the whole file

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    So, it doesn’t make sense that some would fail and some wouldn’t

  • Avatar of Summiya B.
    Summiya B.
    ·
    ·

    look at third errow u can see space between indianapolis city

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    I am very confused. I didn't write this JSON. This is what the system returned using the premade package. So, are where is the error on my end to prevent this and correct this?

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    It feels like something failed on the Clay side. Because this is the result of one that was successful from the same file. The anwerbox at the top doesn't even exist

    {
      "search_results": [
        {
          "link": "http://arizonacity.org/",
          "title": "Arizona City - Complete Community Info Site",
          "snippet": "ARIZONA CITY, AZ 85123 is all about Arizona City and it's various communities. Organizations, businesses and practices in the Arizona City Community.",
          "position": 1,
          "sitelinks": [
            {
              "link": "http://arizonacity.org/arizona-city-veterans",
              "title": "Veterans of Arizona City"
            },
            {
              "link": "http://arizonacity.org/arizona-legislator",
              "title": "Arizona Legislator"
            },
            {
              "link": "http://arizonacity.org/about",
              "title": "About"
            },
            {
              "link": "http://arizonacity.org/advertising",
              "title": "Advertising"
            }
          ]
        }
      ],
      "related_searches": [
        {
          "query": "Arizona city arizona official website phone number"
        },
        {
          "query": "Arizona city arizona official website login"
        },
        {
          "query": "Arizona cities"
        },
        {
          "query": "How far is Arizona City from Phoenix"
        },
        {
          "query": "Arizona city or county"
        },
        {
          "query": "Arizona City az map"
        },
        {
          "query": "Arizona city to phoenix"
        },
        {
          "query": "Living in Arizona City, AZ"
        }
      ],
      "link_to_google_search": "https://www.google.com/search?q=Arizona%20City%20Arizona%20official%20website&hl=en&gl=us",
      "results_returned_count": 1
    }
  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    On the bad undefined one, if you click through to the actual search link: https://www.google.com/search?q=Indianapolis%20city%20(balance)%20Indiana%20official%20website&hl=en&gl=us It correctly identifies what it should have.

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    So, not sure where Marion County even came in as that wasn't an input

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    So what can I do to fix these ones?

  • Avatar of Daniela D.
    Daniela D.
    ·
    ·

    Hey Jordan! Thanks for reaching out. Happy to help. The "undefined" response indicates that the search action could not map the result to search_results[0].link. To resolve this, I added a slightly updated version of the search query to a duplicate column. You should be able to re-run cells that have "undefined" status, with that query and get results. I applied a filter to show all rows with this issue. An additional suggestion for your workflow is using AI for this search. This is because it's able to search intelligently to identify the web page that meets your criteria vs a search query that only relies on the top matching result. Let me know if you'd like to test that.

  • Avatar of Daniela D.
    Daniela D.
    ·
    ·

    I added an example prompt to your table here to test with: https://app.clay.com/workspaces/336509/workbooks/wb_5f8WozzX8ah5/tables/t_jdpg8SjGxNGJ/views/gv_aWpoNkNoBiJx You'll be able to run the same search at 1 credit per row and see cleaner results. I also added credits for cells that returned "undefined". Let me know if you have any questions!

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    Many thanks. As a new one here. Is there a way to run for just those that were undefined?

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    Actually, your new column came back as undefined as well on the second line

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·
  • Avatar of Daniela D.
    Daniela D.
    ·
    ·

    Hey Jordan! Thanks for the reply. Checking this with the team and will get back with an update. In the meantime, to unblock you, I recommend using the AI column to run the search. We'll add credits to help with re-running all rows. Apologies for the inconvenience🙏🏾.

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    Yes, the AI one is much more expensive from a credits perspective. This is also across two workbooks. https://app.clay.com/workspaces/336509/workbooks/wb_K2jcy6KSjxq6/tables/t_Vh4NTNhVKTPa/views/gv_8xcr4kWKq8x2 This occurred on 1,178 records of 32,037 AND the one you corrected: https://app.clay.com/workspaces/336509/workbooks/wb_5f8WozzX8ah5/tables/t_jdpg8SjGxNGJ/views/gv_aWpoNkNoBiJx Also happened in this table for 39/3,102 records Would it be possible for you to recreate (or guide me on how to) the AI one in the second workbook? And also run it for only the rows that came back undefined from the first run using the Google search. My concerns is that the AI one uses 3 credits where the google search uses only 1 credit. So, I don't want to burn through over 100,000 additional credits to rerun the full files using the AI.

  • Avatar of Daniela D.
    Daniela D.
    ·
    ·

    Hey Jordan! Happy to help. The AI configuration I added to your table is using a model that costs 1 credit, not 3. I made a quick video explaining further here: https://www.loom.com/share/c71aebdedd204ae0b17f07f35d6bfe8b Let me know if that helps!

  • Avatar of Jordan R.
    Jordan R.
    ·
    ·

    💕 Thanks a ton

  • Avatar of Daniela D.
    Daniela D.
    ·
    ·

    Happy to help!

  • Avatar of Daniela D.
    Daniela D.
    ·
    ·

    Hey Jordan! Following up with an update about the Google search result: The result returned is related to the way the cell previews when a search result does not contain a link. Our engineering team confirmed that we’re adding this issue to our backlog. For greater context, our product team prioritizes bugs based on the severity of the issue and how widespread of an experience it is with customers. To set expectations, items like this may not be addressed for some time. The timeline is based on the team's current existing set of work and upcoming feature releases, all subject to change. So what happens now? Now that your issue has been logged, I will tentatively mark this as closed. Please note that I will reach out to you as soon as I receive any new information about this bug. If you don’t hear from me, then the engineering team is still working on it. As soon as there's an update, this conversation will automatically re-open on my end and I will follow up with you. In the meantime, the suggestion above to use AI is a better option for your workflow. Let me know if you have any questions!

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    This thread was picked up by our in-app web widget and will no longer sync to Slack. If you are the original poster, you can continue this conversation by logging into https://app.clay.com and clicking "Support" in the sidebar. If you're not the original poster and require help from support, please post in 02 Support.