Setu Recipes: reusable workflows across every app.Browse templates

Integrations / LinkedIn

LinkedIn

Professional network: identify the member and publish or delete text posts as that member.

3 actions OAuth 2 1 read1 write1 destructive Calls api.linkedin.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "linkedin" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

ScopeWhy it is requested
openidIdentify the connected LinkedIn member
profileRead your name and profile picture
w_member_socialCreate and delete posts on your behalf

Actions

Create text postwritelinkedin.create_text_postPublish a text-only post on the connected member's LinkedIn feed. The new post id is returned by LinkedIn in the x-restli-id response header, not the body.

Needs scope: w_member_social

InputTypeDescription
person_idstringRequiredMember id, the sub value from get_userinfo
textstringRequiredPost text (commentary)
visibilitystringOptionalDefault PUBLIC
TypeScript
await setu.execute({
  userId: "user_1",
  action: "linkedin.create_text_post",
  input: {
    "person_id": "<person_id>",
    "text": "<text>"
  },
});
Delete postdestructivelinkedin.delete_postPermanently delete one of the connected member's posts by its URN (urn:li:share:... or urn:li:ugcPost:...).

Needs scope: w_member_social

InputTypeDescription
post_urnstringRequiredPost URN, for example urn:li:share:6844785523593134080
TypeScript
await setu.execute({
  userId: "user_1",
  action: "linkedin.delete_post",
  input: {
    "post_urn": "<post_urn>"
  },
  confirm: true,
});
Get my LinkedIn profilereadlinkedin.get_userinfoGet the connected member's id (sub), name and picture via Sign In with LinkedIn using OpenID Connect.

Needs scopes: openid, profile

No input.

TypeScript
await setu.execute({
  userId: "user_1",
  action: "linkedin.get_userinfo",
  input: {},
});