·¬ÇÑÉçÇø

Brightspot Integrations Guide

Creating a GraphQL query for the Zapier integration


At times, you may want to send more information to Zapier (like the subheadine, body, and tag fields) than would otherwise be fetched from a standard request or webhook trigger (like the ID and other basic data). In this case, you can create a GraphQL query to supply Zapier with additional data. Once published, the query is available for use in a Zapier workflow (referred to as a zap) as a search event.

To create a GraphQL query for the Zapier integration:

  1. Click menu > Admin > Zapier.
  2. From the Create list, select GraphQL Query, then click New.
  3. Enter an internal name for this asset. Brightspot uses this name internally, such as in the search panel and recent activity widget. This name is not visible to visitors to your site.
  4. In the Description field, enter a description about what this query fetches.
  5. In the Zapier Label field, enter a value that will appear when creating actions in Zapier. Use something short, but descriptive of the what the query achieves (for example, Find Article by ID).
  6. Under Endpoint, select the GraphQL API endpoint you added that you associated to the API client. For details, see Adding API endpoints for the Zapier integration.
  7. Under Query, enter the desired query. Brightspot recommends using the GraphQL explorer to more easily build the query from the schema. (To use the GraphQL explorer, you must have the developer permission HTML Toggle). See the example below for a simple query that returns articles by ID.
    query MyQuery($articleId: UUID) {
      Get {
        Record(with: {_id: $articleId}) {
          State {
            ... on Article {
              __typename
              headline {
                raw
              }
              subheadline {
                raw
              }
              body {
                raw
              }
            }
            _globals {
              Content__ObjectModification {
                scheduleDate
              }
            }
          }
        }
      }
    }
    
  8. Click Publish.

Once published, this query appears in Zapier as a search event for use in a zap.

Note
Once published, you may view analytics pertaining to this asset in the Analytics tab. The tab includes when it was last used, its success count, the number of its total requests, and the number of errors it has generated.

Previous Topic
Creating a GraphQL polling trigger for the Zapier integration
Next Topic
Creating a GraphQL mutation for the Zapier integration
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

•
•
•
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

• Content types
• Modules
• Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

• Dashboards
• Publishing
• Workflows
• Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

• Field types
• Content modeling
• Rich-text elements
• Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

• Google Analytics
• Shopify
• Apple News