This Rust application is designed to help you revisit the links you've saved in Notion. It randomly selects a configurable number of links(default: 3) from your "My links" database and sends them via email, allowing you to discover or re-discover valuable resources you've saved over time.
Configure the application using these environment variables:
NOTION_API_KEY
: Your Notion API key, obtained from Notion Developers.NOTION_DATABASE_ID
: The ID of your "My links" database in Notion.SENDGRID_API_KEY
: Your SendGrid API key for email sending capabilities.FROM_ADDRESS
: The sender's email address for the digest.TO_ADDRESS
: The intended recipient's email address for the digest.NUMBER_OF_LINKS_TO_FETCH
: The number of random links to fetch from your "My links" database for the digest email. Default is 3 if not set.
- Go to Notion Developers and create an integration.
- Use the provided API key as your
NOTION_API_KEY
. - Share your "My links" database with the integration you created.
To run this application automatically, you can use a scheduler like cron. Here's an example of a cron job that runs the application every day at a specified time:
0 8 * * * /path/to/the/digest-app
This project is released under the MIT License.