Back to Templates
This workflow uses an n8n Form trigger and the X (Twitter) API to publish a text-only post or a post with a single uploaded image, then returns a success/error payload including the resulting tweet URL.
POST /2/tweets endpoint.POST /2/media/upload, extracts the returned media ID, and creates the post with that media attached via POST /2/tweets.tweet.read tweet.write users.read offline.access media.write and apply it to all X HTTP requests in the workflow.x-content-scheduler-free and use it to open the “Post to X” form for publishing.GET /2/users/me to confirm the credential is connected to the correct X account.