Max Addons' Dynamic Table element makes it super simple to import data from Google Sheets and display it on your Bricks Builder website in a neat, organized tabular format.
Let's see how you can integrate Google Sheets with your WordPress website using Bricks Builder and Max Addons.
Create Google Sheets API Key#
1. Get the Google Sheet API Key#
First, you'll need to create an API key so that Max Addons can access your Google Sheets data.
Here's how:
- Go to the Google Cloud Platform.
- At the top, click on the "New Project."
- Give your project a name and click "Create."
2. Enable APIs and Services#
Next, you need to enable the necessary APIs for your project:
- After creating your project, you'll be on the main dashboard.
- Click "+ENABLE APIS AND SERVICES"
3. Enable the Google Sheets API#
This will open the Google API library. Now it's time to enable the Google Sheets API:
- In the API library, search for Google Sheets API.
- When it appears, click the "Enable" button.
4. Create Credentials#
- Click the "CREATE CREDENTIALS" button.
5. Choose Credential Type#
- Choose your credential type (in this case, select Google Sheets API).
- In the "What API are you accessing?" field, select User Data.
- Once done, click "Next".
6. Configure the OAuth Consent Screen#
Next, fill in the OAuth consent screen details:
- In the "OAuth Client ID" field, select Web Application and give your application a name.
- Click "Create" to generate your OAuth credentials.
- You can download or copy these credentials for later use.
7. Get Your Google Sheets API Key#
Now, let's get your API key:
- Click on the "+ CREATE CREDENTIALS" button and then select the API key option.
- As soon as you hit the button, a new window popup will appear with your new API key.
- Copy this key!
Add the Google Sheets API Key to Max Addons Settings#
Now that you've got your API key, it's time to add it to Max Addons:
- Go to your WordPress Admin dashboard.
- Navigate to Bricks >> Max Addons >> Integration.
- Paste your API key into the Google Sheets API Key field and hit Save Changes.
Import Data From Google Sheets in Max Addons Dynamic Table#
Now that everything is set up, here's how to pull your Google Sheets data into a Dynamic Table:
- Add the Dynamic Table element to your page, and select Google Sheets from the Source dropdown.
To fetch Google Sheets data, you need the URL of your Google Sheet.
How to get your Google Sheets URL:#
1) Open your Google Sheet and click the Share button.
2) Set the General Access to Anyone with the link.
3) Click on the Copy link button to get your Google Sheets URL.
4) Click on the Done button to close the popup window.
- Get back to your page, and add the copied URL in the Google Sheets URL field.
- As soon you add the URL, a table with all your Google Sheets' Data is displayed on the page.
Next, you get an option to specify the Table cell range—this is the range of cells from your Google Sheet that you want to display:
How to get your Table Range:#
1) Go to your Google Sheet and select the range of cells that you want to display.
2) Click on Data >> Named ranges.
3) Copy the cell range that appears and paste it into the Table cell range field. As soon as you add the table cell range, the respective data appear on your table.
- Lastly, you can also select the "Refresh data after" option to pull new data from your Google Sheet more often.
This is how you can import data from Google Sheets in Max Addons Dynamic Table.