Skip to main content

Scheduled auto-replies to targeted tweets using X (Twitter) API

Workflow preview

Workflow preview
100%
Scheduled auto-replies to targeted tweets using X (Twitter) API preview
Open on n8n.io

Important notice

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

1. Workflow Overview

What it does This workflow automates your X (Twitter) engagement by acting as an auto responder. It runs on a schedule, searches for new tweets based on a specific query (like a hashtag, keyword, o...

Best for

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

Tools used

n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.scheduletrigger, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Masaki Go.

Original n8n.io source

1.1 Workflow description

Title
Scheduled auto-replies to targeted tweets using X (Twitter) API
Workflow name
Scheduled auto-replies to targeted tweets using X (Twitter) API

What it does

This workflow automates your X (Twitter) engagement by acting as an auto-responder. It runs on a schedule, searches for new tweets based on a specific query (like a hashtag, keyword, or mention), and automatically sends a reply.

How it works

  1. Schedule Trigger: Runs the workflow automatically at your chosen interval (e.g., every 15 minutes).
  2. Search Tweets (HTTP): Uses the X (Twitter) API v2 to find recent tweets matching your search query.
  3. Error & Success Handling:
    • If the search is successful, it proceeds to prepare a reply.
    • It includes error handling for common issues like Rate Limits or if No Tweets are found.
  4. Send Reply (HTTP): Posts the reply to the tweet.
  5. Duplicate Check: Includes logic to check if a reply has already been sent to avoid spamming.

How to set up

  1. Credentials: You must have an X (Twitter) Developer Account (v2). Add your credentials to n8n.
  2. Search Node: In the "Search Tweets" node, update the query parameter with your own search terms (e.g., #n8n or from:username).
  3. Reply Node: In the "Prepare Reply" node, customize the text you want to send.
  4. Activate: Set your desired schedule in the "Schedule Trigger" node and activate the workflow.

Requirements

  • An active n8n instance.
  • An X (Twitter) Developer Account with Elevated (v2) access.
  • X (Twitter) API v2 credentials.

How to customize the workflow

  • Change Schedule: Modify the "Schedule Trigger" to run more or less frequently.
  • Dynamic Replies: Enhance the "Prepare Reply" node with an AI node (like OpenAI) to generate unique replies instead of static text.
  • Add Filters: Add an "IF" node after "Search Tweets" to filter out tweets you don't want to reply to.

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 - Other Error

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

Block 2 - No Tweet Found

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

Block 3 - Is No Tweets?

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

Block 4 - Rate Limit Error

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

Block 5 - Is Rate Limit?

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

Block 6 - Reply Error

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

Block 7 - Already Replied (Skip)

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

Block 8 - Reply Success

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

Block 9 - Is Duplicate?

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

Block 10 - Send Reply (HTTP)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Prepare Reply

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

Block 12 - Is Success?

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

Block 13 - Get Latest Tweet Per Account

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

Block 14 - Search Tweets (HTTP)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - Schedule Trigger (15分ごと)

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

Block 16 - Sticky Note

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 Note1

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

Block 19 - Sticky Note3

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

3. Summary Table

Workflow Scheduled auto-replies to targeted tweets using X (Twitter) API
Complexity advanced
Nodes 19
Categories Social Media
Author Masaki Go
Published 13 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10781/10781.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 Scheduled auto-replies to targeted tweets using X (Twitter) API do?

What it does This workflow automates your X (Twitter) engagement by acting as an auto responder. It runs on a schedule, searches for new tweets based on a specific query (like a hashtag, keyword, o...

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 use case.