Skip to main content

Threads

Draft Threads posts — up to 500 characters with an optional image — into a reviewable AutessaDB table, publish approved drafts through Threads' container flow, sync the account's existing posts, and read per-post engagement.

Every tool on this page requires a Threads connector (see Connectors); pass its ID as connectorId. Posts live as rows in an AutessaDB table the connector provisions: drafts start at status = DRAFT, and publishing runs Threads' container flow (create the media container, wait for processing, then publish) before flipping the row to PUBLISHED with the threads_post_id stored. The sync tool imports posts published outside Autessa so the table stays the single picture of the account.

Create a draft TOOLTHREADS_CREATE_DRAFT​

Inserts a new draft row with status = DRAFT — nothing is posted to Threads yet. postContent is capped at 500 characters, and the optional mediaUrl image is stored on the row and only sent to Threads at publish time. Returns the new recordId (plus a characterCount) for use with the update, publish, and stats tools.

Example​

Tool config
{
"toolType": "THREADS_CREATE_DRAFT",
"connectorId": "V1StGXR8Z5",
"postContent": "@@{POST_CONTENT}",
"mediaUrl": "@@{IMAGE_URL}"
}
This tool type requires a connected external account. Pass the connector's ID as connectorId in the tool configuration.

Configuration fields

  • Name
    connectorId
    Type
    string (ID)
    Description
    Required string (ID) value. References a connector by ID.
  • Name
    postContent
    Type
    string
    Description
    Max 500 characters
  • Name
    mediaUrl
    Type
    string · optional
    Description
    Optional - URL of image to attach

Update a draft TOOLTHREADS_UPDATE_DRAFT​

Edits an existing draft row in place; postContent (still max 500 characters) and mediaUrl are both optional and only the provided fields change. Only rows still in DRAFT status can be updated — anything else fails with NOT_A_DRAFT, since a post already on Threads cannot be edited from here.

Example​

Tool config
{
"toolType": "THREADS_UPDATE_DRAFT",
"connectorId": "V1StGXR8Z5",
"recordId": 42,
"postContent": "@@{REVISED_POST}"
}
This tool type requires a connected external account. Pass the connector's ID as 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
    postContent
    Type
    string · optional
    Description
    New content (optional - only updates if provided, max 500 chars)
  • Name
    mediaUrl
    Type
    string · optional
    Description
    New image URL (optional - only updates if provided)

Publish a post TOOLTHREADS_PUBLISH_POST​

Reads the draft row and runs Threads' two-step publish: it creates a media container, polls every 5 seconds (up to 60 seconds — TIMEOUT after that, CONTAINER_ERROR if Threads rejects the media) until the container is ready, then publishes it. The row must still be in DRAFT status — republishing fails with ALREADY_PUBLISHED. On success the row is updated to status = PUBLISHED with the threads_post_id stored, and the response includes a direct postUrl.

Example​

Tool config
{
"toolType": "THREADS_PUBLISH_POST",
"connectorId": "V1StGXR8Z5",
"recordId": 42
}
This tool type requires a connected external account. Pass the connector's ID as 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 post stats TOOLTHREADS_GET_POST_STATS​

Looks up the threads_post_id on a published row and fetches live insights from the Threads API: views, likes, replies, reposts, and quotes. When views are available the tool also computes totalEngagements and an engagementRate percentage, and it returns a direct postUrl to the post. Only works for rows in PUBLISHED status.

Example​

Tool config
{
"toolType": "THREADS_GET_POST_STATS",
"connectorId": "V1StGXR8Z5",
"recordId": 42
}
This tool type requires a connected external account. Pass the connector's ID as 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 threads_post_id from

Get all posts TOOLTHREADS_GET_ALL_POSTS​

Lists rows from the connector's posts table — drafts and published posts 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 posts as well as agent-created ones.

Example​

Tool config
{
"toolType": "THREADS_GET_ALL_POSTS",
"connectorId": "V1StGXR8Z5",
"status": "DRAFT",
"pageSize": 50
}
This tool type requires a connected external account. Pass the connector's ID as 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 posts to retrieve (default 50, max 100)

Get post by ID TOOLTHREADS_GET_POST_BY_ID​

Fetches a single row from the posts table by its AutessaDB rowId, returning the post's content, status, media URL, and stored threads_post_id. Use it to inspect one specific draft or published post without paging through the full list.

Example​

Tool config
{
"toolType": "THREADS_GET_POST_BY_ID",
"connectorId": "V1StGXR8Z5",
"rowId": 42
}
This tool type requires a connected external account. Pass the connector's ID as 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 post to fetch

Sync posts TOOLTHREADS_SYNC_POSTS​

Imports the connected account's recent posts (up to 50 per sync) from the Threads API into the AutessaDB table as PUBLISHED rows, skipping posts that are already present. Results are cached for 24 hours — a second sync inside that window returns the cached summary unless forceRefresh is true. The summary reports syncedCount, newPostsCount, and skippedCount.

Example​

Tool config
{
"toolType": "THREADS_SYNC_POSTS",
"connectorId": "V1StGXR8Z5",
"forceRefresh": false
}
This tool type requires a connected external account. Pass the connector's ID as 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