Get help

Help center

Guides and answers

Contact support

Write to our team

Sign in to

Workflows

Build processes with your team

Automations

Connect files and automate tasks

One system, four parts

AI agents

Virtual Employees that work 24/7

Automations

Connect files and automate tasks

Workflows

Build processes with your team

Data Space

Trusted data sharing and control

Solutions by department

Finance

Reports, budgets, and reconciliations

Inventory and manufacturing

Stock, orders, and production in one view

HR

Timesheets, attendance, and reviews

Project management

Status and workload across projects

Sales and CRM

Leads and deals kept up to date

Education

Student records and school data

Finance

Turn manual finance work into reports that update themselves.

What Finance teams automate

  • Track payables and receivables
  • Build cash flow statements
  • Compare budget against actuals

Inventory and manufacturing

See stock levels and automate ordering.

What inventory and manufacturing teams automate

  • Track inventory across multiple sites
  • Connect sales, purchasing, and warehouse data
  • Link a barcode scanner to your sheet

HR

Run recruitment, attendance, and OKR tracking from your sheets.

What HR teams automate

  • Track recruitment and onboarding
  • Record team OKRs and results
  • Track check-ins, check-outs, and leave

Project management

Assign tasks and track hours without manual updates.

What project teams automate

  • Assign tasks and track status changes
  • Estimate effort and log hours worked
  • Track milestones across projects

Sales and CRM

Track leads and sales performance with automated reports.

What sales teams automate

  • Track and convert leads
  • Set sales goals and track team metrics
  • Monitor sales KPIs on dashboards

Education

Automate attendance, grades, and school purchasing.

What schools automate

  • Track attendance and notify parents
  • Record and compare class grades
  • Track inventory lent to students and staff

Find a use case

By department

How each team uses Sheetgo

By industry

How each industry uses Sheetgo

By company size

Small, medium-sized, or large

Learn

Blog

Guides and product news

Customer stories

How teams like yours use Sheetgo

Help center

Guides and answers

Why Sheetgo

Compare

How Sheetgo compares with other tools

Security

How we protect your data

Trust center

Our compliance details

Sign in to

Workflows

Build processes with your team

Automations

Connect files and automate tasks

One system, four parts

AI agents

Virtual Employees that work 24/7

Automations

Connect files and automate tasks

Workflows

Build processes with your team

Data Space

Trusted data sharing and control

Solutions by department

Finance

Reports, budgets, and reconciliations

Inventory and manufacturing

Stock, orders, and production in one view

HR

Timesheets, attendance, and reviews

Project management

Status and workload across projects

Sales and CRM

Leads and deals kept up to date

Education

Student records and school data

Find a use case

By department

How each team uses Sheetgo

By industry

How each industry uses Sheetgo

By company size

Small, medium-sized, or large

Get started

Templates

Ready-made workflows to start from

Learn

Blog

Guides and product news

Customer stories

How teams like yours use Sheetgo

Help center

Guides and answers

Why Sheetgo

Compare

How Sheetgo compares with other tools

Security

How we protect your data

Trust center

Our compliance details

Help center

Guides and answers

Contact support

Write to our team

Workflows

Build processes with your team

Automations

Connect files and automate tasks

Pull Google Calendar data into Google Sheets using Apps Script

This post was originally published in our community forum.

Objective : This guide demonstrates how to use Google Apps Script to pull data from Google Calendar and display them in a Google Sheet. This process allows you to automate the retrieval of calendar events and manage them directly within a spreadsheet.

Create a New Google Sheet: Open Google Sheets and create a new spreadsheet or open an existing one where you want the calendar data to be displayed.

Open Apps Script: In your Google Sheet, click on Extensions > Apps Script.

Insert the Script: In your Apps Script project, you’ll have two files: Code.gs and props.gs. Delete any existing code in the script editor and replace it with the code snippet provided below. Copy the provided code snippet for Code.gs and props.gs into their respective files.

props.gs

const emailIds = [
  '' // Include here the email address
];

Code.gs

function fetchCalendarData() {

  // Get the active sheet
  const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  sheet.clear();  // Clear any previous content

  sheet.appendRow(["Meeting ID", "Name", "Attendees", "Duration", "Video Link"]);     // Set headers

  // Loop through each email ID
  emailIds.forEach(email => {
    const events = CalendarApp.getCalendarById(email).getEvents(new Date('start_date'), new Date()); 
    // Loop through events and write them to the sheet
    events.forEach(event => {
      const eventId = event.getId();
      const eventName = event.getTitle();
      const attendees = event.getGuestList().map(guest => guest.getEmail()).join(', ');
      const duration = (event.getEndTime() - event.getStartTime()) / (1000 * 60); 
      let videoLink = "";
      const description = event.getDescription();
      if (description) {
        const meetLinkRegex = /https:\/\/calendly\.com\/events\/[\w-]+\/google_meet/i; // Regex to match Video link
        const match = description.match(meetLinkRegex);
        if (match) {
          videoLink = match[0]; 
        }
      } 
      sheet.appendRow([eventId, eventName, attendees, duration, videoLink]);
    });
  });

  Logger.log("Calendar data has been fetched and updated in the sheet.");
}

Update Email IDs: In props.gs, add the email ID of the calendar you want to pull data from. You can adjust the date range by modifying the start_date in the code.gs file.

Execute the script: You might be prompted to authorize the script to access your calendar and spreadsheet. After running the script, your Google Sheet should populate with the event data from the specified Google Calendar.

By following these steps, you can easily automate the process of pulling calendar data into your Google Sheets, making it easier to manage and analyze your schedule.

You may also like…

google sheets features and formulas

How to find nominal interest rate using Google Sheets

Sarah is a young professional making significant financial decisions. From credit cards to mortgages, student loans, and investment...
google sheets features and formulas

Using the PROPER function to capitalize the first letter of each word in Google Sheets

Note: This post was originally published in our community forum. Ever found yourself needing to clean up a list of names, titles, or any...
google sheets features and formulas

Filter values in a column which are not in another column

Note: This post was originally published in our community forum. Hey everyone! 👋 Check out this handy formula for filtering values from...