Files
tangmo_fxtwitter_bot/Google Apps Script version/README.md
2023-01-20 20:59:52 +00:00

22 lines
990 B
Markdown

# Tangmo FxTwitter Bot (Google Apps Script version)
Telegram bot that monitor for a message containing a Twitter post link and reply with [FxTwitter](https://github.com/FixTweet/FixTweet) link
1. Register Telegram bot
1. Setup Google Apps Script
1. Create a Google Sheets
1. Click Extensions > Apps Script.
1. Paste the code from this repo, click "Save"
1. Go to Project Settings tab
1. Scroll to the bottom, "Script Properties", and add a `TELEGRAM_BOT_TOKEN` property
1. At the top right of the script project, click Deploy > New deployment > Web app. Run as me, anyone can access
1. Copy the webapp URL. It should look like https://script.google.com/macros/s/some-long-id/exec
1. Register Web hook
```sh
curl --request POST \
--url https://api.telegram.org/bot123:bottokenhere/setWebhook \
--header 'Content-Type: application/json' \
--data '{"url": "https://script.google.com/macros/s/some-long-id/exec"}'
```
1. It should work now