Zapier API Actions: Google Sheets Example
This article shows an example of how a Google Spreadsheet can be used to create new members 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:
2) Make sure to have a Google Spreadsheet ready. This spreadsheet should have at least one row of member information shown below:
When setting up the file we recommend using our CSV import template file as a basis for the API sheet. The file has all of the correct database variables:
However, the column names do not necessarily match with the correct database variable names as this can be mapped later on.
The API also allow geocoding and importing images.
Please note the following required fields in order to create a member:
- Email (email),
- Membership Plan ID# (subscription_id)
- Password (password - minimum 6 digits)
How To Connect Google Sheets Using Zapier
In this example, we will be using Zapier to integrate Google Sheets to 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 and 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 Create User event and click Continue:
If this is the first time creating a Brilliant Directories connection, click on the Sign In option:
If there is already a connection created to Brilliant Directories, click on Connect a new account option:
Clicking both options above will open a new window where the domain of the site (https:// or http:// included) and the API Key generated can be specified:
After clicking Yes, Continue on the window above, click on Continue:
Next, we will be setting up the action. In this section, all the available member variables can be found. As we already created a spreadsheet with a row of member information, the next action would be mapping/matching the column names to the correct variable names.
To be able to create a member, the minimum required fields are email, password (minimum 6 digits), and subcription_id (membership plan ID#)
NOTE: When using the Create User action, it is now possible to also automatically Geocode the member:
And also auto-import the member images:
Now that all the preferred and required variables are matched and mapped correctly, click on Continue to test the action:
Confirm that the information displayed is correct and click on Test & Continue:
This will create a new member on the website, confirm that the member is created under Search Members:
If any issues, an error message will display:
Once confirmed that the member is created on the site, click on Publish Zap:
If there is more than 1 member in the spreadsheet, click on Transfer existing data option:
Here, select all and click on Next (already created member can be excluded):
Click on Send data:
Now additional members on the spreadsheet are created on the website:
Selecting the Event
Each action below has an event that can be selected when create the new zap:
Make sure to select the correct event for each action.
Updating Member Data
For this example, we went ahead and added 2 more rows or the original data can be edited on the original spreadsheet that is connected to Brilliant Directories:
After waiting for a few minutes, the new members will be created on the site:
The API's main function is to add members to the database, it does not trigger a welcome emails because the member did not actually sign up on the site.
We have created a parameter that can be sent with the API request to trigger the email being sent, based on the settings of the membership plan. The idea is not to always trigger the signup email to be sent, only when the parameter is sent with the request.
The variable:
send_email_notifications
Is set to 1 so the system will now trigger the emails after a successful create user request:
New Lead Actions
Create Lead
To use this action, create a spreadsheet with the new lead information. The spreadsheet should have the same variables found within the Website - Lead Form - Get Matched form.
There are two additional variables that can be used to Auto-Match and Auto Geocode the lead. When using these variables:
- 1 - will enable the action
- 0 - disables the action
However these fields are already automatically enabled:
auto_match:
automatch with possible members
auto_geocode:
geocode the lead location
In order for the system to auto geocode, this advanced setting needs to be filled:
google_maps_server_side_api_key
Update Lead
With this action, within the spreadsheet add the lead ID and the variables for the information the needs to be updated.
Delete Lead
Use this action to delete a lead, add the lead ID that will be removed from the website.