Back to Autogpt

Twitter Retweet

docs/integrations/block-integrations/twitter/retweet.md

0.6.444.8 KB
Original Source

Twitter Retweet

<!-- MANUAL: file_description -->

Blocks for retweeting and getting retweet information on Twitter/X.

<!-- END MANUAL -->

Twitter Get Retweeters

What it is

This block gets information about who has retweeted a tweet.

How it works

<!-- MANUAL: how_it_works -->

This block queries the Twitter API v2 to retrieve a paginated list of users who have retweeted a specific tweet. Results include user IDs, usernames, display names, and optionally expanded profile data.

The block uses Tweepy with OAuth 2.0 authentication. Users are returned with pagination support for tweets with many retweets. Expansions can include pinned tweet data for each user who retweeted.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
expansionsChoose what extra information you want to get with user data. Currently only 'pinned_tweet_id' is available to see a user's pinned tweet.UserExpansionsFilterNo
tweet_fieldsSelect what tweet information you want to see in pinned tweets. This only works if you select 'pinned_tweet_id' in expansions above.TweetFieldsFilterNo
user_fieldsSelect what user information you want to see, like username, bio, profile picture, etc.TweetUserFieldsFilterNo
tweet_idID of the tweet to get retweeters forstrYes
max_resultsMaximum number of results per page (1-100)intNo
pagination_tokenToken for paginationstrNo

Outputs

OutputDescriptionType
errorError message if the operation failedstr
idsList of user ids who retweetedList[Any]
namesList of user names who retweetedList[Any]
usernamesList of user usernames who retweetedList[Any]
next_tokenToken for next page of resultsstr
dataComplete Tweet dataList[Dict[str, Any]]
includedAdditional data that you have requested (Optional) via Expansions fieldDict[str, Any]
metaProvides metadata such as pagination info (next_token) or result countsDict[str, Any]

Possible use case

<!-- MANUAL: use_case -->

Reach Analysis: Identify who is amplifying your content to understand your audience's network.

Influencer Identification: Find influential users who retweet your content for potential partnerships.

Campaign Tracking: Monitor retweets during campaigns to measure virality and engagement.

<!-- END MANUAL -->

Twitter Remove Retweet

What it is

This block removes a retweet on Twitter.

How it works

<!-- MANUAL: how_it_works -->

This block uses the Twitter API v2 via Tweepy to remove a retweet from the authenticated user's account. The original tweet remains unaffected—only your retweet is removed.

The block authenticates using OAuth 2.0 with tweet write permissions and sends a DELETE request to undo the retweet. Returns a success indicator confirming the retweet was removed.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
tweet_idID of the tweet to remove retweetstrYes

Outputs

OutputDescriptionType
errorError message if the operation failedstr
successWhether the retweet was successfully removedbool

Possible use case

<!-- MANUAL: use_case -->

Content Curation: Remove retweets that are no longer relevant or that you no longer want to amplify.

Account Cleanup: Undo accidental retweets or clean up your timeline.

Brand Alignment: Remove retweets of content that no longer aligns with your messaging or values.

<!-- END MANUAL -->

Twitter Retweet

What it is

This block retweets a tweet on Twitter.

How it works

<!-- MANUAL: how_it_works -->

This block uses the Twitter API v2 via Tweepy to retweet a tweet on behalf of the authenticated user. The retweet shares the original tweet with your followers without adding commentary.

The block authenticates using OAuth 2.0 with tweet write permissions and sends a POST request to create the retweet. Returns a success indicator confirming the retweet was created.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
tweet_idID of the tweet to retweetstrYes

Outputs

OutputDescriptionType
errorError message if the operation failedstr
successWhether the retweet was successfulbool

Possible use case

<!-- MANUAL: use_case -->

Content Amplification: Automatically retweet content from partner accounts or industry news sources.

Community Engagement: Retweet positive mentions or user-generated content to show appreciation.

Information Sharing: Amplify important announcements or breaking news to your followers.

<!-- END MANUAL -->