LinkedIn Module
Publish to LinkedIn from a workflow, as the connected member or as a company page the member administers: text, image and link posts, comments and reactions; read the member's profile and pages; read a page's follower count, follower gains and organic post statistics.
Typical uses: announce a new article, product or job from the flow that created it, post a weekly digest on a schedule, thank people who comment on a launch post, or feed a page's analytics into a monthly report.
Requirements
- A LinkedIn member who signs in once per environment (Connect LinkedIn). The member's own posts need LinkedIn's Share on LinkedIn and Sign In with LinkedIn using OpenID Connect products on the platform's LinkedIn app (set up by the platform administrator).
- Company pages (posting as a page, listing page posts, page analytics) need the Community Management API product on the platform's app, and the member must be an administrator of the page.
- A LinkedIn sign-in lasts 60 days. The connection's status says until when; reconnect before it lapses. Platforms whose LinkedIn app has programmatic refresh tokens renew it automatically for a year.
- LinkedIn sends no webhooks to third-party apps: there is no LinkedIn start. Poll with a schedule (Scheduler module) if a flow must react to comments or new posts.
Configuration
| Setting | Required | Notes |
|---|---|---|
| LinkedIn account | yes | Connect LinkedIn: the member the flows act as. The sign-in is kept on the engine, encrypted; the status shows the member, the pages and the expiry. |
| Company pages | no | Turns on posting as a page, listing pages and page analytics. Connect then asks LinkedIn for the page permissions: reconnect after turning it on. |
| Default page | no | The page tasks act as when their Page field is empty: id, URN (urn:li:organization:123), page link or vanity name. |
| API version | no | Advanced. The LinkedIn-Version (YYYYMM) the module calls with. Empty: the module's default. |
Platform settings (engine configuration / Key Vault): LinkedInModule--OAuth--ClientId, LinkedInModule--OAuth--ClientSecret (the LinkedIn app's credentials; without them the Connect button hides), optional LinkedInModule--OAuth--RedirectUri, LinkedInModule--OAuth--MemberScopes and LinkedInModule--OAuth--OrganizationScopes (space-separated, to match the app's products), LinkedInModule--ApiVersion. Register https://engine-dev.ew-flow.com/api/oauth/linkedin/callback (dev) and https://engine.ew-flow.com/api/oauth/linkedin/callback (prod) as redirect URLs of the LinkedIn app.
Pages and vanity names
Wherever a task takes a Page, write its numeric id, its URN (urn:li:organization:123), its page link (https://www.linkedin.com/company/acme-srl/) or its vanity name (acme-srl). Vanity names are looked up on LinkedIn and cached for ten minutes.
LinkedIn post
One task with seven operations. Act as picks the author: the connected member, or a company page (Company pages feature). Posts, comments and reactions are made in the author's name.
Create post
| Property | Notes |
|---|---|
| Text | Up to 3,000 characters. #hashtags stay hashtags; everything else is posted as written. |
| Visibility | Anyone or Connections only (member only: a page's posts are always public). |
| Image | Optional JPG, PNG or GIF up to 8 MB (a file field: ref-session:{image}, ref-storage:launch.png). With a Link, it becomes the card's image. |
| Link, Link title, Link description | A web address shown as a card. LinkedIn does not read the title or image from the page: give them here. The title is required with a link. |
| Text format (Advanced) | Plain words (default) escapes LinkedIn's special characters. LinkedIn little text posts what you write as LinkedIn's format: mention a page or member with @[Acme](urn:li:organization:123), and escape ( ) [ ] { } < > | * _ ~ @ # \ with a backslash. |
| Image description (Advanced) | Alternative text for screen readers. |
| Disable reposts (Advanced) | Others cannot repost it. |
Output: {post} with id (the post URN, what the other operations take as Post), url, author, text, littleText, visibility, state, createdAt, articleUrl, articleTitle, mediaId, mediaAltText, reshareDisabled.
Get post, List posts, Delete post
| Property | Notes |
|---|---|
| Post | A post URN (urn:li:share:123, urn:li:ugcPost:123) or its LinkedIn link (Get, Delete). |
| Act as, Page | Whose posts to list (List posts). Listing the member's own posts needs LinkedIn's restricted r_member_social permission. |
| Max results | 1–100. Empty: 10. |
Outputs: {post} (Get: id, url, author, text, visibility, state, createdAt, lastModifiedAt, publishedAt, articleUrl, mediaId, isReshare, reshareOf, editedByAuthor), {posts} (List: count, items), {linkedInResult} (Delete: done, action, post). Deleting is idempotent.
Comment on a post, List comments, React to a post
| Property | Notes |
|---|---|
| Post | The post, as above. |
| Comment | Up to 1,250 characters of plain text. |
| Reaction | Like, Celebrate, Love, Insightful, Support or Funny. |
| Act as, Page | Who comments or reacts. |
| Max results | 1–100 comments. Empty: 10. |
Outputs: {comment} (id, urn, actor, text, createdAt, post), {comments} (count, items with likes), {linkedInResult} (done, action, reactionType, id).
LinkedIn account
| Operation | Output |
|---|---|
| Connected member | {member}: id, urn, name, givenName, familyName, email, picture, locale. |
| Company pages I administer | {pages}: count, items (each id, urn, name, vanityName, url, website, type, staffCountRange, industries). Company pages feature. |
| Get company page | {page}: the same fields, by Page. A page the member does not administer returns its public fields only. |
LinkedIn page analytics
Needs the Company pages feature and an administrator of the page. Page is the page (empty: the default page).
| Operation | Properties | Output |
|---|---|---|
| Follower count | {followers}: organization, followers. | |
| Follower gains over time | From, To (dates; empty: the last 30 days), Granularity (day, week, month) | {followerGains}: organic, paid, count, items (start, end, organic, paid). LinkedIn keeps 12 months, up to two days ago. |
| Post statistics | Posts (comma-separated URNs or links; empty: all the page's posts) | {postStats}: items (one per post, zeros for a post with no activity) and total (impressions, uniqueImpressions, clicks, likes, comments, shares, engagement). Organic activity only. |
| Post statistics over time | From, To, Granularity (day or month) | {postStats}: items (one per period, start, end, metrics) and total. |
Errors
The task takes its error flow when the input is invalid, LinkedIn is not connected or the sign-in lapsed (reconnect in the environment's LinkedIn settings), a permission or page role is missing (403), the post is not found (404), the rate limit is reached (429, a short wait is retried once) or LinkedIn has an error. The log says which.