Planning Center is a popular church management software. We can use the Planning Center API to import data from Planning Center into Google Sheets. In this tutorial, I’ll show you how to connect the Planning Center API to Google Sheets in 6 steps:
Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new
After logging into your Planning Center account, access your developer settings at https://api.planningcenteronline.com/oauth/applications and start creating a new app by clicking the Register one now button:
Complete all the required fields:
The values we’ve entered are just examples. You can enter your own website and any App Name that you want. Click the Submit button to finish creating the app:
Your app has been created. Copy the values for Client ID and the Secret and paste them in a safe place, because you’ll need them in the next steps:
Next, give your developer application access to your account, by entering this URL in your browser:
https://api.planningcenteronline.com/oauth/authorize?client_id=your_client_id&redirect_uri=your_redirect_URI&response_type=code&scope=people
In that URL, replace the various identifiers with the following values:
In this example, we chose the people scope, but depending of the product you use, the value for the scope parameter may differ. Possible values are displayed in the following table:
Once you’ve customized your URL and visited the URL in your browser, a window will pop up. Click the Allow button to grant access:
The browser will then navigate to the redirect URL that you provided earlier. One query parameter (code) will be added in your browser’s address bar, as a parameter of this redirect URL. The code parameter is a single use login code, which we will now use to acquire a refreshable access token:
Open up a command prompt window for Windows OS or a terminal for Mac OS and compose the following curl command:
curl -X POST https://api.planningcenteronline.com/oauth/token -F grant_type=authorization_code -F code=your_code -F client_id=your_client_id -F client_secret=your_client_secret -F redirect_uri=your_redirect_uri
You’ll need to fill in a few parts:
Note: For Mac OS you may need to use single quotes ( ' ) instead of double quotes ( " ).
The response access_token may be used in order to access the ads API for up to two hours. The refresh_token may be used to get a new access token when that time period is up. Refreshing the access token can be done with the following command:
curl -X POST "https://api.planningcenteronline.com/oauth/token" -H "Content-Type: application/json" -d "{\"client_id\": \"CLIENT_ID \", \"client_secret\": \"CLIENT_SECRET\", \"refresh_token\": \"refresh_token\", \"grant_type\": \"refresh_token\"}"
CLIENT_ID and CLIENT_SECRET are the same as described before. REFRESH_TOKEN should be replaced with the value of the refresh_token field from the previous command’s response.
Note: If the token/key that you generate has an expiration time, you will need to complete this same process again to get a new token when the old one expires.
In this section, I’ll show you how to browse the Planning Center API documentation to find an API URL and endpoint that retrieves the specific information you need from your Planning Center account. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 5.
First, open the Planning Center API documentation page: https://api.planningcenteronline.com/explorer
The colorful menu on the left contains a list of API categories, each with its own endpoints:
An example endpoint category is Services. This category contains many endpoints: attachment_types, email_templates, folders, media, people, report_templates, series, service_types, songs, tag_groups and teams
In this example, we will try the Folders endpoint:
https://api.planningcenteronline.com/services/v2/folders
The documentation for this endpoint contains the current URL, the URL parameters and the server response:
In the next section we will try calling this endpoint.
All API calls to the Planning Center API should be made using this base domain:
https://api.planningcenteronline.com/services/v2/
All endpoints should be appended to this URL.
Note: Check their documentation to confirm the latest version and update the version number in the URL if necessary.
Okay, we’re in the home stretch. Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the “Import” tab. With the Import Tab open, enter these details into the add-on:
Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) as required by your Planning Center API endpoint. For this example, we are using the GET method.
API URL: In Step 4, I explained how you can find the Planning Center API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.
For this example, we are using the Email endpoint that returns a list of emails. The corresponding URL for this endpoint is:
https://api.planningcenteronline.com/people/v2/emails
In the Headers of the Apipheny add-on section, add two rows, with the following keys and values:
Header 1 Key: Accept Value: application/json Header 2 Key: Authorization Value: Bearer your_token
Enter these header keys and values into Apipheny. In the second header, your_token is the value of the token you obtained previously, in Step 3. There should be a literal space between Bearer and your_token.
This is what our request looked like when entered into Apipheny:
The last step is to click the Run button at the bottom of the Apipheny add-on and then your Planning Center data will be imported into your Google Sheet, like so:
After making a successful request to the Planning Center API, try querying a different Planning Center API endpoint, or try using one of the more advanced features in the Apipheny add-on.
Crypto API tutorials and more:
Sponsored by Zink Virtual Tip Jar & Rewording.io Paraphrasing Tool
Accept donations on Twitch | Accept donations on Discord | Accept donations on YouTube | Accept donations on Telegram | Accept donations on Twitter | Accept donations on TikTok | Accept donations on Instagram | Accept donations on LinkedIn | Accept donations on Facebook | Accept donations on your Website