notion-assignment-import
notion-assignment-import copied to clipboard
A free cross-browser extension to load Canvas assignments into Notion, with 8200+ unique users.
Notion Assignment Import
A fully-configurable Chromium, Firefox, and Safari extension to load Canvas assignments into a Notion database, at just the click of a button—unlock your full time-management and productivity potential!
- Features
-
Screenshots
- Extension Popup
- Notion Database Examples
- Extension Options
- Discord Server
-
Setup Instructions
- Safari Instructions
-
Configurable Options
-
Course Code Overrides
-
Page Emojis
-
- Troubleshooting
-
Release Notes
- BREAKING CHANGES
-
v4.3.0
- Building For Local Development
-
How It Works
- Assignment Fetching
- Notion Import
- Contributors
- Licence
Features
- Simple, user-friendly interface
- Provided Notion database template
- Configurable options, with input validation
-
Category
database property for seamless integration into an existing tasks database - No duplication of assignments already in the database
- Fine-tuning of database property names & values
- Overriding of Canvas course names
- Emojis for Notion page icons
- Open source
- Private and secure—all data is stored locally!
My integration does not save or log any user data.
Screenshots
Extension Popup
Notion Database Examples
Extension Options
Discord Server
To be notified with updates and changelogs, to get in touch, or just to lurk, join the Discord server!
Setup Instructions
-
Install the Chromium extension, Firefox add-on, or Safari extension.
-
Duplicate this Notion database template (or create/modify your own!).
-
Click on the options icon to configure the extension.
-
Click
Authorise with Notion
to add the integration to your Notion workspace, and share your relevant database(s).Warning
There is a known issue when trying to sign in to Notion using theContinue with Google
option.
This is an issue with the browser and cannot be fixed by this extension.
If you encounter this issue, please try logging in directly with your email and password.Note for Safari
Due to browser API limitations, OAuth2 is not currently supported. As a temporary stop-gap, support for a Notion Internal Integration has been retained.- Follow steps 1 and 2 on this page to create a new Internal Integration.
- Paste the Notion
Internal Integration Token
into the input field.
-
Select the desired target database in the
Database
dropdown.Note
Databases that have not been directly shared with the integration (ie those which are a child of a shared page) might not immediately appear. Use theRefresh
button until the desired database appears. -
Configure the
Property Names
andProperty Values
if necessary.If you have duplicated my database template, you do not need to change the applied defaults.
-
Configure the
Timezone
,Course Code Overrides
, andPage Emojis
options if necessary.Course Code Overrides
can be found under Advanced Options. -
Open the Canvas page for the course you wish to import.
Note
You should be on a URL that looks something likehttps://<canvas.auckland.ac.nz>/courses/72763/**/*
.-
<canvas.auckland.ac.nz>
should be your own institution's Canvas URL. -
/**/*
means that you can be on the course home page, or any subpage—the important part is/courses/...../
.
-
-
Click
Copy from Canvas
. -
You should see the course appear in the
Saved Assignments
list.
1. ClickExpand
to view a list of individual saved assignments.
2. ClickClear
to remove the saved assignments from storage. -
Repeat steps 8 and 9 as desired.
-
Once you have finished saving assignments, click the
Export to Notion
button to export to your Notion database.
Safari Instructions
Warning This is an unsigned extension that is not installed through the Apple App Store.
This means that you will not receive automatic updates, and you must repeat the below installation steps if you wish to update your extension.
This may change in a future update.
To be notified of new releases, join the Discord server.
-
Download the latest
notion-assignment-import-safari_latest.zip
archive fromreleases/safari
. -
Unzip the
.zip
archive. -
Navigate to the file
Notion Canvas Assignment Import
inNotion Canvas Assignment Import/Content/MacOS
. -
Open up the
terminal
app. Paste in this command:
chmod +x
- Drag and drop the
Notion Canvas Assignment Import
file into your terminal window. You should now have something that looks like this:
chmod +x /Users/YOUR_USERNAME/Downloads/Notion\ Canvas\ Assignment\ Import/Contents/MacOS/Notion\ Canvas\ Assignment\ Import
-
Hit
Enter
. You may now close the terminal. -
Rename the folder
Notion Canvas Assignment Import
toNotion Canvas Assignment Import.app
.This turns the folder into an app.
-
Now drag and drop the app into the applications folder.
-
Open the app.
- If you have successfully opened the app, skip to Step 11.
- If you have issues opening the app with an error message saying the app is unsafe, continue below.
-
Open
System Preferences
and go toSecurity and Privacy
->General
. There should be a prompt about applications from unidentified developers. ClickOpen Anyway
. Clickallow
for any further prompts. -
Reopen the app.
-
Go to
Safari Preferences
->Advanced
and enableShow Develop menu in menu bar
. -
Go to the
Develop menu
in the menu bar, and clickAllow unsigned extensions
. -
Go back to
Safari Preferences
and now go to theExtensions
pane. Enable the extension. -
Done!
Configurable Options
Option | Purpose/Remarks |
---|---|
Theme |
Whether to use Light /Dark mode, or use the browser's default (System ) |
Show Advanced Options |
Whether to Show /Hide the Advanced Options |
Timezone |
The TZ timezone in which to parse and set all dates |
Assignments Without Due Dates |
Whether to Import , or Ignore Canvas assignments without a set due date |
Internal Integration Token (Safari only) |
The Internal Integration Token of your Notion integration |
Database |
The target Notion database |
Page 'Name' Property |
The name of the database Title property, used to set the assignment name |
Category Property |
The name of a database Category property, used to allow grouping of all Canvas assignments together if using a single tasks database |
Course Property |
The name of a database Course property, used to set the assignment course code |
URL Property |
The name of a database URL property, used to set the assignment URL |
Points Property |
The name of a database Points property, used to set the assignment's points |
Unlock Date Property |
The name of a database Reminder property, used to set the assignment unlock date |
Due Date Property |
The name of a database Due property, used to set the assignment due date |
Date Span Property |
The name of a database Date Span property, used to set the date span of the assignment as unlock date –due date |
Canvas Category |
The value of a database Category property to categorise all Canvas assignments as |
Page Emojis |
Any Notion page emojis to apply |
Advanced Options
Option | Purpose/Remarks |
---|---|
Display 'Copy JSON' Button |
Whether to Show /Hide the Copy JSON button in the extension popup |
Course Code Overrides |
Any course code overrides to apply |
What is the difference between Unlock Date
, Due Date
, and Date Span
?
Good question—this was ultimately a design decision I made for maximum flexibility.
Property | Purpose |
---|---|
Unlock Date |
Used for the date that an assignment unlocks/becomes available. |
Due Date |
Used for the date that an assignment is due. |
Date Span |
Used for the date span Unlock –Due . |
This enables many possible use-cases, such as:
- Timelines to be created by
Date Span
; - Calendars to be set to:
-
Date Span
, or -
Due Date
only.
-
- Reminders to be set independent to the due date;
- Manipulation of the start/end dates on a timeline independent to the unlock/due date; and
- Sorting assignments by due date, rather than only being able to sort by unlock date.
Notion doesn't let you sort
Date
(span) properties by their end date—only their start date.
Of course, you are welcome to configure any of these property names to be ❌ Exclude
—these properties are ignored on import.
Course Code Overrides
Example: The course title in the page breadcrumb on Canvas is Course Title
, but you want it to be saved in your database as COURSE 121
.
Configure Course Code Overrides
to the following:
Canvas Course Code | Notion Course Code |
---|---|
Course Title |
COURSE 121 |
Page Emojis
Example: You want all COURSE 121
pages to have the 👨💻 emoji, and all COURSE 101
pages to have the 👀 emoji.
Configure Page Emojis
to the following:
Canvas Course Code | Notion Course Code |
---|---|
COURSE 121 |
👨💻 |
COURSE 101 |
✨ |
Troubleshooting
Wrong Timezone
If your assignments are being imported into Notion in the wrong timezone, please first ensure that you have configured the Timezone
option correctly.
Note
After configuring aTimezone
, you must thenClear
and re-copy yourSaved Assignments
in the extension popup.
Timezone offsets are applied when assignments are initially copied from Canvas, and not when assignments are exported to Notion.
Warning
To prevent erroneous clears, the extension will automatically restore cleared assignments if the extension popup is closed before theCleared!
success status is displayed.
Release Notes
Note
For a full changelog of notable changes, seeCHANGELOG.md
.
Also see Releases.
BREAKING CHANGES
v4
- Support for a configurable Notion
'Status'
property has been removed, as Notion has implemented their own built-inStatus
property. To fix assignments being imported without a'Status'
value, change your database property to be of typeStatus
, and assign aDEFAULT
value.
v4.3.0
- Notion pages now include the assignment's Canvas description (#59).
- Added support for a new 'Points'
number
database property (#61) to tag the assignment's points value. - Changed the colour of Advanced Options headings to ease identification.
- Renamed
Available Date
toUnlock Date
.
Migration Instructions
- To leverage the new support for a
Points
property, you must create a new Notionnumber
database property, and configure it on the Options Page.
Building For Local Development
This project uses gulp
and esbuild
under the bonnet to bundle the compiled JavaScript files to be browser-ready.
-
Fork/clone this repository.
-
Run
npm ci --include=dev
to install the required dependencies. -
Run the appropriate build script:
-
npm run watch
to build in watch mode. -
npm run debug
to build source-mapped, non-minifieddist
files that are easier to debug. -
npm run build
for minifieddist
files.
-
-
A
dist/
directory will be created containing a separate extension root folder for each supported vendor.
How It Works
Assignment Fetching
-
The
fetch.ts
content script is injected into the active Canvas tab. -
window.location
is used to extract the institution's Canvasorigin
, as well as the specificpathname
of the active tab. -
The
pathname
is matched against a regular expression to extract the Canvas:course_id
, such as72763
. -
A same-host
fetch()
request is made from the active Canvas tab to the following Canvas REST API endpoints, with the logged-in user's cookies:-
GET /api/v1/courses/:id
, to get the course code. -
GET /api/v1/courses/:course_id/assignment_groups
, to get a list of assignments.
-
-
Relevant information is extracted from each
Assignment
object, and the following configurations applied:-
Course Code Overrides
, and -
Page Emojis
.
Note
Assignments without anunlock_at
date (ie are already unlocked) are set to be unlocked from the top of the next hour, relative to the current time. -
-
Fetched assignments are saved by course in browser local storage (see
IFetchedAssignment
andSavedAssignment
infetch.ts
).
Notion Import
-
The OAuth2 token is used to authorise with the Notion API.
-
The saved assignment data is retrieved from local storage.
-
The configured
Database
is queried to avoid import of duplicate assignments (by matching assignment URLs). -
The configured
Database Properties
are used to create a new database page for each assignment with the Notion API.
Contributors
- Thank you to @PolarWolf314 for doing the conversion work to add Safari support!
- Thank you to @MatthewLamperski for #89!
Licence
notion-assignment-import
is licensed under MIT modified with a Commons Clause.
Basically, don't try to re-badge and monetise this extension.
This extension began as a free, open-source hobby project to help University students save time—no adverts, no data mining, no other asterisks.
I am firm on it remaining as such.