Instagram Follow and Like iMacros Script

One of my favorite Instagram scripts. This iMacros script lets you automatically follow Instagram users and like three of their posts. Simply search a hashtag on Instagram then run the iMacros bot with the number of users you want to follow. The script will follow the user, like three of their posts then move to the next user. Don’t forget to subscribe to email newsletter for more free iMacros social media scripts.

Update: Script updated. Working as of October 2019.

SCRIPT:

SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 1

SET !VAR2 4

TAB T=1
WAIT SECONDS=2
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:/p/*
WAIT SECONDS=2

TAG POS=1 TYPE=A ATTR=CLASS:FPmhX<SP>notranslate<SP>nJAzx EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL

TAB OPEN
TAB T=2
URL GOTO=https://www.instagram.com/{{!VAR1}}
WAIT SECONDS=2

TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow
WAIT SECONDS=1

TAG POS=1 TYPE=A ATTR=HREF:/p/*
WAIT SECONDS=2

TAG POS=2 TYPE=BUTTON ATTR=CLASS:dCJp8<SP>afkep
WAIT SECONDS=1
TAG POS=1 TYPE=A ATTR=TXT:Next
WAIT SECONDS={{!VAR2}}

TAG POS=2 TYPE=BUTTON ATTR=CLASS:dCJp8<SP>afkep
WAIT SECONDS=1
TAG POS=1 TYPE=A ATTR=TXT:Next
WAIT SECONDS={{!VAR2}}

TAG POS=2 TYPE=BUTTON ATTR=CLASS:dCJp8<SP>afkep
WAIT SECONDS={{!VAR2}}

TAB CLOSE
TAB T=1
TAG POS=1 TYPE=BUTTON ATTR=TXT:Close

Let me know if you have any issues with a comment below or through email.

13 Comments on “Instagram Follow and Like iMacros Script”

      1. Hey man, you’re missing before and after notranslate

        TAG POS=1 TYPE=A ATTR=CLASS:_2g7d5notranslate_iadoq

        I’ll copy my version of it, which follows the user AFTER liking 3 photos: photo #1, #3 and #7, for a more organic feeling.

        SET !ERRORIGNORE YES
        SET !EXTRACT_TEST_POPUP NO
        SET !TIMEOUT_STEP 1

        SET !VAR2 4

        TAB T=1

        WAIT SECONDS=2
        TAG POS={{!LOOP}} TYPE=A ATTR=HREF:/p/*
        WAIT SECONDS=2

        TAG POS=1 TYPE=A ATTR=CLASS:_2g7d5notranslate_iadoq EXTRACT=TXT
        SET !VAR1 {{!EXTRACT}}

        TAB OPEN
        TAB T=2
        URL GOTO=https://www.instagram.com/{{!VAR1}}
        WAIT SECONDS=2

        TAG POS=1 TYPE=A ATTR=HREF:/p/*/?taken-by={{!VAR1}}
        WAIT SECONDS=2

        TAG POS=1 TYPE=SPAN ATTR=TXT:Like
        WAIT SECONDS=1
        TAG POS=1 TYPE=A ATTR=TXT:Next
        WAIT SECONDS=1
        TAG POS=1 TYPE=A ATTR=TXT:Next

        WAIT SECONDS={{!VAR2}}
        TAG POS=1 TYPE=SPAN ATTR=TXT:Like
        WAIT SECONDS=1
        TAG POS=1 TYPE=A ATTR=TXT:Next
        WAIT SECONDS=1
        TAG POS=1 TYPE=A ATTR=TXT:Next
        WAIT SECONDS=1
        TAG POS=1 TYPE=A ATTR=TXT:Next

        WAIT SECONDS={{!VAR2}}
        TAG POS=1 TYPE=SPAN ATTR=TXT:Like

        WAIT SECONDS={{!VAR2}}

        TAG POS=1 TYPE=BUTTON ATTR=TXT:Close

        TAG POS=1 TYPE=BUTTON ATTR=TXT:Follow
        WAIT SECONDS=1

        TAB CLOSE
        TAB T=1
        TAG POS=1 TYPE=BUTTON ATTR=TXT:Close

  1. When that is fixed the loop won’t work, it always opens the same picture, the first in the list.

    also, would like to change that photo selection. Instead of picking #1, i’d like to pick #10, so i don’t end up in very followed users (using a hashtag like “music” will display photos with TONS of likes in the top9 list, probably from very influencing users, which is where the bot ends up liking photos and following)

  2. hey, when i start loop the script. it went well for the first photo.

    but after choosing the 2nd photo, the script cant open the 2nd photo profile.
    and it directyly go to :

    Sorry, this page isn’t available.
    The link you followed may be broken, or the page may have been removed. Go back to Instagram.

    can you fix it?

    thank you

    1. Hey bobobo,

      I’ve had this issue before running scripts on Instagram. It’s usually an issue with Instagram, not the script. When that happens I’ll pause the script, go back on Instagram and skip the post that gave me the error. Let me know if this still doesn’t work.

    1. Thanks for letting me know! You were right. I forgot to reset a variable. I have updated the script above so it should work now. I tested it a few times. Try it out and let me know if you still get errors. If it works for you, please consider donating through the site so I can keep the site running. Thanks again!

    1. Hey Jordan,
      Set the number of people you want to follow by entering a number in the loop section. Let me know if you have any other questions.

Leave a Reply

Your email address will not be published. Required fields are marked *