Syncing Google Sheets and Notion with CodelessAPI

Published on January 4, 2024

Introduction

Efficient data management often involves syncing data across different platforms. CodelessAPI provides a simple yet powerful solution to sync Google Sheets data to Notion without the need for intricate coding. This guide will walk you through the step-by-step process of using CodelessAPI. We'll focus specifically on the Smart Sync module to establish dynamic data sync between Google Sheets and Notion, enhancing your data workflow.

Smart Sync: A Versatile Data Synchronization Module

The Smart Sync module by CodelessAPI is designed to streamline the data synchronization process between any two data sources. In this blog post, we're going to be focusing on Google Sheets and Notion. You'll to connect two read modules, configure column mappings, set update conditions, and define row equality checks. Let's dive into the key steps to sync your data seamlessly.

Setting Up Google Sheets as the Source

Follow these steps to configure Google Sheets as your data source in CodelessAPI:

Step 1: Sign Up and Create a New API

  1. Create a CodelessAPI account: If you don't have an account, start by signing up for a free CodelessAPI account. You can register by visiting the sign-up page.
  2. Generate a new API: After logging in, go to your dashboard and navigate to the "Workflows" page. Click the "Create new Workflow" button. Provide a descriptive name and relevant description for your API. Upon creation, you'll be taken to the API builder interface.
    Add new API

Step 2: Connect Google Sheets

  1. Select Google Sheets as the data source: In the "Data" section of the left sidebar, expand the "Read" options, and choose "Google Sheets" as one of the data sources for your synchronization.
  2. Add the Google Sheets module to the canvas: Drag and drop the "Google Sheets" module onto the canvas. This module will be your starting point for reading data from Google Sheets.
    Add Google Sheets module to canvas

Step 3: Configure the Google Sheets Data Source

  1. Authorize CodelessAPI with Google Sheets: Click on the Google Sheets module within the canvas and select "Configure". Follow the prompts to authorize CodelessAPI and grant access to your Google Sheets data.
  2. Select the spreadsheet and sheet: After authorization, choose the specific Google Sheets spreadsheet and sheet that you want to sync data with. Select the columns you wish to include in the synchronization process.
    Google Sheets Sheet Configuration

Step 4: Connect Notion

  1. Choose Notion as the other data source: Go to the "Data" section, expand the "Read" options, and select "Notion" as your other data source for your synchronization.
  2. Add the Notion module to the canvas: Drag and drop the "Notion" module onto the canvas. This module will be where the synchronized data will be inserted into.
    Add Notion module to canvas

Step 5: Configure the Notion Data Source

  1. Authorize CodelessAPI with Notion: Click on the Notion module within the canvas and select "Add Notion Account". This will open a new window where you can choose which Notion databases you want CodelessAPI to access. Follow the prompts to authorize the relevant databases.
  2. Select the database and properties: After authorization, return to the builder page. Click on the Notion module and choose "Configure". Select the specific Notion account and database you want to sync data from. Choose the properties you wish to include in the synchronization process.
    Notion Database Selection

Step 6: Add the Smart Sync Module

  1. Add Smart Sync module: Expand the " Operations" section, and drag and drop the "Smart Sync" module onto the canvas. This module will act as the intermediary for syncing data between Google Sheets and Notion.

Step 7: Link the Modules

Create a data flow between Google Sheets, Notion, and the Smart Sync module:

  • Link Start to Google Sheets: Connect the "Start" module to the "Google Sheets" module by clicking the "Start" module, clicking "Link" then clicking the "Google Sheets" module. You can remove a link by clicking on the link itself.
  • Link Start to Notion: Similar to above, connect the "Start" module to the "Notion" module.
  • Link Google Sheets to Smart Sync: Connect the "Google Sheets" module to the "Smart Sync" module.
  • Link Notion to Smart Sync: Connect the "Notion" module to the "Smart Sync" module.
  • Link Smart Sync to End: Connect the "Smart Sync" module to the "End" module.
    Add Smart Sync module to canvas

Step 8: Configure the Smart Sync Module

Configure the Smart Sync module to define how data should be synchronized between Google Sheets and Notion. Follow these detailed steps to set up your Smart Sync:

  1. Persist toggle: In the configuration panel, on the top, you will see an option to persist changes to the data sources. If this is toggled off, then the workflow will return the output of the smart sync without persisting any of the changes to the data sources. This lets you test out your configuration before making any changes to your sources. Keep this off while testing and ensure you're satisfied with the output before persisting your changes.
  2. Workflow Output toggle: After the workflow runs your sync, it displays the output of one of the data sources. The second toggle lets you choose which output you'd like to see. If you're syncing data between Google Sheets and Notion, you might decide to add rows from Google Sheets to Notion but not from Notion to Google Sheets. Hence the output for each data source will be different. If you'd like to see the output of a specific workflow when running the Smart Sync, this toggle will let you select that.
  3. Mapping columns: Now map your columns between Google Sheets and Notion. Here you can tell CodelessAPI which columns in Google Sheets will match to which columns in Notion.
  4. Row equality: Select the necessary conditions to determine whether or not a row in Google Sheets and Notion is equal.
  5. Update conditions: Select your update conditions. You can mix and match your update conditions as well, so some columns from Google Sheets will be updated to match the Notion column values, whereas other columns might be updated in Notion to match the Google Sheets column values.
  6. Create/Delete rows: Here you can specify whether to create or delete rows if a row exists in one data source but not the other.
Configure Smart Sync module

Step 9: Test and Deploy Your API

  1. Test your API: Initiate a test run of the API using the "Run" button. This helps identify potential issues and validates the API endpoint's functionality.
  2. Deploy and use your API: After configuring the API, access the generated API endpoint to start the synchronization process between Google Sheets and Notion. To use the API, click on the "Start" module and select "Configuration" to obtain the API link. Remember to toggle the "Persist changes to the data sources" to allow changes to be made to your data sources.

Conclusion

CodelessAPI simplifies the process of syncing Google Sheets data to Notion, making it accessible and organized. Its user-friendly interface and integration capabilities enhance your data management workflow across different platforms. Whether you're handling spreadsheets, forms, or reports, CodelessAPI streamlines your data synchronization tasks.

Start optimizing your data synchronization process today by exploring the features of CodelessAPI. For any questions or feedback, don't hesitate to reach out to hello@codelessapi.io. Our team is dedicated to assisting you in streamlining your data management activities.

You might also like to check out