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.
![](https://private-user-images.githubusercontent.com/1711390/289255209-88e8f7fc-6bb2-475a-acb2-0d52c373d659.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMDQ4MTgsIm5iZiI6MTczOTIwNDUxOCwicGF0aCI6Ii8xNzExMzkwLzI4OTI1NTIwOS04OGU4ZjdmYy02YmIyLTQ3NWEtYWNiMi0wZDUyYzM3M2Q2NTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTYyMTU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWI4MzY5OWNlZDRiOGJmZmVkMzhmY2Q3MTk5NWVlNjlmZWQ2YzJmMTNjMDMxYWI2MzI3OTQwMzZiMjJkYzliNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.LtCL6Mv997AAtUtmaQR1uT--Op-5Zo0l0ctAUj5e8FE)
![](https://private-user-images.githubusercontent.com/1711390/289255663-4a6edcf7-1106-4e01-9ae1-9d2150b22954.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMDQ4MTgsIm5iZiI6MTczOTIwNDUxOCwicGF0aCI6Ii8xNzExMzkwLzI4OTI1NTY2My00YTZlZGNmNy0xMTA2LTRlMDEtOWFlMS05ZDIxNTBiMjI5NTQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTYyMTU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWY5NzdiOWZmNmI0YjQ5N2I2ODZiM2Y2M2EwZTIwYjNjODc5ZWEzMWFiNDc3N2M3YTIwNjg4NDZlMjMzZWVmNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.qYfz7Ues_c3ea1ZisR3j-KtDVPGQlpm923uhqxt0AiM)
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.