Skip to content

feat(newsletter): post a paper or report to LinkedIn as a document - #169

Merged
axsaucedo merged 1 commit into
masterfrom
feat/buffer-linkedin-documents
Sep 27, 2026
Merged

axsaucedo merged 1 commit into
masterfrom
feat/buffer-linkedin-documents

Conversation

@axsaucedo

Copy link
Copy Markdown
Collaborator

buffer-post.mjs can now queue a paper or report to LinkedIn as a document post, which LinkedIn shows as a swipeable PDF carousel, while X and Bluesky still get the image.

The trigger was issue 406: the owner wanted the Harness-Zero paper and China's framework PDF posted as documents on LinkedIn. Buffer's GraphQL schema has an AssetInput with a document field, which I confirmed by introspection before building on it:

DocumentAssetInput { url: String!, title: String!, thumbnailUrl: String! }

When a post folder contains document.pdf, the LinkedIn post gets that as a document, using the folder's image as the cover and document-title.txt as its title. The PDF is hosted the same way the images are, on the newsletter-assets branch behind jsDelivr, which serves it as application/pdf. Other channels are unchanged. A folder with a PDF but no image fails early, because a document post needs a cover.

It's been used for real. All four of issue 406's image posts queued without errors, including the two documents (0.9 MB and 3.3 MB, the second at 136 pages). What isn't verified yet is what LinkedIn renders when Buffer publishes them: the first document post goes out on 2026-09-29, and that's the real test.

Two small follow-ups, not done here. The newsletter-issue skill doesn't mention document.pdf yet. And fetch-images --apply doesn't produce the file itself, so for now it's copied into the folder by hand.

Buffer's API accepts a document asset (url, title, thumbnail), which LinkedIn
shows as a swipeable carousel. When a post folder holds document.pdf, LinkedIn
now gets it as a document post with the folder's image as the cover and
document-title.txt as its title; X and Bluesky cannot take documents and keep
the image. The PDF is hosted the same way as the images, on the
newsletter-assets branch behind jsDelivr, which serves it as application/pdf.

Used for issue 406's Harness-Zero paper and China's framework PDF.
@axsaucedo
axsaucedo merged commit ee015f0 into master Sep 27, 2026
7 checks passed
@axsaucedo
axsaucedo deleted the feat/buffer-linkedin-documents branch September 27, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant