Skip to main content

Automate tweet filtering and replies on X with GPT and scheduled rotation

Workflow preview

Workflow preview
100%
Automate tweet filtering and replies on X with GPT and scheduled rotation preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Automate tweet engagement on X (formerly Twitter) Description Automate professional engagement on X (formerly Twitter) by searching for, filtering, liking, and replying to tweets that match your ke...

Best for

  • Social Media automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.wait, n8n-nodes-base.splitinbatches, n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.twitter, @n8n/n8n-nodes-langchain.openai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jorge Martínez.

Original n8n.io source

1.1 Workflow description

Title
Automate tweet filtering and replies on X with GPT and scheduled rotation
Workflow name
Automate tweet filtering and replies on X with GPT and scheduled rotation

Automate tweet engagement on X (formerly Twitter)

Description

Automate professional engagement on X (formerly Twitter) by searching for, filtering, liking, and replying to tweets that match your key topics. This workflow enables you to engage consistently and efficiently with relevant conversations, using your defined professional role and the power of GPT for filtering and replies. Save time and maintain high-quality interactions, while staying focused on your business or personal brand interests.


How it Works

  1. Rotating Topic Selection The workflow selects one search term from your list on each run, using a rotating index based on the date.

  2. Search Tweets & Extract Essentials Searches X (formerly Twitter) for tweets matching the chosen topic, then extracts only the tweet id and text for further processing.

  3. GPT‑Based Filtering with Role Context Filters tweets based on your role and strict criteria, removing non-English tweets, memes, spam, Grok-generated content, political posts, internships, and more.

  4. Engagement Loop For every filtered tweet, the workflow likes the post, generates a professional, concise reply with GPT (matching language and context), and posts the reply. Wait nodes ensure compliance with Twitter’s API rate limits (can be adjusted for paid API tiers).


Requirements

  • X (Twitter) API credentials (for searching, liking, and replying to tweets)
  • OpenAI API key (for GPT-based steps)

Setup Steps

  1. Obtain your X (Twitter) API credentials.
  2. Obtain your OpenAI API key.
  3. Configure the schedule in the trigger node to your desired frequency (e.g., every 3 days or daily).
  4. Set your list of topics and professional role in the variables node.

How to Customize the Workflow (Optional)

  • Adjust prompts in the GPT nodes to fine-tune filtering and reply style.
  • Upgrade your Twitter API plan to increase request limits and search for more tweets per run.
  • Change tweet processing logic: For high-volume engagement (e.g., analyzing 100+ tweets per run), consider switching to a per-tweet loop for advanced filtering and response handling.

This workflow enables scalable, professional, and targeted engagement on X (formerly Twitter), fully customizable to your audience and objectives.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 3 - Wait1

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 4 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 6 - Set search Terms

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Rotating Slot Index Generator

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - X (Formerly Twitter) Search terms

Type / Role
n8n-nodes-base.twitter - twitter
Config choices
Version 2

Block 9 - GPT Topic Selector

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 10 - Extract Tweets from JSON

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Group Tweets into a Single Array

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - GPT Tweet Response

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 13 - X (Formerly Twitter) Like Tweet

Type / Role
n8n-nodes-base.twitter - twitter
Config choices
Version 2

Block 14 - X (Formerly Twitter) Post Reply

Type / Role
n8n-nodes-base.twitter - twitter
Config choices
Version 2

Block 15 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automate tweet filtering and replies on X with GPT and scheduled rotation
Complexity advanced
Nodes 19
Categories Social Media, Multimodal AI
Author Jorge Martínez
Published 05 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7027/7027.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate tweet filtering and replies on X with GPT and scheduled rotation do?

Automate tweet engagement on X (formerly Twitter) Description Automate professional engagement on X (formerly Twitter) by searching for, filtering, liking, and replying to tweets that match your ke...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, Multimodal AI use case.