Automate posting on X (Twitter) from a Google Sheet

How to automate posting on X (Twitter) from a Google Sheet: install the Chrome extension, click Build with Browser agent, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.

Here is how the automation works. To automate posting on X (Twitter) from a Google Sheet, read the posts with Read data from a Google Sheet, loop through them, and for each row open the X compose page, type the post with Enter text, attach the image with Upload a file and click Post. The automation types into the website as you would, then deletes the row so the next post is first.

Author
Alex Barlow
Published

Build the X poster from a description


Describe it and click the button: the agent builds and tests the X poster in your Chrome extension. X needs you signed in, so log in to X in Chrome first.

  1. Read the posts from my X post sheet
  2. Open the X compose page for each row
  3. Type the post and upload its image
  4. Click Post, then delete the row
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

You need a Google Sheet named X post with a tab called Post: one post per row, with a column for the text and a column for the image's path on your computer. Leave the sheet alone while the run posts and deletes the rows.

The video shows the agent building the X poster from the four lines above, in a few minutes.

Build the X poster step by step


The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.

  • 1.0 Read data from a Google Sheet
    • Spreadsheet: your X post sheet
    • Sheet name: Post
  • 2.0 Loop through data
    • repeats for every row in [google-sheet-data]
    • 2.1 Go to page
    • 2.2 Enter text
      • Select text field: the post field on the compose page
      • Text: the text column of [google-sheet-data]
    • 2.3 Upload a file
      • File Input Field: the compose page's image upload field
      • File Path: the image path column of [google-sheet-data]
    • 2.4 Click element
      • Select: the Post button
    • 2.5 Delete rows from a Google Sheet
      • Spreadsheet: your X post sheet
      • Sheet name: Post
      • First row: 1
      • Last row: 1

Common questions about the X poster


Why does the automation open the wrong X page?

The Go to page URL is wrong. Check Enter URL is set to https://twitter.com/compose/tweet.

Why is the post text not typed into X?

The post field has moved or changed. In the Enter text step, click Select text field and select the post field on the compose page again. When a run fails, hand it to the agent and it repairs the step.

Why does the image not upload to X?

The automation cannot read the file. Check the path in the sheet is right and your computer's folder permissions let the file be read.

Why is the X Post button not clicked?

The button's selector has changed. In the Click element step, click Select and select the Post button again.

Why is the posted row not removed from the Google Sheet?

The delete step points at the wrong place. In Delete rows from a Google Sheet, check the sheet, the Post tab and the row range.

How do I test the X poster without publishing a post?

Disable the Click element step that clicks Post, run the automation and check the text and image are filled in on the compose page, then turn the step back on and save.

Can I schedule posts on X from a Google Sheet?

Yes. Save the automation and set a schedule; each run posts the rows in the sheet and deletes them as it goes, so the sheet is the queue. The image path is on your computer, so run it on the desktop app with X logged in there.

Can I post on X without the API?

Yes. The automation types into the X compose page in your browser, as you would, so no API key or developer account is involved.

Where do I get help?

Get in touch with support, or ask in the axiom.ai community. To learn more about the approach, read how to automate social media posts.

Related guides