Skip to content

Instantly share code, notes, and snippets.

@R-ohit-B-isht
Last active April 21, 2024 19:11
Show Gist options
  • Save R-ohit-B-isht/3dd1a0caf6b2258e21732d20adfb7ca5 to your computer and use it in GitHub Desktop.
Save R-ohit-B-isht/3dd1a0caf6b2258e21732d20adfb7ca5 to your computer and use it in GitHub Desktop.

Playbook: Migrating Documents Between Notion and Google Drive

Overview

This playbook outlines the steps to migrate documents between Notion and Google Drive via a browser. It includes authentication steps for both platforms.

Prerequisites

  • Google and Notion account credentials.

Procedure

1. Collect Authentication Details

  • 1a. Prompt the user to provide their Google email and password.

  • 1b. Prompt the user to provide their Notion email and password.

2. Authenticate with Google Drive and Notion in same Browser

  • 2a. Open a browser window and navigate to Google Drive.

  • 2b. Use the provided Google credentials to sign in.

  • 2c. Ensure successful authentication.

  • 2d. Stay on the same browser window and navigate to Notion's login page

  • 2e.Enter the Notion Account email address.

  • 2f. Do not check for any Notion emails yet.

  • 2g. Do not use the Notion token for login.

  • 2h. Check the Gmail inbox for the "Sign in with Magic Link" email from Notion.

  • 2i. Open the email from Notion and click on the "Sign in with Magic Link" button or link provided in the email.

<click_browser box="Sign in with Magic Link"/>
  • 2j. Ensure successful authentication in Notion by verifying access to Notion features and user data.

4. Determine Migration Direction and Target Files

  • 4a. Prompt the user to specify the migration direction (from Notion to Google Drive or from Google Drive to Notion).

  • 4b. Based on the selected direction, prompt the user to specify either the files to migrate or to migrate all files.

5. Export and Import Documents

  • 5a. If migrating from Notion to Google Drive:

    • i. Prompt the user for the following options if not provided earlier:

      • Export format (PDF, HTML, Markdown, CSV)
      • Include databases (Current view, Default View)
      • Include content (Everything, No files or images)
      • Include subpages (Yes or No)
      • Create folders for subpages (Yes or No)
    • ii. Export the specified documents from Notion.

    • iii. Navigate to Google Drive.

    • iv. Create a new folder or select an existing one for the imported documents.

    • v. Upload the exported documents from the local directory to the chosen Google Drive folder.

  • 5b. If migrating from Google Drive to Notion:

    • i. Access Notion Import Section

      • Navigate to the Notion homepage.
      • Click on the "Settings & Members" in the left sidebar.
      • Select the "Import" option.
    • ii. Initiate Import from Google Docs

      • Within the Import section, click on the "Google Docs" option.
    • iii. Select Document for Import

      • In the Google Docs import interface, use the search box to find the specified docs.
      • Click on the document to select it for import.
    • iv. Finalize Import

      • Click on the "Select" button to finalize the import process.
    • v. Verify Import

      • Confirm that the document appears in the Notion workspace with the title "Test G Doc".
      • Verify that the content of the Notion page matches the original document from Google Drive.
    • vi. Post-Import

      • Check the integrity of the imported document by comparing it with the original content.
      • Ensure that all images, files, and text are correctly imported and displayed. Troubleshooting
      • If the import option does not work, refresh the page and try again.
      • If the document does not appear in the search, ensure that it is present in Google Drive and try again.
      • For any persistent issues, refer to Notion's help section on importing data: https://www.notion.so/help/import-data-into-notion.

6. Verify Migration

  • 6a. Depending on the migration direction, confirm that all documents have been successfully migrated either to Google Drive or Notion.

  • 6b. Verify the integrity and accessibility of the migrated documents.

Specification

  • Successful authentication with Google Drive and Notion.
  • Depending on the selected migration direction:
    • Exported documents from Notion or Google Drive.
    • Imported documents to Google Drive or Notion.
  • Verification of migration completion and document integrity.

Advice and Pointers

  • Ensure the security of provided credentials during authentication.
  • Utilize browser automation tools for efficient authentication and migration processes.
  • Always use the same browser window** for both Google Drive and Notion logins to maintain session continuity.
  • Do not open a new browser window or tab during the process.
  • Do not check for any Notion emails before reaching the Gmail inbox step.
  • Do not use the Notion token for login.
  • Handle potential errors or interruptions gracefully, providing clear instructions for resolution.
  • Test the migration process with a small set of documents before performing large-scale migrations.
  • Keep track of any changes in the authentication mechanisms of both platforms and update the playbook accordingly.
  • Never ask for API credentials as all authentication will be done through the browser.
  • Make sure to go through Notion docs and help section for importing data into notion (https://www.notion.so/help/import-data-into-notion)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment