Getting your Instagram feed to Discord

Not so long ago, it was possible with a bit of effort, a third party feed generator and a Discord bot, to get Instagram to feed new images from your page to a Discord channel, complete with image preview. This then stopped working because as far as I can tell Instagram’s /p/<post> link is now behind their login wall, so anonymous feeds can’t get it. Result, lots of ugliness on my Discord, viz:

This bugged me enough to find a better solution, and one of my co-admins suggested IFTTT: some Googling later I found the bones of a recipe, which didn’t work. So here’s the result of me fixing it.

Step 1: create a Discord Webhook

Go to Server Settings (c’mon, you should know where that is by now), Webhooks, and hit the blurple[1] Create Webhook button.

Fill in the fields, upload an avatar image for the webhook if you want. Most importantly, you need to pick which channel you want the webhook to post to, and then copy the webhook URL (keep it private) and hit Save.

Step 2: use IFTTT to scrape your Instagram feed

Go to IFTTT, hit Explore, scroll down to Make your own from scratch. then hit Create. Hit +This, search for Instagram, select it and pick one of the triggers (I chose ‘Any new photo by you’). Easy.

Step 3: feed it to Discord

Now hit +That, and search for Webhooks – there is only one result, and from there only one action (‘Make a web request’), so select it. Now you need to configure it.

Easy bits first – paste your webhook URL into the URL field. Set the Method to POST, and the Content Type to application/json.

Finally, copy this into the Body field (or use the Add Ingredient button to add the Caption, Url and SourceUrl ingredient tokens):

{
  "content": "{{Caption}} {{Url}}",
  "embeds": [
    {  
      "image": {
        "url": "{{SourceUrl}}"
      }
    }
  ]
}

Hit Save. Go post to your Instagram feed and wait.

And there you are!

[1] ‘Blurple’ is the name of Discord’s official button colour

This entry was posted in Virtual un-distancing and tagged , . Bookmark the permalink.

9 Responses to Getting your Instagram feed to Discord

  1. Jack says:

    Will this method only work for your own Instagram account? Can this be used to pull images from another public account that you don’t own?

    • RealFalc0n2k says:

      In order for IFTTT to pull anything from Instagram, you have to authenticate it with an account — and that means entering in your username and password. Which means unless you’re able to log into the account you want to pull content from, you’re rather stuck.

      That being said, there may be a way to do it, but not with this code.

    • Mike says:

      This is actually the only feature i care about as well. Don’t need my own posts to go to discord, just other posts from people i follow.

    • Jadine says:

      I need help with this too (a year later, oops). It seems to only be useful for when you can log into the target account… sigh. If you happened to find another means of pulling posts from someone else’s public account within the last year since posting this, I’d love to know.

      • Mike says:

        The issue with this is that, as I said in the post, “Instagram’s /p/ link is now behind their login wall.” Unless and until that changes I think you’re out of luck.

  2. Gab says:

    gt an error message “Applet failed – too many reqests to this host”
    any explainations for this error ?

    ps : i have tried the code to copy/paste as well as ingredients.

  3. pacifrix says:

    i tried it doesnt work for some reason

  4. Pingback: Discord

  5. Pingback: Discord

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.