Skip to main content

Form-based X/Twitter poster

Workflow preview

Workflow preview
100%
Form-based X/Twitter poster preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Form Based X/Twitter Poster (v2) A user friendly n8n workflow that enables users to submit tweets through a simple web form — with optional image, video, or GIF uploads — and posts them to a con...

Best for

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

Tools used

n8n-nodes-base.formtrigger, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.twitter, n8n-nodes-base.if, n8n-nodes-base.form, 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 Akhil Varma Gadiraju.

Original n8n.io source

1.1 Workflow description

Title
Form-based X/Twitter poster
Workflow name
Form-based X/Twitter poster

🚀 Form-Based X/Twitter Poster (v2)

A user-friendly n8n workflow that enables users to submit tweets through a simple web form — with optional image, video, or GIF uploads — and posts them to a connected X/Twitter account. Designed for ease of use, this workflow handles both media and text-only posts, providing clear feedback upon submission.


🧭 Overview

Workflow Name: Form-Based X/Twitter Poster (v2)
Goal: Provide a web form for users to create tweets, upload optional media, and post directly to X/Twitter.


🛠 How It Works

1. Form Submission Trigger

  • Node: On form submission
  • Type: formTrigger
  • Purpose: Renders a web form for tweet creation.
  • Fields:
    • Post Content: Required textarea for tweet text.
    • Media: Optional file upload (.jpg, .png, .gif, .mp4, etc.).
  • Button: "Submit"
  • Output: JSON with text and binary media (if any).

2. Extract Media Details

  • Node: Extract Media Details
  • Type: code
  • Purpose: Extracts tweet text, checks for media, determines media type.
  • Output Example:
{
  "content": "My tweet!",
  "mime_type": "image/jpeg",
  "media_type": "IMAGE"
}

3. If Media Exists

  • Node: If Media Exists
  • Type: if
  • Purpose: Checks whether media was uploaded.
  • True Path: Media was uploaded.
  • False Path: No media uploaded.

4. Upload Media to X/Twitter (True path only)

  • Node: Upload Media (X)
  • Type: httpRequest
  • Purpose: Uploads media to Twitter via API v1.1.
  • Media Category: TWEET_IMAGE (can be customized)
  • Auth: Twitter OAuth1 API
  • Output: Includes media_id_string

5. Post Tweet with Media (True path)

  • Node: X
  • Type: twitter
  • Purpose: Posts tweet with uploaded media.
  • Auth: Twitter OAuth2 API

6. Post Text-Only Tweet (False path)

  • Node: X1
  • Type: twitter
  • Purpose: Posts tweet without media.
  • Auth: Twitter OAuth2 API

7. Show Confirmation Message

  • Node: End Form
  • Type: form
  • Purpose: Displays thank-you message post-submission.
  • Title: Thank you so much for sharing your experience on X! 🖤
  • Message: We truly appreciate your support and are so glad we could make a positive impact. Your words mean the world to us!

🛠 How to Customize

  • Form Fields: Change form title, labels, help texts, or file formats.
  • Media Logic:
    • Add logic for distinguishing GIF vs VIDEO.
    • Adjust media upload URL dynamically:
      https://upload.twitter.com/1.1/media/upload.json?media_category={{ $json.media_type === 'VIDEO' ? 'TWEET_VIDEO' : ($json.media_type === 'GIF' ? 'TWEET_GIF' : 'TWEET_IMAGE') }}
      
  • Error Handling: Add Error Trigger nodes to catch and manage failures gracefully.
  • Tweet Text: Customize tweet text with extra formatting or default content.
  • Advanced Ideas:
    • Schedule tweets
    • Post to multiple accounts
    • Add content approval steps

🔐 Required Credentials

1. Twitter OAuth1 API

  • Used by: Upload Media (X)
  • Required for: Media upload via v1.1
  • Credentials: Consumer Key, Consumer Secret, Access Token, Access Token Secret
  • Workflow Credential Name: X OAuth - Akhil

2. Twitter OAuth2 API

  • Used by: X, X1
  • Required for: Posting tweets
  • Scopes: tweet.read, tweet.write, users.read, offline.access
  • Workflow Credential Name: X OAuth2 - Akhil

💡 Use Cases

  • Easy Tweet Tool: For non-technical users to share content.
  • Content Approval: Internal review system before posting.
  • Announcements: Quickly broadcast updates.
  • Campaign Posting: Streamline recurring content sharing.

🧑‍💻 Node Naming Suggestions

Old Name Suggested Name
If Image Exists If Media Exists
X Post Tweet with Media
X1 Post Text-Only Tweet

❤️ Made with love by Akhil using n8n

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 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 2 - Extract Media Details

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

Block 3 - Upload Media (X)

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

Block 4 - X

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

Block 5 - If Image Exists

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

Block 6 - X1

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

Block 7 - End Form

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

Block 8 - Sticky Note

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

3. Summary Table

Workflow Form-based X/Twitter poster
Complexity intermediate
Nodes 8
Categories Social Media
Author Akhil Varma Gadiraju
Published 27 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4415/4415.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 Form-based X/Twitter poster do?

Form Based X/Twitter Poster (v2) A user friendly n8n workflow that enables users to submit tweets through a simple web form — with optional image, video, or GIF uploads — and posts them to a con...

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.