FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
amaan_eth
amaan_ethNew-Tweet-Alert
Remix of socialdata/twitterNewTweetAlert
Public
Like
New-Tweet-Alert
Home
Code
2
README.md
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
2
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
README.md

Twitter/𝕏 - New user tweet alert

SocialData Monitoring API provides an easy way to get nearly real-time notifications when any Twitter user posts a new tweet. Use this Val template to deliver notifications to Discord or Telegram.

Prerequisites

  • SocialData account

Set Up

1. Fork this Val

To use this template, fork this Val in the top right corner of this page.

2. Update Environment Variables

You don't need to change any code - this template works as-is, and only requires a few environment variables in order to deliver your notifications to Discord or Telegram.

Open Val.town environment variables page and create the following variables:

  • DISCORD_WEBHOOK_URL - required when using Discord for notifications
  • TELEGRAM_API_TOKEN - required when using Telegram for notifications
  • TELEGRAM_USER_ID - required when using Telegram for notifications

You don't have to set up both Discord and Telegram at the same time. Either is required for this Val to work, but you may set up both at the same time.

Not sure where to get these? Scroll down to FAQ section below.

3. Create Your Monitor

Open SocialData monitors page and create your monitor. Use your Val URL as the webhook URL of your new monitor:

Adding a monitor - guide

4. Wait for Your Notification

That's it! When the user you are monitoring posts a new tweet - SocialData and val.town will handle the rest and deliver your notification to Discord or Telegram.

FAQs

Where do I get Discord webhook URL?

  1. Follow this guide to create a Discord webhook URL.

Where do I get Telegram bot API token and User ID?

  1. Follow this guide to create your own Telegram bot and obtain it's API token.
  2. Add @userinfobot and the bot will reply with your ID whenever you add it (Click Start or type /start)

Can I use the same Discord / Telegram settings for multiple monitors?

Yes! You can send notifications from multiple monitors and even different monitor types using the same Discord webhook or Telegram bot token.

Check out our other webhook handlers on val.town:

  • New tweet notifications
  • Profile update notifications
  • New followed account notifications

Migrated from folder: MonitoringAPI/twitterNewTweetAlert

Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.