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.
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.
- Read the posts from my X post sheet
- Open the X compose page for each row
- Type the post and upload its image
- Click Post, then delete the row
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 SheetSpreadsheet: your X post sheetSheet name: Post
- 2.0
Loop through data- repeats for every row in
[google-sheet-data]
- 2.1
Go to page - 2.2
Enter textSelect text field: the post field on the compose pageText: the text column of[google-sheet-data]
- 2.3
Upload a fileFile Input Field: the compose page's image upload fieldFile Path: the image path column of[google-sheet-data]
- 2.4
Click elementSelect: the Post button
- 2.5
Delete rows from a Google SheetSpreadsheet: your X post sheetSheet name: PostFirst row: 1Last row: 1
- repeats for every row in
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
Automate Instagram posts from a Google Sheet
- Read the posts from my Instagram posts sheet
- Open Instagram and start a new post
- Upload the image and add the caption from the row
- Click Share and delete the row
Automate Threads posts from a Google Sheet
- Read the next post from my Google Sheet
- Open Threads and start a new post
- Type the message and attach the image
- Post it and delete the row
Automate Facebook posts from a Google Sheet
- Read the posts from my Facebook posts sheet
- Open Facebook and start a new post
- Type the text and attach the image from the row
- Click Post and delete the row