Skip to content

Instantly share code, notes, and snippets.

@R-ohit-B-isht
Last active April 21, 2024 17:39
Show Gist options
  • Save R-ohit-B-isht/83e68a5dd3cdf75aaefe63e586379d00 to your computer and use it in GitHub Desktop.
Save R-ohit-B-isht/83e68a5dd3cdf75aaefe63e586379d00 to your computer and use it in GitHub Desktop.
Migrating_files_between_Notion_and_Google_Drive.playbook.md
# 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. Go to Notion Settings.
- ii. Then go to Import.
- iii. Then choose import data from Google Docs.
- iv. Select the specified Documents asked by the user.
- v. Click on Select button.
### 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