--- name: tg-rich-digest description: "Use when sending daily or weekly digests, community summaries, status reports, newsletters, or channel articles through a Telegram bot as one structured rich message instead of a wall of plain text. Covers both the flat digest layout and the preview + collapsed full version layout for long editions, plus media as evidence and a preflight gate before publishing. Triggers: \"send weekly digest\", \"post summary to channel\", \"newsletter via bot\", \"community report\", \"daily status update\", \"publish article to channel\", \"format report as rich message\"." license: MIT --- # tg-rich-digest Send a digest or report as a single structured Telegram Rich Message (Bot API 10.2) — section headings, topic lists, collapsible long-tail, photo collage, map embed, and a footer — all in one document-grade message. ## Overview A digest is a structured document, not a wall of text. Rich Messages let you organize it with real headings, lists, collapsible sections, and embedded media — readable on any screen, no HTML page required. This skill covers the **digest/report pattern** specifically. For the complete block reference see [`../tg-rich-messages/SKILL.md`](../tg-rich-messages/SKILL.md). To convert an existing Markdown report see [`../tg-markdown-to-rich/SKILL.md`](../tg-markdown-to-rich/SKILL.md). --- ## Anatomy of a Digest Recommended block sequence: ``` [heading h2] — digest title + date range [paragraph] — 1–3 sentence lead: what happened, key number [heading h3] — topic 1 [list] — 3–7 bullet items for topic 1 [heading h3] — topic 2 [list] — ... [details] — "All links / Full list" — long-tail, closed by default [divider] — visual separator before footer [collage] — photo report (optional) [map] — event location (optional) [footer] — date, source, issue number ``` Each element below is shown as **HTML markup**, the string placed inside `InputRichMessage.html`. Bot API 10.2 also accepts `InputRichMessage.blocks` for code-built documents. > **Note:** When you receive the message back, `Message.rich_message` contains the parsed `RichBlock` JSON (e.g. `{"type": "heading", ...}`). That structure is receive-only — you cannot send it. --- ## Layout choice: flat digest vs. preview + full version The anatomy above is the **flat** layout: everything visible, `
` reserved for the long tail. It works for a short digest — a handful of bullets a reader scans in the feed. It stops working once the digest becomes an article. A long rich message in a channel is rendered collapsed anyway, but Telegram decides where to cut, and the cut usually lands mid-sentence in the middle of your third section. The fix is to make the cut yourself: ``` [heading h1] — the claim, as a headline [paragraph] — 2-3 short paragraphs: the fact, your own check, the consequence [photo] — cover image [details] — "Read the full version" — the ENTIRE article, closed by default ``` Everything below the lead lives inside one `
` block: sections, media, sources, sign-off. The reader sees a deliberate preview and one button; the feed shows a clean card instead of an arbitrary truncation. ```html

Voice model ships with Russian audio-to-audio

The vendor shipped voice-think-fast-2.0 on July 29. First audio in 0.7 s, $0.08 per minute.

We tested Russian audio-to-audio: the model heard the question and answered 323.

Read the full version

What shipped

...
``` Budget the preview. Roughly **500 visible characters total** before `
`, with no single paragraph over ~220 — past that the feed truncates the preview itself and the whole point is lost. Count visible characters, not markup. Two rules that are easy to get wrong: - **Media before `
` counts as part of the preview.** One cover image, no more. - **Keep the sign-off inside `
`.** Anything after the closing tag reads as a detached fragment in the feed. | Digest shape | Layout | |---|---| | Bullet roundup, under ~1500 chars | Flat — `
` for the long tail only | | Article with sections, media, sources | Preview + full version in one `
` | ### Heading ```html

Weekly Digest — Jun 9–15

``` `

`–`

` map to heading sizes 1–6. Use `

` for the digest title, `

` for topic sections. ### Lead paragraph ```html

This week the community hit 1,200 members. Three tools shipped, one hot thread ran 80+ replies.

``` ### Topic section ```html

Top Discussions

``` For ordered lists use `
    ` with optional `start`, `type` (`"1"`, `"a"`, `"A"`, `"i"`, `"I"`), and `reversed` attributes on `
      `, or `value` on individual `
    1. `. ### Details block — long-tail Use `
      ` for content most readers skip: full link lists, raw stats, appendices. Omit `open` to collapse by default. ```html
      All links this week (9)
      1. LLM context limits — practical patterns
      2. Prompt caching deep dive
      3. promptkit v0.4 release notes
      ``` Add `open` attribute (`
      `) only for critical content that should be visible by default. ### Divider ```html
      ``` ### Photo collage Public **HTTP or HTTPS URLs** can be used directly. For Telegram `file_id` values or uploads, use `tg://photo?id=...`, `tg://video?id=...`, or `tg://audio?id=...` plus `InputRichMessage.media`. ```html
      Berlin meetup · June 10Photo: @photo_credit
      ``` Mix `` and `