Back to Autogpt

Ayrshare Post To X

docs/integrations/block-integrations/ayrshare/post_to_x.md

0.6.443.5 KB
Original Source

Ayrshare Post To X

<!-- MANUAL: file_description -->

Blocks for posting tweets and threads to X (Twitter) using the Ayrshare social media management API.

<!-- END MANUAL -->

Post To X

What it is

Post to X / Twitter using Ayrshare

How it works

<!-- MANUAL: how_it_works -->

This block uses Ayrshare's API to publish content to X (formerly Twitter). It supports standard tweets (280 characters, or 25,000 for Premium users), threads, polls, quote tweets, and replies, with up to 4 media attachments including video with subtitles.

The block authenticates through Ayrshare and handles X-specific features like automatic thread breaking using double newlines, thread numbering, per-post media attachments, and long-form video uploads (with approval). Poll options and duration can be configured for engagement posts.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
postThe post text (max 280 chars, up to 25,000 for Premium users). Use @handle to mention users. Use \n\n for thread breaks.strYes
media_urlsOptional list of media URLs. X supports up to 4 images or videos per tweet. Auto-preview links unless media is included.List[str]No
is_videoWhether the media is a videoboolNo
schedule_dateUTC datetime for scheduling (YYYY-MM-DDThh:mm:ssZ)str (date-time)No
disable_commentsWhether to disable commentsboolNo
shorten_linksWhether to shorten linksboolNo
unsplashUnsplash image configurationstrNo
requires_approvalWhether to enable approval workflowboolNo
random_postWhether to generate random post textboolNo
random_media_urlWhether to generate random mediaboolNo
notesAdditional notes for the poststrNo
reply_to_idID of the tweet to reply tostrNo
quote_tweet_idID of the tweet to quote (low-level Tweet ID)strNo
poll_optionsPoll options (2-4 choices)List[str]No
poll_durationPoll duration in minutes (1-10080)intNo
alt_textAlt text for each image (max 1,000 chars each, not supported for videos)List[str]No
is_threadWhether to automatically break post into thread based on line breaksboolNo
thread_numberAdd thread numbers (1/n format) to each thread postboolNo
thread_media_urlsMedia URLs for thread posts (one per thread, use 'null' to skip)List[str]No
long_postForce long form post (requires Premium X account)boolNo
long_videoEnable long video upload (requires approval and Business/Enterprise plan)boolNo
subtitle_urlURL to SRT subtitle file for videos (must be HTTPS and end in .srt)strNo
subtitle_languageLanguage code for subtitles (default: 'en')strNo
subtitle_nameName of caption track (max 150 chars, default: 'English')strNo

Outputs

OutputDescriptionType
errorError message if the operation failedstr
post_resultThe result of the postPostResponse
postThe result of the postPostIds

Possible use case

<!-- MANUAL: use_case -->

Thread Publishing: Automatically format and publish long-form content as numbered thread sequences.

Engagement Polls: Create polls to gather audience feedback or drive interaction with scheduled posting.

Reply Automation: Build workflows that automatically respond to mentions or engage in conversations.

<!-- END MANUAL -->