Share a Linkedin post on an organization's page

Please see this thread: User id from LinkedIn - #8 by Ryan_Farren

Shares API seems to be depreciated

To share an organisation post to a personal feed you need to use the new /rest/posts POST API

The shared JSON didn’t work for me because of some strange formatting issue with the brackets and the empty array. If you’re not totally comfortable with JSON than it may take you some time so I suggest one of the mods to edit this code and replace it with this one:

{
  "author": "urn:li:person:ID HERE",
  "commentary": "Sample text Post",
  "visibility": "PUBLIC",
  "distribution": {
    "feedDistribution": "MAIN_FEED",
    "targetEntities": [],
    "thirdPartyDistributionChannels": []
  },
  "lifecycleState": "PUBLISHED",
  "isReshareDisabledByAuthor": false,
  "reshareContext": {
    "parent": "urn:li:share:POST ID HERE"
    }
}

The above is for a person but it works for organizations too, just replace author with:

"urn:li:organization:ID HERE"

Im still wondering though how to retrieve the POST ID from a post that is not your own though so would love to hear how that’s done if anybody knows.

1 Like

I spent a few hours trying to get this to work and I almost gave up.

I had a JSON error at first where I was using Claude to help write a commentary but it added a newline character. I switched to using the raw text and that fixed the problem, but then I got a DataError [object OBJECT]. That one stumped me for hours as I was trying to use Make.com to parse the error and the error handling did something, but I was never able to fully parse the error to a human readable message.

I then looked at my input block one last time and noticed I had a space between “urn:li:person:” and my ID. Took out the space, and BOOM, message was reposted.

For anyone that is going to try to do this, make sure you don’t have any spaces in your author ID. Also, if you end up needing to troubleshoot this and your company doesn’t post every minute (most won’t), remove the Watch Organization Post module and manually fill in the parent ID for the post so you can run this as many times as you need to figure this out.

2 Likes