Twitter / X
Draft tweets into a reviewable AutessaDB table, publish approved drafts to X, pull the account's existing tweets into the same table, and read engagement metrics per tweet.
Every tool on this page requires a Twitter/X connector (see
Connectors); pass its ID as connectorId. Tweets
live as rows in an AutessaDB table the connector provisions: agent-written
drafts start at status = DRAFT, publishing flips the row to PUBLISHED and
records the tweet_id, and the sync tool imports tweets posted outside
Autessa so the table stays the single picture of the account.
Create a draft TOOLTWITTER_CREATE_DRAFT
Inserts a new draft row with status = DRAFT — nothing is posted to X yet.
tweetContent is capped at 280 characters, and the optional mediaUrl
image is stored on the row and only uploaded to X at publish time. Returns
the new recordId for use with the update, publish, and stats tools.
Example
{
"toolType": "TWITTER_CREATE_DRAFT",
"connectorId": "V1StGXR8Z5",
"tweetContent": "@@{TWEET_CONTENT}",
"mediaUrl": "@@{IMAGE_URL}"
}
connectorId in the tool configuration.Configuration fields
- Name
connectorId- Type
- string (ID)
- Description
- Required string (ID) value. References a connector by ID.
- Name
tweetContent- Type
- string
- Description
- Max 280 characters
- Name
mediaUrl- Type
- string · optional
- Description
- Optional - URL of image to attach
Update a draft TOOLTWITTER_UPDATE_DRAFT
Edits an existing draft row in place; tweetContent (still max 280
characters) and mediaUrl are both optional and only the provided fields
change. This edits the AutessaDB row only — it cannot modify a tweet that
has already been published.
Example
{
"toolType": "TWITTER_UPDATE_DRAFT",
"connectorId": "V1StGXR8Z5",
"recordId": 42,
"tweetContent": "@@{REVISED_TWEET}"
}
connectorId in the tool configuration.Configuration fields
- Name
connectorId- Type
- string (ID)
- Description
- Required string (ID) value. References a connector by ID.
- Name
recordId- Type
- integer
- Description
- AutessaDB record ID of the draft to update
- Name
tweetContent- Type
- string · optional
- Description
- New content (optional - only updates if provided, max 280 chars)
- Name
mediaUrl- Type
- string · optional
- Description
- New image URL (optional - only updates if provided)
Publish a tweet TOOLTWITTER_PUBLISH_TWEET
Reads the draft row, uploads its media if a media_url is set, and posts
the tweet to the connected X account. The row must still be in DRAFT
status — republishing fails with ALREADY_PUBLISHED. On success the row is
updated to status = PUBLISHED with the new tweet_id stored for later
stats lookups.
Example
{
"toolType": "TWITTER_PUBLISH_TWEET",
"connectorId": "V1StGXR8Z5",
"recordId": 42
}
connectorId in the tool configuration.Configuration fields
- Name
connectorId- Type
- string (ID)
- Description
- Required string (ID) value. References a connector by ID.
- Name
recordId- Type
- integer
- Description
- AutessaDB record ID of the draft to publish
Get tweet stats TOOLTWITTER_GET_TWEET_STATS
Looks up the tweet_id on a published row and fetches live engagement
metrics from the X API: likes, retweets, replies, quotes, bookmarks, and
impressions, plus URL clicks and profile clicks when the account has access
to non-public metrics. When impressions are available the tool also computes
totalEngagements and an engagementRate percentage, and it returns a
direct tweetUrl to the post.
Example
{
"toolType": "TWITTER_GET_TWEET_STATS",
"connectorId": "V1StGXR8Z5",
"recordId": 42
}
connectorId in the tool configuration.Configuration fields
- Name
connectorId- Type
- string (ID)
- Description
- Required string (ID) value. References a connector by ID.
- Name
recordId- Type
- integer
- Description
- AutessaDB record ID to get tweet_id from
Get all tweets TOOLTWITTER_GET_ALL_TWEETS
Lists rows from the connector's tweets table — drafts and published tweets
together by default, or filtered with status (DRAFT, PUBLISHED,
SCHEDULED). pageSize defaults to 50 and caps at 100. This reads the
AutessaDB table, so it reflects synced tweets as well as agent-created ones.
Example
{
"toolType": "TWITTER_GET_ALL_TWEETS",
"connectorId": "V1StGXR8Z5",
"status": "DRAFT",
"pageSize": 50
}
connectorId in the tool configuration.Configuration fields
- Name
connectorId- Type
- string (ID)
- Description
- Required string (ID) value. References a connector by ID.
- Name
status- Type
- string · optional
- Description
- Optional - filter by status: DRAFT, PUBLISHED, SCHEDULED
- Name
pageSize- Type
- integer · optional
- Description
- Optional - max tweets to retrieve (default 50, max 100)
Get tweet by ID TOOLTWITTER_GET_TWEET_BY_ID
Fetches a single row from the tweets table by its AutessaDB rowId,
returning the tweet's content, status, media URL, and stored tweet_id.
Use it to inspect one specific draft or published tweet without paging
through the full list.
Example
{
"toolType": "TWITTER_GET_TWEET_BY_ID",
"connectorId": "V1StGXR8Z5",
"rowId": 42
}
connectorId in the tool configuration.Configuration fields
- Name
connectorId- Type
- string (ID)
- Description
- Required string (ID) value. References a connector by ID.
- Name
rowId- Type
- integer
- Description
- Required - the AutessaDB row ID of the tweet to fetch
Sync tweets TOOLTWITTER_SYNC_TWEETS
Imports the connected account's timeline from the X API into the AutessaDB
table as PUBLISHED rows, skipping tweets that are already present. Results
are cached for 24 hours — a second sync inside that window returns the
cached summary unless forceRefresh is true. Large backfills that exceed
the execution window continue as a background job (backgroundJob: true in
the response); the summary reports syncedCount, newTweetsCount, and
skippedCount.
Example
{
"toolType": "TWITTER_SYNC_TWEETS",
"connectorId": "V1StGXR8Z5",
"forceRefresh": false
}
connectorId in the tool configuration.Configuration fields
- Name
connectorId- Type
- string (ID)
- Description
- Required string (ID) value. References a connector by ID.
- Name
forceRefresh- Type
- boolean · optional
- Description
- Optional: bypass daily cache if true