Skip to content

unimprobable/gatsby-source-hubspot-forms

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-source-hubspot-forms

This source plugin for Gatsby will provide you with the associated fields for each applicable form created in Hubspot.

Installation

# Install the plugin
npm i gatsby-source-hubspot-forms

Configuration

In gatsby-config.js:

module.exports = {
  plugins: [
    {
      resolve: "gatsby-source-hubspot-forms",
      options: {
        apiKey: "YOUR_HUBSPOT_API_KEY",
      },
    },
  ],
}

Querying Hubspot Forms

Once the plugin is configured, two new queries are available in GraphQL: allHubspotForm and HubspotForm.

Here’s an example query to load 10 forms:

query HubSpotFormQuery {
  allHubspotForms(limit: 10) {
    edges {
      node {
        portalId
        name
        submitText
        redirect
        formFieldGroups {
          fields {
            label
            name
            required
            fieldType
          }
        }
      }
    }
  }
}

See the Hubspot forms API docs or the GraphiQL UI for info on all returned fields.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%