> For the complete documentation index, see [llms.txt](https://help.blotato.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blotato.com/agent-workflows/agent-workflows/sources.md).

# Extract and repurpose content

Extract source text, verify completion, and separate source extraction from media generation and publication.

Prompt for your assistant:

> Extract the content from this source with Blotato, then adapt it for the social platforms I choose. If a platform needs media, use media I supply or generate a visual before publishing.

## Before starting

Use an [authenticated connection](/api-and-mcp-concepts/authentication.md). Choose `sourceType` explicitly. Use `text` for text or `perplexity-query`, and `url` for article, YouTube, Twitter/X, TikTok, audio, or PDF sources. A URL alone does not choose the source type.

## MCP example

1. Call `blotato_create_source` with the user's source. This example uses supplied text and requires no external source URL.

```json
{
  "sourceType": "text",
  "text": "Our workshop opens on October 15. Registration closes on October 10."
}
```

2. Save the returned `id`. The tool waits internally for up to 20 seconds. If the result is still `queued` or `processing`, call `blotato_get_source_status` with this shape, replacing the example ID.

```json
{"id": "123e4567-e89b-12d3-a456-426614174000"}
```

## REST equivalent

Send the following body to `POST https://backend.blotato.com/v2/source-resolutions-v3` with `blotato-api-key: YOUR_API_KEY` and `Content-Type: application/json`. REST nests the source fields. MCP does not.

```json
{
  "source": {
    "sourceType": "text",
    "text": "Our workshop opens on October 15. Registration closes on October 10."
  }
}
```

A `201` response contains the job ID, not extracted content:

```json
{"id": "123e4567-e89b-12d3-a456-426614174000"}
```

Read `GET /v2/source-resolutions-v3/123e4567-e89b-12d3-a456-426614174000` with the same authentication header. A completed response has this shape. The title and content below are illustrative, not guaranteed output text.

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "completed",
  "title": "Workshop dates",
  "content": "Our workshop opens on October 15. Registration closes on October 10."
}
```

## Completion and recovery

1. Wait at least 10 seconds between status requests for an unfinished job. Use a bounded wait, such as 2 minutes, then report the saved ID and pending state. This is a client wait budget, not a service completion promise.
2. On `completed`, use the returned `content` and `title`. Do not treat an accepted ID as extracted content. If MCP content ends with `[output truncated]`, it is not the full extraction. Use the REST lookup with the same ID when your client has an authorized API connection, or disclose the incomplete content. Repeated MCP lookups do not paginate the text.
3. On REST or MCP status lookup `failed`, inspect `message`. The MCP create tool reports extraction failure through `isError` with the source ID, while the status tool returns a `failed` status in its JSON result. Check both the tool error flag and the operation status. Correct the source or access problem before another extraction attempt.
4. After a timeout, look up the saved ID instead of submitting another extraction. If no ID was received, report the uncertain outcome before retrying.
5. Adapt the content to the user's request. Stop after returning the content for an extraction-only request. For publication, use existing media, or omit media for text-only posts supported by the selected platform. [Create a visual](/agent-workflows/agent-workflows/visuals.md) only when new media is requested. Follow [Publish and verify](/agent-workflows/agent-workflows/publish.md) with the user's publication approval.

Extraction produces source content. It does not itself download a reusable social video or publish a post. An Instagram caption without an image or video is insufficient for publishing.

See [Create Source](/rest-api-reference/create-source.md) and [Get Source](/rest-api-reference/create-source/get-source.md) for source-specific requirements and errors.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.blotato.com/agent-workflows/agent-workflows/sources.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
