Skip to main content
Morf’s Google Sheets integration allows you to automatically save workflow event data directly to Google Sheets.

Capabilities

With the UpsertGoogleSheetsTable action, you can:
  • Send event data to specific sheets within a Google Spreadsheet.
  • Map all event fields, select specific ones, and calculate new fields.
  • Upsert rows: Update existing rows or create new ones based on a Unique Row ID (e.g., Healthie or Hubspot ID).
  • Auto-expand schema: Automatically add new columns to your sheet when new fields are added to the workflow configuration.
See the UpsertGoogleSheetsTable action documentation for more details about its arguments and return structure.
Columns are initially written in alphabetical order. If new fields are added later, their corresponding columns are appended to the end of the table.

Getting Started

1. Prepare your Google Drive

To allow Morf to write to your spreadsheets, you need to grant access to the folder where they reside.
  1. In Google Drive, create a new folder for your Morf data.
  2. Share this folder with Morf’s service account: [email protected]
    • Role: Editor
  3. Open the folder and copy the Folder ID from the URL: https://drive.google.com/drive/u/0/folders/<folderId> You will need this ID when configuring the action in Morf.

2. Create your Spreadsheet

  1. Inside the shared folder, create a new Google Spreadsheet.
  2. Rename the default sheet (tab) to something meaningful (e.g., PatientIntakes, Appointments). You can create multiple sheets to organize different types of events.

3. Configure Morf

  1. Go to your workflow in the Morf dashboard.
  2. Add the UpsertGoogleSheetsTable action.
  3. Provide the Folder ID and Sheet Name you prepared.
  4. (Optional) Configure a Unique Row ID if you want to update existing rows instead of always appending new ones.

Best Practices & Limitations

To ensure the integration works smoothly, follow these guidelines for sheets managed by Morf:
  • Do not rename sheets: The sheet name is used by Morf to locate where to write data.
  • Do not manually add data: Avoid manually adding data to the sheets Morf writes to. If you need to perform calculations or add manual notes, reference the Morf data from a separate sheet using formulas (e.g., ='MorfData'!A1).
  • Do not change column types: They’ll be overwritten when Morf finds new columns.
  • Do not reorder columns: Changing column order while a workflow is active can cause data mismatches.

Upserts (Updating Existing Rows)

The UpsertGoogleSheetsTable action supports “upserting” (update or insert). This is useful for maintaining a current view of a patient or entity, rather than a historical log of changes.
  • How it works: You specify a configuration to act as the Unique Row ID (e.g., a Patient ID).
  • Update: If a row with that ID already exists, Morf updates it with the new data.
  • Insert: If no match is found, Morf appends a new row.