How to Automate Comments on Instagram for Targeted Topics to Increase Engagement

Looking to boost engagement on Instagram by leaving thoughtful comments on posts related to your niche? This guide shows you how to automate the process of finding posts under specific hashtags and commenting on them using Uxer’s AI Assistant.


Description:
This template automates the process of commenting on Instagram posts based on targeted hashtags using Uxer’s personalized AI automation assistant. You provide the hashtag, and Uxer generates and posts personalized comments on relevant Instagram posts.


How to Use It:

  1. Copy and paste this template into Uxer’s scenario builder.
  2. Ensure that you are logged into Instagram in Chrome before running the scenario.
  3. Save and run the scenario to automate commenting on Instagram posts based on your targeted hashtags.

Step-by-Step Guide

  1. Open Instagram in Browser
    Start by opening Instagram with incognito mode disabled to ensure the user remains logged into their account.

    OpenBrowser Chrome "https://www.instagram.com" -Incognito false
    
  2. Search for Your Targeted Hashtag
    Use Instagram’s search bar to find posts under a specific hashtag, such as “#aiautomation.”

    Click Text "Search"
    Wait Text "Recent"
    Write "#aiautomation"
    
  3. Select the Hashtag from Results
    Click on the second instance of the hashtag to see posts related to your search.

    Click Text "#aiautomation" [1]
    
  4. Wait for the Page to Load
    Wait for the “Home” text to appear as proof that the page has fully loaded.

    Wait Text "Home"
    
  5. Navigate to the First Post
    Click on the first post. To do that click 150 pixel below the “Not personalized” text.

    Click Text "Not personalized" -YMargin 150
    
  6. Scroll to Find the Next Unliked Post
    Use the right arrow key to navigate through posts and stop when you find one that hasn’t been liked yet.

    SendKeys RIGHT -UntilVisible Image {ux_instagram_like} [1]
    
  7. Hover Over and Like the Post
    The hover action moves the mouse to the precise location of the Like button before clicking it. This step ensures consistent and accurate interactions, as Instagram’s UI can sometimes be unpredictable. By hovering first, the automation guarantees that the Like button is properly activated, preventing misclicks or failures due to unexpected behavior in the Instagram interface.

    Hover Image {ux_instagram_like} [1]
    Click Image {ux_instagram_like} [1]
    
  8. Add a Comment
    Click on the “Add a comment…” field to start commenting on the post.

    Click Text "Add a comment..."
    
  9. Generate a Personalized Comment Using AskUxer
    Use Uxer’s AI Assistant to create a thoughtful comment that resonates with the post’s content.

    {Response} = AskUxer "You are viewing an Instagram post. Write a personalized, positive, and engaging comment in English based on the content of that post. Highlight key points or achievements and encourage further conversation. Avoid generic responses and ensure the comment reflects that I don't personally know the author. Do not make any statements about actions or promises I cannot fulfill." -UseScreenshot true
    
  10. Post the Comment
    Write and submit the comment. SendKeys SPACE is used to close the hashtag suggestion bar if it appears, ensuring the comment field is clear before submission.

    Write {Response}
    SendKeys SPACE
    SendKeys ENTER
    
  11. Scroll and Find the Next Post
    Scroll to find another post and repeat the process of liking and commenting. The TAB key is pressed in advance to shift focus away from the comment section, enabling the right arrow key to switch to the next post.

    SendKeys TAB
    SendKeys RIGHT -UntilVisible Image {ux_instagram_like} [1]
    Hover Image {ux_instagram_like} [1]
    Click Image {ux_instagram_like} [1]
    Click Text "Add a comment..."
    {Response} = AskUxer "You are viewing an Instagram post. Write a personalized, positive, and engaging comment in English based on the content of that post. Highlight key points or achievements and encourage further conversation. Avoid generic responses and ensure the comment reflects that I don't personally know the author. Do not make any statements about actions or promises I cannot fulfill." -UseScreenshot true
    Write {Response}
    SendKeys SPACE
    SendKeys ENTER
    

Complete Scenario:

OpenBrowser Chrome "https://www.instagram.com" -Incognito false
Click Text "Search"
Wait Text "Recent"
Write "#aiautomation"
Click Text "#aiautomation" [1]
Wait Text "Home"
Click Text "Not personalized" -YMargin 150
SendKeys RIGHT -UntilVisible Image {ux_instagram_like} [1]
Hover Image {ux_instagram_like} [1]
Click Image {ux_instagram_like} [1]
Click Text "Add a comment..."
{Response} = AskUxer "You are viewing an Instagram post. Write a personalized, positive, and engaging comment in English based on the content of that post. Highlight key points or achievements and encourage further conversation. Avoid generic responses and ensure the comment reflects that I don't personally know the author. Do not make any statements about actions or promises I cannot fulfill." -UseScreenshot true
Write {Response}
SendKeys SPACE
SendKeys ENTER
SendKeys TAB
SendKeys RIGHT -UntilVisible Image {ux_instagram_like} [1]
Hover Image {ux_instagram_like} [1]
Click Image {ux_instagram_like} [1]
Click Text "Add a comment..."
{Response} = AskUxer "You are viewing an Instagram post. Write a personalized, positive, and engaging comment in English based on the content of that post. Highlight key points or achievements and encourage further conversation. Avoid generic responses and ensure the comment reflects that I don't personally know the author. Do not make any statements about actions or promises I cannot fulfill." -UseScreenshot true
Write {Response}
SendKeys SPACE
SendKeys ENTER

Conclusion

By automating Instagram comments for specific hashtags, you can increase your engagement and connect with relevant content in your niche. Use this scenario to save time while keeping your brand active and engaged on the platform.


Looking for more automation ideas? Let us know what you’d like to automate next, and we’ll help you!