Files
AutoGPT/docs/integrations/ayrshare/post_to_x.md
Nicholas Tindle c1a1767034 feat(docs): Add block documentation auto-generation system (#11707)
- Add generate_block_docs.py script that introspects block code to
generate markdown
- Support manual content preservation via <!-- MANUAL: --> markers
- Add migrate_block_docs.py to preserve existing manual content from git
HEAD
- Add CI workflow (docs-block-sync.yml) to fail if docs drift from code
- Add Claude PR review workflow (docs-claude-review.yml) for doc changes
- Add manual LLM enhancement workflow (docs-enhance.yml)
- Add GitBook configuration (.gitbook.yaml, SUMMARY.md)
- Fix non-deterministic category ordering (categories is a set)
- Add comprehensive test suite (32 tests)
- Generate docs for 444 blocks with 66 preserved manual sections

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

<!-- Clearly explain the need for these changes: -->

### Changes 🏗️

<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] Extensively test code generation for the docs pages



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Introduces an automated documentation pipeline for blocks and
integrates it into CI.
> 
> - Adds `scripts/generate_block_docs.py` (+ tests) to introspect blocks
and generate `docs/integrations/**`, preserving `<!-- MANUAL: -->`
sections
> - New CI workflows: **docs-block-sync** (fails if docs drift),
**docs-claude-review** (AI review for block/docs PRs), and
**docs-enhance** (optional LLM improvements)
> - Updates existing Claude workflows to use `CLAUDE_CODE_OAUTH_TOKEN`
instead of `ANTHROPIC_API_KEY`
> - Improves numerous block descriptions/typos and links across backend
blocks to standardize docs output
> - Commits initial generated docs including
`docs/integrations/README.md` and many provider/category pages
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
631e53e0f6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 07:03:19 +00:00

3.5 KiB

Ayrshare Post To X

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

Post To X

What it is

Post to X / Twitter using Ayrshare

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.

Inputs

Input Description Type Required
post The post text (max 280 chars, up to 25,000 for Premium users). Use @handle to mention users. Use \n\n for thread breaks. str Yes
media_urls Optional 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_video Whether the media is a video bool No
schedule_date UTC datetime for scheduling (YYYY-MM-DDThh:mm:ssZ) str (date-time) No
disable_comments Whether to disable comments bool No
shorten_links Whether to shorten links bool No
unsplash Unsplash image configuration str No
requires_approval Whether to enable approval workflow bool No
random_post Whether to generate random post text bool No
random_media_url Whether to generate random media bool No
notes Additional notes for the post str No
reply_to_id ID of the tweet to reply to str No
quote_tweet_id ID of the tweet to quote (low-level Tweet ID) str No
poll_options Poll options (2-4 choices) List[str] No
poll_duration Poll duration in minutes (1-10080) int No
alt_text Alt text for each image (max 1,000 chars each, not supported for videos) List[str] No
is_thread Whether to automatically break post into thread based on line breaks bool No
thread_number Add thread numbers (1/n format) to each thread post bool No
thread_media_urls Media URLs for thread posts (one per thread, use 'null' to skip) List[str] No
long_post Force long form post (requires Premium X account) bool No
long_video Enable long video upload (requires approval and Business/Enterprise plan) bool No
subtitle_url URL to SRT subtitle file for videos (must be HTTPS and end in .srt) str No
subtitle_language Language code for subtitles (default: 'en') str No
subtitle_name Name of caption track (max 150 chars, default: 'English') str No

Outputs

Output Description Type
error Error message if the operation failed str
post_result The result of the post PostResponse
post The result of the post PostIds

Possible 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.