Rss to Twitter with Image

Hey guys,
I have been able to setup Rss posts to twitter where I share new posts on my RSS to twitter.N8n is working very well with items like the post title and post links. However, my posts also have images and so far I have failed to embed an image from my rss to my twitter. Please help me.

Hi @Collin_Mutambo,

welcome to the community.
In order to use media within a Tweet it needs to be uploaded via a separate endpoint to Twitter. Unfortunately this seems to be not implemented in the current n8n Twitter node. It might be worth to propose this as a feature request.
Same applies for the other way round, if you like to get an image from a Tweet.

Thanks a lot @ixidion but it is actually already possible to post a tweet with an image. You just first have to download the image.

Here an example workflow:

{
  "nodes": [
    {
      "parameters": {
        "url": "https://media.giphy.com/media/IRFQYGCokErS0/giphy.gif",
        "responseFormat": "file",
        "options": {}
      },
      "name": "HTTP Request2",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        500,
        870
      ]
    },
    {
      "parameters": {
        "text": "this is a test tweet with image",
        "additionalFields": {
          "attachments": "data"
        }
      },
      "name": "Twitter2",
      "type": "n8n-nodes-base.twitter",
      "typeVersion": 1,
      "position": [
        870,
        870
      ],
      "credentials": {
        "twitterOAuth1Api": ""
      }
    }
  ],
  "connections": {
    "HTTP Request2": {
      "main": [
        [
          {
            "node": "Twitter2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
1 Like

Jan,
Thanks for the reply. Looks like the image woulld have to be taken from a direct URL. When the image is part of the post items in an RSS feed, it becomes a bit tricky.

Then you need to transform the Feed-XML to JSON and afterwards you can get the Image-URL easily. XML-Node is your friend then.

1 Like