This Notion integration sends an email whenever the Status of a page in a database is updated. This sample was built using this database template and emails are sent using SendGrid's API.
# Clone this repository locally
git clone https://github.com/makenotion/notion-sdk-js.git
# Switch into this project
cd notion-sdk-js/examples/database-update-send-email
# Install the dependencies
npm install
NOTION_KEY= <your-notion-api-key>
SENDGRID_KEY=<your-sendgrid-api-key>
NOTION_DATABASE_ID=<your-notion-database-id>
EMAIL_TO_FIELD=<email-recipients>
EMAIL_FROM_FIELD=<email-from-field>
You can create your Notion API key here.
You can create your SendGrid API key here.
To create a Notion database that will work with this example, duplicate this template.
node index.js