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!
- Simple and user-friendly interface
- Provided Notion database template
- Configurable options with input validation
Category
database property for seamless integration into an existing tasks database- Fine-tuning of database property names and values
- Overriding of the course name displayed in Canvas
- Custom emojis for each course to be displayed as Notion page icons
- Open source
- Private and secure — all data is stored locally, and loaded by your own Notion Integration!
-
Install the Chromium extension, Firefox add-on, or Safari extension.
-
Duplicate this Notion database template (or create/modify your own!).
-
Click
Configure Options
to configure the extension.- Create a new Notion Internal Integration, and add it to the desired database.
Follow step 1–2 on this page.
- Copy and paste your integration key into the
Notion Integration Key
option field. - Copy and paste your database identifier into the
Notion Database ID
option field.
- Copy and paste your integration key into the
- Create a new Notion Internal Integration, and add it to the desired database.
-
Configure the
Timezone
andNotion Database Properties
if necessary.You should only ever change the
Canvas Class Names
options if the extension is not parsing assignments correctly, and you know what you are doing. -
Open the Canvas Assignments page for the course you wish to import.
-
Click
Save Canvas Assignments
. -
You should see the course code appear in the
Saved Assignments
list.- Click
View Saved JSON
to view the raw storedJSON
. - Click
List Saved Courses
to return to the ordered list of course codes. - Click
Clear Saved Assignments
to remove the saved assignments from storage.
- Click
-
Repeat steps 5–7 as desired.
-
Once you have saved the assignments of all your desired courses, click the
Export Saved Assignments
button to export to Notion.
-
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-assignment-import-safari/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. Now you should have something looking like this:
chmod +x chmod +x /Users/YOUR_USERNAME/Downloads/notion-assignment-import-safari/Contents/MacOS/Notion\ Canvas\ Assignment\ Import
-
Hit
Enter
. You may now close the terminal. -
Rename the folder
notion-assignment-import-safari
tonotion-assignment-import-safari.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!
Option | Default Value | Purpose/Remarks |
---|---|---|
Breadcrumbs class | ic-app-crumbs |
Select the breadcrumb at the top of the page, containing the course code as the nth li child element |
Course code nth li |
2 |
Parse the course code, as the nth li of the breadcrumbs parent element |
Assignment class | assignment |
Select the individual assignments on the page |
Assignment title | ig-title |
Select the a element that contains the assignment URL as the href attribute and the assignment name as innerHTML |
Available date | assignment-date-available |
Select the element containing the assignment available date information |
Available status | status-description |
Select the element containing the text that specifies whether the assignment is already available or not |
Due date | assignment-date-due |
Select the element containing the assignment due date information |
Date element | screenreader-only |
Select the span element which contains the date as innerHTML |
Not available status | Not available until |
The text within Available status that specifies that an assignment is not yet available |
Notion Integration Key | null |
The integration key of the Notion Internal Integration that is added to the desired database |
Notion Database ID | null |
The identifier of the desired database |
Timezone | Pacific/Auckland |
The TZ timezone in which to parse and set all dates |
Page 'name' property | Name |
The name of the database Name/Title property, used to set the assignment name |
Category property name | Category |
The name of a database Category property, used to allow grouping of all Canvas assignments together if using a single tasks database |
Course property name | Course |
The name of the database Course property, used to set the assignment course code |
URL property name | URL |
The name of the database URL property, used to set the assignment URL |
Status property name | Status |
The name of the database Status property, used to initialise the status of all assignments as Status property To Do value |
Available date property name | Reminder |
The name of the database Reminder property, used to set the assignment available (from) date |
Due date property name | Due |
The name of the database Due property, used to set the assignment due date |
Date span property name | Date Span |
The name of the database Date Span property, used to set the date span of the assignment as available from date –due date |
Category property Canvas value | Canvas |
The value of the database Course property to set all Canvas assignments as |
Status property To Do value | To Do |
The value of the database Status property to initialise all Canvas assignments as |
Canvas Course Code Overrides | {} |
A string representation of a JSON object for any course code overrides to apply |
Notion Course Emojis | {} |
A string representation of a JSON object for any course emojis to apply |
Good question — this was ultimately a design decision I made for maximum flexibility.
This enables many possible use-cases, such as:
- Timelines to be created by
Date span
; - Calendars to be set to:
Date span
, orDue date
only.
- Reminders to be set independent to the available date;
- Manipulation of the start/end dates on a timeline independent to the available/due date; and
- Sorting assignments by due date, rather than only being able to sort by available date.
There is no ability to sort Notion
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 empty — empty properties are ignored on import.
Example — the course title in the page breadcrumb is Course Title
, but you want it to be saved in your database as CSE 121
.
Configure the Canvas Course Code Overrides
to the following:
{
"Course Title": "CSE 121"
}
For any additional courses, simply separate them with a comma ,
:
{
"Course Title": "CSE 121",
"Other Course": "OTH 101"
}
Example — you want all CSE 121
pages to have the ✨ emoji, and all OTH 101
pages to have the 👀 emoji.
Configure the Notion Course Emojis
to the following:
{
"CSE 121": "✨",
"OTH 101": "👀"
}
This project uses gulp
and browserify
under-the-bonnet to bundle the compiled JavaScript files to be browser-ready.
-
Clone this repository.
-
Run
npm install -D
to install the required dependencies. -
Run the appropriate build script:
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.
-
Assignments are parsed from the
DOM
using the configuredAssignment class
. -
Assignments are individually parsed for their name, course, URL, available (from) date, and due date:
Canvas Course Code Overrides
are applied as configured,Notion Course Emojis
are applied as configured, and- Assignments without due dates are ignored.
Assignments without 'available date' information (or are already available), are set to be available from the top of the next hour (relative to parsing time).
-
Parsed assignments are saved by course in Chrome local storage in a
JSON
-serialisable format (seeIParsedAssignment
andSavedAssignment
inparse.ts
).
-
The configured
Notion Integration Key
is used to authenticate with the Notion API. -
The saved assignment data is retrieved from local storage.
-
The configured
Database ID
is queried to avoid import of duplicate assignments (matching assignment URLs). -
The configured
Notion Database Properties
are used to create a new database page for each assignment with the Notion API.