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

  • Step 1.0 - Read data from Google Sheet
    • Spreadsheet - Search for the Google Sheet you created. Once found, click to select
    • Sheet name - Choose the tab with the pprofile links
  • Step 2.0 - Loop through data
    • Step 2.1 - Go to page
      • Enter URL - Click 'Insert data' select [google-sheet-data]
    • Step 2.2 Get data from bot's current page: Scrape for Message button
      • Preconfigured
    • Step 2.3 - If condition: Check for Message button
      • Preconfigured
      • Steps 2.3.1 - 2.3.2
        • Preconfigured
      • Step 2.3.3 - Enter Text: Message
        • Text: Click 'Insert data' select message from Google Sheet or type straight into the input
      • Step 2.3.4 - Press Key(s):Send message
        • Preconfigured
    • Step 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

# 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.

# Tips

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.

  • Step 2.0 - Loop through data
    • Step 2.1 - Go to page
      • Profile pages not loading? Check you have inserted the data correctly
    • Step 2.2 Get data from bot's current page: Scrape for Message button
      • No data being found? Reslect an element that wraps around the mesage button
    • Step 2.3 - If condition: Check for Message button
      • Not running Instagram in English? Change the condition to check from 'Message' to native language
      • data to check not set? It should be set to '[scrape-data]'
      • Step 2.3.1 - Click Element: Message
        • Element not found? Reselect the message button, try the text selector
      • Step 2.3.3 - Enter Text: Message
        • No Message being added? Check you have inserted data or try reslecting the text input field

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

# More Templates