LinkedIn Post not showing image for URL

in LinkedIn node, when posting an article with Url, the post on LinkedIn website does not show the meta image for the Url.

As susggested in stackoverflow , the problem might be linked to Linkedin Post Inspector when caching images before posting.

Anyone encountering the same problem ? Any solution ?

my set up: server hosted n8n version 0.155.2 running via Docker.

Hey @Kam

Welcome to n8n community :tada:

I’m not sure you can do this with the LinkedIn node.

But you can try using this tool from LinkedIn.

Hi @mcnaveen ,

when I go to the LinkedIn Post Inspector page, and paste the post url, it does show an image.
but, when i go on the web and look at the actual post on LinkedIn (that was generated by n8n LinkedIn node), there is no image.

1 Like

Can you try adding ?1 at end of the URL when sharing it to LinkedIn

Example:

https://example.com/post-name/?1

just tried the …/?1 : no change

I think this is not happing due to n8n.

Please wait for other community members to respond :slight_smile:

in the n8n LinkedIn node, should the ‘additionalFields’ be replaced by a ‘media’ parameter, as stated in the linkedIn API ? I’m not a developper, so just trying to find a solution to my problem.

"nodes": [
    {
      "parameters": {
        "postAs": "person",
        "person": "cm0xCLLuot",
        "text": "could dogs  speak to anyone else but me?",
        "shareMediaCategory": "ARTICLE",
        "additionalFields": {
          "description": "https://bigthink.com/neuropsych/dogs-language-processing/",
          "originalUrl": "https://bigthink.com/neuropsych/dogs-language-processing/",
          "title": "neuroscience",
          "visibility": "PUBLIC"
        }
      },
      "name": "LinkedIn",
      "type": "n8n-nodes-base.linkedIn",
      "typeVersion": 1,
      "position": [
        460,
        300
      ],

anyone has an opinion on this subject ?

Hey @Kam,

Did you try with the following options:

yes, i did precisely that in the node, and the JS script i posted above reflects it.

So far, no one else is experiencing this problem? or there is no answer to this problem and I should move on and use a different software?

I’m experiencing the same issue. If I have time I may try to figure out the Linkedin HTTP request parameters to build the API request to include that image so that at least it will work correctly.

Hey @djangelic & @Kam,

Just so I understand this is, is the problem that LinkedIn is not showing the webpage preview image when posting a URL as a message or is it something else?

Hi Jon, after looking at the LinkedIn api documentation, I think the issue is with LinkedIn not with n8n.

When using the article posting option in n8n, the article link is posted, but the open graph image embedded in the header of the website is stripped out and not posted. See example below:

If I take the same link and post it via the LinkedIn app or website it will automatically load the image as a banner in the post. Whereas when posting via the api that image is actively removed.

After looking at the LinkedIn documentation I don’t see a way to send the image along with the url. And likewise for the image post, I don’t see an option to add a url. It’s almost like LinkedIn is doing this on purpose to api posts unless I missed something in the docs.

If you consider the fact paid solutions like Hootsuite or AgoraPulse use the LinkedIn API and manage to correcly publish a post with a clickable image, i guess it should be possible to do it in n8n don’t you think?

Morning @Kam & @djangelic,

Sweet, So from what I understand LinkedIn should automatically pull the information. Looking at the Linkedin changes from back in May last year there was a change that could be causing the issue.

What’s happening: Starting May 31, 2021, for article type posts the description, title, and thumbnail will be set from LinkedIn’s URL Preview of the URL only if the description, title, and thumbnail are not provided from the API call. Prior to this change, each field was set from LinkedIn’s URL Preview if the specific field was not set. If a specific representation of the post is desired, set the description, title, or thumbnail fields, rather than rely on automatic preview. Use the Post Inspector tool to determine what the LinkedIn URL Preview looks like.

Quickly running through what that suggests still doesn’t appear to work as expected so it could be that there is another change or maybe a different API that is needed…

[15 minutes later]

OK while writing this reply and testing I ended up loading VSCode and taking a poke through the code, The good news is I know what is causing the issue now so we can get it fixed.

For the curious it is the issue mentioned above, Even if the description and title field is empty / not set we are sending the options with empty values which was all good until the change last year with the API.

TL;DR: LinkedIn made a change and it caused it to break, We know what the issue is so it shouldn’t take long to get a fix in place.

4 Likes

@Jon : amazing forensic investigation !

Awesome job, @Jon ! Thanks for looking into this!

@Jon any ETA for the fix deployment?

Hey @Kam,

At the moment is in the todo pile while it isn’t ideal when compared to some of the other features we are working on the priority isn’t that high.

What I can do though if you really need this is spend a bit of time over the weekend fixing it.