> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deepvista.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up an X Posting Workflow and Post It with Buffer CLI

> Generate an X posting workflow from a single prompt, extend it in plain language, and publish approved drafts to X using the Buffer CLI.

## Overview

By the end, DeepVista will research, draft, and hold X posts for your review, then publish them for you — from a single prompt, with no manual scheduling.

DeepVista can turn one well-structured prompt into a complete X posting workflow: it researches source content, drafts post variants in your brand voice, holds them for your review, and publishes to your chosen channel. This tutorial walks through generating the workflow, adding a step, and publishing to X with the [Buffer CLI](https://cli.deepvista.ai).

## Prerequisites

Before you start, make sure you have:

1. A DeepVista account with an active project
2. A source of content to draw from (a URL, newsletter, or content type)
3. The Buffer CLI installed and authenticated, with your X (Twitter) channel connected in Buffer

## Step-by-step guide

<Steps>
  <Step title="Generate the workflow with one prompt">
    Paste the following prompt into DeepVista chat:

    ```text theme={null}
    Create an X posting workflow for my company.
    ```

    <Tip>
      Add a line defining the themes you want the workflow to prioritize, such as AI/ML, fundraising, GTM, or technical deep-dives. This sharpens what the research step surfaces.
    </Tip>

    DeepVista generates the full workflow from this prompt. Every draft pauses for your review before anything is published.

    DeepVista automatically searches your company context to create a personalized workflow.

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/B_N3lgYV20FvQiS8/images/x-post-workflow/generate-workflow-prompt.png?fit=max&auto=format&n=B_N3lgYV20FvQiS8&q=85&s=8d2b1637d4bda72d1eae0d68473fa1e9" alt="DeepVista generating a workflow from a single prompt" width="1581" height="681" data-path="images/x-post-workflow/generate-workflow-prompt.png" />
    </Frame>

    The workflow appears in the chat output. Click it to open the full workflow in the right panel.

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/B_N3lgYV20FvQiS8/images/x-post-workflow/workflow-chat-output.png?fit=max&auto=format&n=B_N3lgYV20FvQiS8&q=85&s=c1db3c8e8f17df95093d434f6a7ad5b7" alt="Workflow card in the chat output" width="1270" height="951" data-path="images/x-post-workflow/workflow-chat-output.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/B_N3lgYV20FvQiS8/images/x-post-workflow/workflow-right-panel.png?fit=max&auto=format&n=B_N3lgYV20FvQiS8&q=85&s=009ead4f375b0434491db5a2c511e06f" alt="Full workflow displayed in the right panel" width="1403" height="1233" data-path="images/x-post-workflow/workflow-right-panel.png" />
    </Frame>
  </Step>

  <Step title="Add a step in plain language">
    You can extend the workflow at any time. Open chat and describe the new step using this pattern:

    ```text theme={null}
    Add a step after [existing step] that [does what].
    ```

    For example:

    ```text theme={null}
    Add a step after "Draft review" that publishes the approved
    draft to X using the Buffer CLI.
    ```

    DeepVista handles the technical wiring. You only describe the step.

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/B_N3lgYV20FvQiS8/images/x-post-workflow/add-step-plain-language.png?fit=max&auto=format&n=B_N3lgYV20FvQiS8&q=85&s=6b15f633a1bac974f08e5d6f2e904a6c" alt="Adding a workflow step in plain language" width="1404" height="1229" data-path="images/x-post-workflow/add-step-plain-language.png" />
    </Frame>
  </Step>

  <Step title="Post to X with the Buffer CLI">
    First, find the channel ID for your connected X account:

    ```bash theme={null}
    buffer channels list --fields 'items.{id,service,name}' --output json
    ```

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/ImhDWiBZunl8JMaZ/images/x-post-workflow/buffer-channels-list.png?fit=max&auto=format&n=ImhDWiBZunl8JMaZ&q=85&s=15be57ebc9e35c2326d8025bd7b52b55" alt="Listing Buffer channels to find the X channel ID" width="900" height="206" data-path="images/x-post-workflow/buffer-channels-list.png" />
    </Frame>

    Then tell DeepVista which channel to publish to. Tell DeepVista:

    ```text theme={null}
    Publish approved drafts to X using the Buffer CLI, channel ID:
    [paste your channel ID]
    ```

    DeepVista wires the publish step to build a Buffer payload and validate it before sending:

    ```bash theme={null}
    buffer posts create --json "$payload" --dry-run
    ```

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/ImhDWiBZunl8JMaZ/images/x-post-workflow/buffer-posts-create-dry-run.png?fit=max&auto=format&n=ImhDWiBZunl8JMaZ&q=85&s=00ed1da727c57cb3e484cadfaf6c9970" alt="Dry-running the Buffer post payload before publishing" width="900" height="226" data-path="images/x-post-workflow/buffer-posts-create-dry-run.png" />
    </Frame>

    <Tip>
      `--dry-run` validates the payload with no API call — DeepVista runs this check on every draft before the real publish, so a malformed post never reaches X.
    </Tip>

    Once the dry run passes, the workflow sends the real request:

    ```bash theme={null}
    buffer posts create --json "$payload" --output json
    ```

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/ImhDWiBZunl8JMaZ/images/x-post-workflow/buffer-posts-create.png?fit=max&auto=format&n=ImhDWiBZunl8JMaZ&q=85&s=8ac772e6a9a4f57e8b9475c2d3166e49" alt="Buffer CLI publishing the approved draft to X" width="900" height="246" data-path="images/x-post-workflow/buffer-posts-create.png" />
    </Frame>
  </Step>

  <Step title="Run the workflow">
    Click the **Run** button to trigger the workflow.

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/B_N3lgYV20FvQiS8/images/x-post-workflow/run-button.png?fit=max&auto=format&n=B_N3lgYV20FvQiS8&q=85&s=e1cff61ba6ec652ff1b84314d857ca90" alt="Run button on the workflow panel" width="632" height="113" data-path="images/x-post-workflow/run-button.png" />
    </Frame>

    DeepVista populates a predefined prompt that starts the run.

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/B_N3lgYV20FvQiS8/images/x-post-workflow/run-predefined-prompt.png?fit=max&auto=format&n=B_N3lgYV20FvQiS8&q=85&s=0e8665b15bc2ee3cdd331caa43def376" alt="Predefined prompt that triggers the workflow" width="643" height="143" data-path="images/x-post-workflow/run-predefined-prompt.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/B_N3lgYV20FvQiS8/images/x-post-workflow/run-in-progress.png?fit=max&auto=format&n=B_N3lgYV20FvQiS8&q=85&s=de82e98bffa78f9170e2435c826d05bd" alt="Workflow run in progress" width="653" height="938" data-path="images/x-post-workflow/run-in-progress.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/deepvistainc/B_N3lgYV20FvQiS8/images/x-post-workflow/run-output.png?fit=max&auto=format&n=B_N3lgYV20FvQiS8&q=85&s=ed151c3249ebc381a08b916d96cffcaf" alt="Workflow run output with draft for review" width="639" height="404" data-path="images/x-post-workflow/run-output.png" />
    </Frame>

    Once you approve the draft, the workflow publishes it to X via the Buffer CLI.
  </Step>
</Steps>

## Next steps

Explore more tutorials in the DeepVista documentation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.