Google Custom Search

📘

Don't have an Instabot account yet?

Start your free trial today!

301

Contents

  1. Overview
  2. Use-cases and example bot
  3. Requirements
  4. How to set up

1. Overview

Let your users search a site using the Google Custom Search webhook and display the results directly in the bot.

The official Google Custom Search API documentation can be found here: https://developers.google.com/custom-search/json-api/v1/using_rest


2. Use-cases and example bot

Use-cases:

The Google Custom Search webhook can be useful for:

  • users who are looking for specific content on your site
  • displaying your site-search results directly in Instabot as a choice for your users to select

Example bot:


3. Requirements

To use this webhook, you will need the following:


4. How to set up

📘

The following section provides specific instructions on how to use the Google Custom Search webhook.

For more details on webhooks syntax and how to use them seamlessly in your conversation, see the detailed webhooks reference guide

  1. Open the Google Custom Search webhook, replace the key parameter with your API key, and the cx parameter with your search engine ID and click Save
640
  1. Open your bot, add a multiple-choice node.
    Then, by typing the [= syntax in the first option, a list of webhooks will appear - select the webhook output parameter that you want to display to the user.
957

📘

The Google Custom Search webhook included in your account includes 4 preconfigured output parameters:

  • items.link - The full URL to which the search result is pointing
  • items.title - The title of the search result, in plain text.
  • items.items.pagemap.metatags.og:description - A description of the page

In addition to the preconfigured output parameters, you can also add as many Google Custom Search output parameters to the webhook to use/display in your conversation as you like - see the Google Custom Search API documentation for details

  1. Replace Value with the name of the node where your user is telling Instabot what they want to search for - use the @ syntax.
960

That's it!