This Chrome extension uses Google's Gemini API to summarize the content of the current webpage and optionally save it to a Notion database. It generates a Markdown-formatted summary, including the page title, URL, date, source, and suggested tags.
NOTE: Data from free-tier Gemini API users are stored and used to train the model.
Key Features:
- LLM-Powered Summarization in Chrome
- Markdown Output
- Notion Integration
- LLM-Generated weekly recap from past week's saved summaries on Notion
Code all generated by Claude 3.7 Sonnet.
Refer to example_summary.md and example_weekly_recap.md.
-
Clone or Download The Repository: Clone this repository or download the ZIP file and extract it.
-
Load Unpacked Extension:
- Open Chrome and navigate to
chrome://extensions/
. - Enable "Developer mode" (toggle switch in the top-right corner).
- Click "Load unpacked".
- Select the
gemini-summarizer
directory.
- Open Chrome and navigate to
-
Set Gemini API Key:
- Click the extension icon in the Chrome toolbar.
- Enter your Gemini API key (obtained from Google AI Studio) and click "Save". (The API key is saved in your browser's local storage.)
-
Summarize a Page:
- Navigate to the webpage you want to summarize.
- Click the extension icon and click "Summarize Current Tab".
- The summary will appear in a popup. It will also be automatically copied to your clipboard.
To save summaries directly to Notion, you'll need to set up an integration and provide your API key and database ID (that are saved in your browser's local storage).
- Create an internal integration secrets in Notion to get the secret key
- Setup a new table database in Notion with these required properties (columns):
Title
(Plain Text)URL
(URL)Tags
(Multi-select)Date
(Date)
- Connect the integration to the database by giving database permission to the integration created in step 1.
- Configure the extension with the API key (the integration secret) and database ID (found in the database URL:
https://www.notion.so/{workspace_name}/{database_id}?v={view_id}
- reference).
The extension defaults to the gemini-2.0-flash
model. To use a different model:
- Open
background.js
andweeklyRecap.js
. - Find the line:
const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${apiKey}`, {
- Change
gemini-2.0-flash
orgemini-2.0-pro-exp-02-05
to the desired model name. Ensure the model you select supports thegenerateContent
method.
gemini-summarizer/
├── manifest.json
├── background.js
├── notionUtils.js
├── popup.html
├── popup.js
├── content.js
├── styles.css
└── images/
└── icon*.png (128x128)
- "No summary generated": This could mean the Gemini API key is invalid, the API is unavailable, or no content was found on the page.
- "Error saving to Notion": Check your Notion API key, database ID, and that the database has the required properties (
Title
,URL
,Tags
,Date
). - Notion setup button doesn't work: Make sure that the fields are not empty.
- Inspired by If it is worth keeping, save it in Markdown by Piotr Migdał.
- Motivated by Alchain花生's YouTube video The World's Most Powerful AI Coding Tool—Cursor: Everyone Can Be a Programmer.
- Icons are from FREEPIK.