Skip to main content

Schedule X posts, threads, images and polls with webhooks

Workflow preview

Workflow preview
100%
Schedule X posts, threads, images and polls with webhooks preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts a...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.switch, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.set, n8n-nodes-base.respondtowebhook

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Schedule X posts, threads, images and polls with webhooks
Workflow name
Schedule X posts, threads, images and polls with webhooks

Quick overview

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credential connection test, returning a consistent JSON success/error response to the caller.

How it works

  1. Receives a POST webhook request containing a request type and payload from the scheduling calendar.
  2. Routes the request by body.type to create a single X post, publish an X thread, delete an X post, run an X credential test, or return an unknown-type error.
  3. For single posts, validates the payload (including blocking invalid polls or mixed poll-plus-media), then posts either a text-only tweet, a poll tweet, or a tweet with uploaded media.
  4. For media posts, uploads base64-encoded images/videos to X using INIT/APPEND/FINALIZE, polls X until processing completes when required, and then publishes the tweet with the returned media_ids.
  5. For threads, posts the first tweet, then posts each subsequent tweet as a reply to the previous tweet ID to keep the chain intact, and returns the list of tweet IDs and URLs.
  6. For delete requests and connection tests, calls X’s delete-tweet endpoint or GET /2/users/me and returns a structured success or error payload.
  7. Responds to the webhook with a standardized JSON result including success, IDs/URLs when available, or an error code and message.

Setup

  1. Create an X Developer app with OAuth 2.0 user-context access and required permissions for posting and media uploads.
  2. In n8n, add an OAuth2 API credential for X with scopes tweet.read tweet.write users.read offline.access media.write and select it on all X HTTP Request steps.
  3. Activate the workflow, copy the Webhook Trigger Production URL, and configure your content calendar (for example, the included index.html) to send POST requests to that URL with the expected body.type values.

Requirements

  • x.com api app oauth2 credentials (pay as you go)

Additional info

This workflow is tested and works with the include index.html calendar frontend ui.

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 - Sticky Note

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

Block 2 - Sticky Note1

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

Block 3 - Sticky Note2

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

Block 4 - Sticky Note3

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

Block 5 - Sticky Note4

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

Block 6 - Sticky Note5

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

Block 7 - Sticky Note6

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

Block 8 - Sticky Note7

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

Block 9 - Sticky Note8

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

Block 10 - Sticky Note9

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

Block 11 - Sticky Note10

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

Block 12 - Sticky Note11

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

Block 13 - Sticky Note12

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

Block 14 - Sticky Note13

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

Block 15 - Sticky Note14

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

Block 16 - Sticky Note15

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

Block 17 - Sticky Note16

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

Block 18 - Sticky Note17

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

Block 19 - Sticky Note18

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

Block 20 - When Webhook Received

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 21 - Route by Content Type

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

Block 22 - Prepare Post Content

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

Block 23 - Delete Tweet from X

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

Block 24 - If Tweet Deleted Successfully

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

Showing the first 24 of 73 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Schedule X posts, threads, images and polls with webhooks
Complexity advanced
Nodes 73
Categories Social Media
Author Jesse Lane
Published 02 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16066/16066.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 Schedule X posts, threads, images and polls with webhooks do?

Quick overview This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts a...

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.