How to Update Review Data Using API: Google Sheets Example

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000102243-how-to-update-review-data-using-api-google-sheets-example

This article shows an example of how a Google Spreadsheet can be used to update review data on a site using the site's API.


Checklist Before Moving Forward With This Example


1) Make sure to generate a unique API Key using the documentation down below as a guideline. Please make sure to save the API Key in a safe place as it is not accessible after it has been created:


How To Generate an API Key


2) Prepare a Google Spreadsheet with at least two essential columns: one for the review's ID# (the review_id variable) to reference an existing review on the site, and another for the variable to be updated. For example, if the review currently has the title "    A pet store with delivery? Genius" and needs to be updated to "A pet store with delivery? Amazing!", specify these details in the spreadsheet.





Note: The column names do not necessarily match with the correct database variable names as this can be mapped later on. 


How To Connect Google Sheets Using Zapier


In this example, we will be using Zapier to integrate Google Sheets into the Brilliant Directories site. 


Log in to the Zapier account and click on Create Zap:




Name the new zap created and select the Google Sheets option as a Trigger:




Select the Event type as New Spreadsheet Row and click on Continue:




Connect the Google Sheet Account (this would be a Gmail account) and click on Continue:




Choose the preferred Spreadsheet, specify the Worksheet, and click on Continue:




Click on Test Trigger:




There will be a confirmation that a spreadsheet row has been found, click Continue:



Now the Trigger has been set up correctly, the Action can be created. Search and select the "Brilliant Directories" as the App option:




Choose the Event as Update Review event and connect Account:



Select "Connect a new account":




This will open a new window where the domain of the site (https:// or http:// included) and the API Key generated can be specified:




Next, we will be setting up the action. In this section, all the available review variables can be found. As we already created a spreadsheet with a row of review data, the next action would be mapping/matching the column names to the correct variable names.


Select the "Custom" option for the Review ID field and select the review_id value from the spreadsheet:






Then, map the Review Title by selecting the review_title column for the "review_title" field:




Now that all the preferred variables are matched and mapped correctly, click on Continue to test the action:




Confirm that the information displayed is correct and click on Test Step:




Make sure that the targeted field is updated:




Once confirmed, click on "Publish":



Note: Going forward, any new rows added to the connected Google Sheet via the API will automatically update the corresponding member data.