Feel free to fork this and modify the src/tweets.ts
file to format the tweets to your liking. Enjoy!
You can easily run this at render.com at the free tier
Note: Twitter's API only allows for 50 Tweets to be sent per day on the free tier
Install ngrok or your own local web service engine to
- Copy
.env.local.example
and paste, removing.example
from the file name - Populate the
ALPHABOT_API_KEY
in the new file with your value from your Alphabot profile or Team Page - Copy your team's ID from the end of the Team Page URL. It will look like
6259d10fd0728949c4ac0520
. Paste this into theALPHABOT_TEAM_ID
value. - Run
ngrok http 8080
in another terminal, after setting up a free ngrok account (or your choice of localhost tunneling services) to make your webhook a public URL on the internet. (Ignore this step if you're running at render.com, vercel, heroku, etc) - Copy the Forwarding url (should end with .ngrok-free.app - or your public url if running in the cloud) and paste it into your Webhook url in your Alphabot profile
- Activate the Twitter account you wish to tweet from as a Developer account at https://developer.twitter.com and set up a project + app
- Click to the "Keys & Tokens" tab
- You will need to populate the
TWITTER_
env variables in your.env.local
file with the corresponding keys from this page.
Run yarn && yarn build && yarn start
to start running the app.
You are now receiving Alphabot webhooks and sending tweets when your team's raffles are created. Congratulations!