https://github.com/mosk53/sms_reminder
Reminder Bot is a simple and convenient way to schedule reminders for yourself or others via SMS. It uses Python, MySQL, and Twilio to fetch, send, and update reminders from a database.
https://github.com/mosk53/sms_reminder
database python reminder sms sql twilio
Last synced: over 1 year ago
JSON representation
Reminder Bot is a simple and convenient way to schedule reminders for yourself or others via SMS. It uses Python, MySQL, and Twilio to fetch, send, and update reminders from a database.
- Host: GitHub
- URL: https://github.com/mosk53/sms_reminder
- Owner: mosk53
- Created: 2023-02-16T16:29:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-12T21:45:29.000Z (over 3 years ago)
- Last Synced: 2025-01-14T10:27:10.583Z (over 1 year ago)
- Topics: database, python, reminder, sms, sql, twilio
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Reminder Bot
The Reminder Bot is a Python script that fetches reminders from a MySQL database, sends them as SMS messages using the Twilio API, and updates the database to indicate that the messages have been sent.
The script operates with three columns: number, message, and called. Whenever it makes a query, it selects an entry and sends the text from the message column to the number in the number column. If this operation is successful, it sets the called column in the row to 0, which ensures that the row will not be displayed in the next query.
## Installation
1. Clone or download this repository.
2. Install the required packages by running the following command:
`pip install -r requirements.txt`
3. Create a `einst.py` file with your Twilio, MySQL, and email credentials.
## Usage
To use the Reminder Bot, run the following command:
`python reminder_bot.py`
The script will run indefinitely, checking the database for reminders once per day. If it encounters an error, it will log the error to a log file and continue running.
## Configuration
The `einst.py` file contains the following configuration parameters:
### Twilio credentials
- `tw_account_sid`: Your Twilio account SID.
- `tw_auth_token`: Your Twilio authentication token.
- `tw_url`: The URL of the Twilio XML file to use for outgoing calls.
- `tw_to`: The phone number to send reminders to.
- `tw_from`: Your Twilio phone number.
- `tw_messaging_service_sid`: The messaging service SID to use for outgoing messages.
### Database credentials
- `db_host`: The host name of your MySQL database.
- `db_user`: The MySQL user name to use.
- `db_password`: The MySQL password to use.
- `db_name`: The name of the MySQL database to use.
### Email credentials
- `e_sender_email`: The email address of the sender.
- `e_receiver_email`: The email address of the recipient.
- `e_password`: The password for the sender's email account.