Monitor X posts and send each match to Discord once

· the plori team

Build this as a scheduled workflow, not a continuously awake agent. Every 15 minutes it searches X through TwitterAPI.io, uses each tweet ID as a durable deduplication key, and sends only first-seen matches to Discord.

Polling is the right fit for a focused query where a few minutes of delay is fine. For near-real-time alerts or a large account list, use a stream from your data provider instead.

One run, from tick to alert

The search is read-only. The only external write is the final Discord message.

  1. 01

    Schedule

    Start a run

    Every 15 minutes

  2. 02

    Search X

    Read a bounded window

    Latest matches

  3. 03

    Check state

    Use the tweet ID

    First sighting only

  4. 04

    Notify

    Post to one channel

    Discord webhook

What do you need?

  • A plori account.
  • A TwitterAPI.io API key.
  • A Discord server where you can create an incoming webhook.
  • The search query you want to watch. Start narrow enough that every alert is useful.

What prompt should you give plori?

Replace YOUR_QUERY with the search you care about. The final sentence is intentional: it keeps a dry test from turning into a real Discord post before you approve it.

plori prompt
Build a workflow named "X watch to Discord".

Every 15 minutes, search X through the TwitterAPI.io Advanced Search endpoint for YOUR_QUERY. Use Latest results. Query a bounded 20-minute window with since_time and until_time so adjacent runs overlap by five minutes.

For every returned post, use the tweet ID as the durable deduplication key. Only when an ID is seen for the first time, send one Discord webhook message with the author's name, post text, published time, and direct X URL. Do not send anything for IDs already recorded.

Ask me for the TwitterAPI.io and Discord connections through secure credential cards. Never ask me to paste either secret into chat.

Validate the workflow and run a dry test. Show me the fetched sample, the deduplication key, and the message that would be sent. Do not run a live test, write deduplication state, or activate the schedule until I approve.

Why do duplicate alerts stop?

A 20-minute time window controls how much the API reads. It does not prevent duplicates. Adjacent runs overlap by five minutes, retries can repeat a run, and provider results can arrive late.

The tweet ID is the correctness check. plori makes one atomic first-sighting check per workflow: one run records the ID; retries and overlapping runs see it and skip the Discord step. Post text and author names are not safe keys. They repeat.

How do you add the two connections?

When the agent asks, add the TwitterAPI.io key and Discord webhook URL through the secure connection cards. plori stores each secret separately from the workflow definition and injects it only when a run needs it. Do not paste either value into the conversation or hard-code it in a request header.

The X search is a read. The Discord webhook is the external write. That distinction is why a dry test can fetch and shape a sample without posting it to your channel.

How do you test it before activation?

  1. Run validation and fix any missing field or connection.
  2. Run the dry test. Check that the result includes a tweet ID, author, text, time, and direct URL.
  3. Inspect the proposed Discord message. Make sure the query and formatting are useful before any real post.
  4. Approve one live test. Confirm that each first-seen result produces one message and no result produces more than one.
  5. Run it again immediately. Tweet IDs still inside the overlapping window should skip the Discord step; any new ID can notify once.
  6. Only then approve activation of the 15-minute schedule.

What can you change without breaking deduplication?

Change the query, interval, or Discord message whenever you need. Keep the tweet ID as the deduplication key. If you want old posts to alert again, create a new workflow. A normal run should never delete its saved IDs.

Start with one focused query. A broad search makes the channel noisy and spends more provider requests. It does not improve the signal.

When should you use a stream instead?

Use scheduled polling only when a few minutes of delay is acceptable. If seconds matter or you monitor many accounts, switch to a provider stream. This guide does not cover that setup.

Build it in plori

Open plori and paste the prompt. Add credentials only when the secure connection cards ask for them.