Click to deploy to Netlify. Don't forget to add environment variables and redeploy, otherwise the webpage will have no service. Read .env and Third Party API for more details.
This project is for sending notification to oneself.
Seems like a boring useless tool, but I can find some use cases.
The web app has a frontend and backend both written with Nuxt 3.
The frontend is only for development and demo purpose. The useful part is the API.
The API allows you to send message to yourself with both GET and POST requests. With GET request support you can send the message within browser.
The notion integration not only allows you to send message to yourself, but also record the messages in a database.
Think about when you need to send message to yourself using an API.
- A monitor app or CRON job can send automatic notification to yourself.
- Automatic script such as Wifi Password Thief.
- Web Cralwer Notification.
- Transfer message from one device to another using only Browser Address Bar.
- "Leave a Message" or "Contact Form" information can be uploaded to Notion Database (for free).
- Telegram
- Notion
- Slack
- Discord
https://documenter.getpostman.com/view/18849321/UzXKXKdv
.env
file contains the environment variables, sample file is below.
telegramBotToken="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
telegramChatId="xxx"
emailHost="mail.privateemail.com"
emailPort=587
emailFromAddress="xxx"
emailFromPassword="xxx"
emailDefaultToAddress="xxx"
emailFromName="Huakun 💻 Notification System"
notionSecret="secret_xxx"
notionDatabaseId="xxx"
password="xxx"
All env vars needs to be set to enable a service.
For example,
- not setting
password
will disable password checking feature. - not setting
emailFromAddress
will disable email sending feature.
Disabled features will not be displayed in frontend.
How to create a Telegram bot to send yourself messages?
https://core.telegram.org/bots#how-do-i-create-a-bot
Send /newbot
to @BotFater
, and follow the instructions.
Requires a token and a chat id.
https://core.telegram.org/bots/api#sendmessage
fetch(`https://api.telegram.org/bot${token}/sendMessage`, {
method: "post",
body: {
chat_id: chatId,
text: message,
},
});
Send a message to the bot first, then go to https://api.telegram.org/bot<YOUR BOT TOKEN HERE>/getUpdates
to find the chat id.
Later, telegram messages will be sent to this chat.
Notion Database template: https://huakunshen.notion.site/283649af328f4d429e44d75b41f3c06a?v=4961d433abc8473abe1afcb3e5621350
Duplicate the notion database in your own workspace and continue.
- Go to https://www.notion.so/my-integrations
- Click on "Create new integration
- Give "Read", "Update", "Insert" capabilities.
- Integration Type should be "Internal"
- Make a copy of the API Key, save it to
.env
file,notionSecret=<api key>
- Go to the notion table/database, click "Add connection" and select the integration.
- Set email, password and SMPT server address+port in
.env
. - For example, for example, if you want to use gmail
- You may have to use App Password
- The smtp server is
smtp.gmail.com:587