alexeygrigorev / zapier-telegram-bot

Telegram bot that sends messages to Zapier and other webhooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zapier Telegram Bot

Telegram bot that sends messages to Zapier and other webhooks

Copy .envrc_template to .envrc and replace the TODOs.

Next, either use direnv or evaluate the content of .envrc:

eval $(cat .envrc)

Bot listener

Start the bot in the listener mode:

python main.py

Send it messages or use the /todo command in groups. It will forward the request to Zapier where you can do everything you want

Scheduled messages

For recurring tasks, you can use cron for scheduling them.

Copy message_templates.json to messages.json and edit it.

Then you can send messages:

./send.sh message_id

For scheduling it with cron, use crontab:

crontab -e

And add:

0 5 * * WED /home/ubuntu/zapier-telegram-bot/send.sh newsletter_wednesday_reminder

Example of messages.json:

{
    "newsletter_wednesday_reminder": {
        "message": "Prepare a newsletter for the next week!",
        "chat_id": -12345
    },
    "template": "New TODO item added:\n\n{message}"
}

Moving "DONE" items to another sheet

If you use Google Sheets for managing your todos, check todo.js for the code for moving done items from the "todo" sheet to "done" sheet.

About

Telegram bot that sends messages to Zapier and other webhooks


Languages

Language:Python 61.8%Language:JavaScript 34.5%Language:Shell 3.7%