How to automate Twitter X direct messages


Learn how to automate sending tweets with a Chrome bot for X(Twitter). Install the template and set up your bot in a few clicks on your browser. This Twitter template utilises a Google Sheet that includes a list of Twitter profiles for messaging. It proceeds to launch Twitter in Chrome and loops through each profile, clicking on the message button and then entering a message before hitting the return key to send the message. Just like how you would message from a profile page.

Get started: Set up your Google Sheet

Create a new Google Sheet. You can do this in your Chrome browser by entering the shortcut "sheet.new", presuming you already have an account. Name your sheet something like "Twitter Messages" then add profile links.

Install the Twitter X direct messages bot

To install this Twitter X direct messages bot click "Install template". If you’re a new user, you’ll have to click "Install Chrome extension" and create a free axiom.ai account before you can edit the template.

Once installed, click "Start".

axiom.ai will guide you through the steps you need to configure in the app.

Configure your Twitter X direct messages bot

  • 1.0 Read data from a Google Sheet
    • Spreadsheet: Search for the Google Sheet you created. Once found, click to select.
    • Sheet name: Choose the tab with the profile links.
  • 2.0 Loop through data
    • 2.1 Go to page
      • Enter URL: Click Insert data, select [google-sheet-data].
    • 2.2 Get data from bot's current page ^
    • 2.3 If condition: Check for Message button ^
      • 2.3.1 – 2.3.2 ^
      • 2.3.3 Enter Text: Message
        • Text: Click Insert data, select message from Google Sheet or type directly into the input.
      • 2.3.4 Press Key(s): Send message ^
    • 2.4 Delete rows from a Google Sheet
      • Spreadsheet: Search for the Google Sheet you created. Once found, click to select.
      • Sheet name: Choose the tab with the posts in it.

^ Preconfigured

Run your Twitter X direct messages bot

To test an Instagram scraper, initiate the bot with the desktop runner and let it run a few loops. If you do not want the Messages to send disable step 2.3.6. Then, stop the bot and review the data in the linked Google Sheet for accuracy and completeness. If you wish to schedule the bot, add steps to login.

Customize your template

Like all Axiom templates, you can use our no-code bot builder to customize any bot according to your requirements.

Troubleshooting

We recommend you watch the video to troubleshoot. If you wish to schedule the bot, you will need to share the Cookie in settings or add steps to login.

  • Profile pages not loading?
    In Step 2.1 – Go to page, check you have inserted the data correctly.
  • No data being found?
    In Step 2.2 – Get data from bot's current page, reselect an element that wraps around the message button.
  • Not running X in English?
    In Step 2.3 – If condition: Check for Message button, change the condition to check for 'Message' in your native language.
  • Data to check not set?
    In the same step, make sure it is set to [scrape-data].
  • Element not found?
    In Step 2.3.1 – Click Element: Message, reselect the message button. Try using the text selector.
  • No message being added?
    In Step 2.3.3 – Enter Text: Message, check you have inserted data or try reselecting the text input field.

We offer excellent customer support. If you need help, get in touch.