You can pull ChMeetings People data to a Google Sheet via the ChMeetings API. Here is how to establish such a connection:
-
Pre Required Steps:
-
Open ChMeetings, go to Settings > Integrations > API Integration, and get your API Key. You will need it to authorize the connection. See our Developer API guide for details.
-
Open ChMeetings, go to Settings > Integrations > API Integration, and get your API Key. You will need it to authorize the connection. See our Developer API guide for details.
-
Connect to Google Sheets:
- Open Google Sheets, then go to Extensions > Apps Script.
- Create a New Script:
- You may need to create a new File by clicking the + sign next to the File option. Name your file and project once created.
- Remove any preexisting code and paste the following; keeping in mind that you must replace YOUR_API_KEY with your actual API key.:function getPeopleData()
function getPeopleData() {
var apiUrl = "https://api.chmeetings.com/api/v1/people";
var options = {
"method" : "GET",
"headers" : {
"apiKey" : "YOUR_API_KEY"
}
};
var response = UrlFetchApp.fetch(apiUrl, options);
var jsonData = JSON.parse(response.getContentText());
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.clear(); // Clear existing data
// Extract data
var people = jsonData.data; // Adjust based on API response structure
var headers = Object.keys(people[0]); // Extract keys for headers
sheet.appendRow(headers);
people.forEach(person => {
var row = headers.map(header => person[header]);
sheet.appendRow(row);
});
}
- Run the Script: Click the Run button in the Apps Script editor.
-
When prompted, Authorize the connection: You will be asked to connect to your Google Account and grant the script the following permissions:
- See, edit, create, and delete all your Google Sheets spreadsheets.
-
Connect to an external service.Notes:1. These permissions are required in order for our API to run on your Google Sheets. 2. You may see a warning regarding the API not being verified by Google and being unsafe. Until Google verifies our API, you may proceed by clicking on Advanced, then on Go to [Your Project Name] (unsafe). If you have any questions or concerns, please visit our Security page or Contact
us.
- When your authorization is completed, the API will be executed. This may take a while depending on the size of your people database.
-
Check the Result: Your Google Sheet will now display your ChMeetings People data.
-
Set Up Triggers to determine where data sync occurs and how often:
- Go to Triggers (Clock Icon) in Apps Script > Add Trigger.
- Select From spreadsheet as the Event Source.
- Set the Event Type as On Open.