DEV Community

Cover image for How to Export Glasp Highlights with GitHub Actions (Free, No Server)
Kei for Glasp

Posted on

How to Export Glasp Highlights with GitHub Actions (Free, No Server)

This post was originally published on Glasp:
๐Ÿ‘‰ How to Export Glasp Highlights with GitHub Actions (Free, No Server)

Glasp Export is a free GitHub Actions template that automatically sends your Glasp highlights to Slack, Notion, Airtable, or Google Sheets on a daily schedule. No server or coding skills required โ€” just add your API keys as GitHub Secrets and it runs automatically.

You can enable multiple destinations at the same time. For example, send new highlights to Slack for daily review and to Notion for long-term storage โ€” all from a single setup.


What Is Glasp Export?

Glasp Export is an open-source GitHub Actions template that connects your Glasp account to your favorite productivity tools. It fetches your latest highlights via the Glasp API and pushes them to whichever destinations you configure.

Supported destinations:

  • Slack โ€” Highlights posted to a channel with rich formatting and thumbnails

  • Google Sheets โ€” Highlights appended as rows โ€” one highlight per row

  • Airtable โ€” Highlights added as records in a table

  • Notion โ€” One page per article, with highlights as Quote blocks inside

Why GitHub Actions instead of Zapier or n8n?

  • Completely free (GitHub Actions is free for public and private repos up to 2,000 minutes/month)

  • No third-party automation account needed

  • Runs on a schedule you control

  • Open source โ€” you own the code


How to Export Glasp Highlights with GitHub Actions

Step 1: Create Your Repo from the Template

  1. Go to github.com/glasp-co/glasp-export

  2. Click "Use this template" โ†’ "Create a new repository"

3 Give it a name (e.g., my-glasp-export) and set it to Private


Step 2: Add Your Glasp Access Token

  1. Go to glasp.co/settings/access_token and copy your token

2 In your new repo, go to Settings โ†’ Secrets and variables โ†’ Actions โ†’ New repository secret

3 Name: GLASP_ACCESS_TOKEN / Value: your token

This secret is required for all destinations.


Step 3: Set Up Your Destination(s)

How to Export Glasp Highlights to Slack

  1. Go to api.slack.com/apps โ†’ Create New App โ†’ From scratch

  2. Enable Incoming Webhooks โ†’ Add New Webhook to Workspace โ†’ select a channel

3 Copy the webhook URL

4 Add a secret: SLACK_WEBHOOK_URL / Value: your webhook URL

5 Go to Actions โ†’ Glasp โ†’ Slack โ†’ Run workflow to test

Each article appears as a Slack message with the title, numbered highlights, inline notes, and links to the original article and Glasp page.


How to Export Glasp Highlights to Google Sheets

1. Create a Google Cloud Service Account

  1. Go to console.cloud.google.com and create or select a project

  2. Enable the Google Sheets API (APIs & Services โ†’ Enable APIs)

  3. Go to IAM & Admin โ†’ Service Accounts โ†’ Create Service Account

  4. Give it a name โ†’ Done (no roles needed)

  5. Click the service account โ†’ Keys โ†’ Add Key โ†’ Create new key โ†’ JSON โ†’ download

2. Share your Sheet with the Service Account

  1. Copy the client_email from the JSON file

  2. Share your Google Sheet with that email as Editor

3. Add secrets

  • GOOGLE_SERVICE_ACCOUNT_JSON โ€” paste the entire contents of the JSON file

  • GOOGLE_SHEET_ID โ€” from your sheet URL: docs.google.com/spreadsheets/d/THIS_PART/edit

4. Run workflow

Go to Actions โ†’ Glasp โ†’ Google Sheets โ†’ Run workflow

A "Highlights" tab and header row are created automatically on first run. Output columns: Timestamp, Document Title, Document URL, Glasp URL, Highlight Text, Note, Tags, Color, Highlighted At.


How to Export Glasp Highlights to Airtable

  1. Set up your Base

  2. Create a new Base in airtable.com

  3. Rename the default table to Highlights

  4. Add these fields as Single line text: Timestamp, Document Title, Document URL, Glasp URL, Highlight Text, Note, Tags, Color, Highlighted At

2. Create a Personal Access Token

  1. Go to airtable.com/create/tokens โ†’ Create new token

  2. Add scopes: data.records:read and data.records:write

  3. Under Access, add your Base โ†’ copy the token

3. Get your Base ID

  • Your Base ID is in the URL: airtable.com/appXXXXXXXXXXXXXX/...

4. Add secrets and run

  • AIRTABLE_API_KEY โ€” your Personal Access Token

  • AIRTABLE_BASE_ID โ€” your Base ID (starts with app)

Go to Actions โ†’ Glasp โ†’ Airtable โ†’ Run workflow


How to Export Glasp Highlights to Notion

1. Create a Notion Integration

  1. Go to notion.so/my-integrations โ†’ New integration

  2. Give it a name โ†’ copy the Internal Integration Token

2. Create a Database
Create a new Database (Table view) with these properties:

  • Name โ€” Title (default)

  • URL โ€” URL

  • Glasp URL โ€” URL

  • Tags โ€” Multi-select

  • Highlighted At โ€” Date

  • Highlights Count โ€” Number

3. Connect the Integration Open the Database โ†’ click ยทยทยท (top right) โ†’ Connect to โ†’ select your integration

4. Get your Database ID

  • Open the Database as a full page. The URL looks like: notion.so/yourworkspace/DATABASE_ID?v=...
  • Copy the 32-character ID before ?v=.

5. Add secrets and run

  • NOTION_API_KEY โ€” your Integration Token

  • NOTION_DATABASE_ID โ€” your Database ID

Go to Actions โ†’ Glasp โ†’ Notion โ†’ Run workflow

Each article becomes a Notion page. Highlights appear as Quote blocks with highlight colors preserved. Notes appear as Callout blocks (๐Ÿ“) directly below each highlight.


How to Customize the Schedule

By default, each workflow runs daily at 09:00 UTC. To change the schedule, edit the relevant .github/workflows/ file:

schedule:
  - cron: "0 9 * * *"    # Daily at 09:00 UTC (default)
  - cron: "0 9 * * 1"    # Every Monday
  - cron: "0 */6 * * *"  # Every 6 hours
Enter fullscreen mode Exit fullscreen mode

Tip: If you change the frequency, update LOOKBACK_HOURS to match so you don't miss highlights or see duplicates.


Frequently Asked Questions

Is Glasp Export really free?

Yes. GitHub Actions is free for public repos and includes 2,000 free minutes/month for private repos. The workflow typically runs in under 30 seconds.

Can I enable multiple destinations at the same time?

Yes. Just add the secrets for each destination. For example, add both SLACK_WEBHOOK_URL and NOTION_API_KEY to send highlights to both Slack and Notion.

What happens if I don't add secrets for a destination?

The workflow will skip gracefully with a message โ€” no errors, no failed runs.

Does it send duplicate highlights?

No. Each destination uses deduplication to avoid sending the same highlight twice.

Do I need to know how to code?

No. The setup is entirely through GitHub's UI and the third-party tool's settings pages.


Get Started

โ†’ github.com/glasp-co/glasp-export

Click "Use this template" and have your highlights flowing to your favorite tools in under 15 minutes.

Have a question or want to request a new destination? Open an issue โ€” we'd love to hear from you.


Resources

Top comments (0)