# Telegraph

> Publish articles on Telegraph, Telegram's free publishing platform, straight from a workflow: write in Markdown or HTML and get back a public telegra.ph page and its link. Edit your pages later, read any Telegraph page as HTML or plain text, list your pages and count their views by year, month, day or hour. No sign-up: connecting creates your Telegraph account.

App · 7 actions. Web page: https://docs.lodol.com/docs/integrations/telegraph

## Actions

### Edit a page

Change the title, content or author of one of your Telegraph pages. Whatever you leave empty stays as it is, and the page keeps its link.

**Inputs**

- Page (`page`, text, required): The page to change: pick one of yours, or give its address, such as the link Publish a page returned. Only this account's pages can be edited.
- Title (`title`, text): A new title, up to 256 characters. Leave empty to keep the current one. The page's link doesn't change.
- Content (`content`, text): New content, in Markdown or HTML, replacing everything the page says now. Leave empty to keep it.
- Author name (`author_name`, text): A new name to show under the title. Leave empty to keep the current one.
- Author link (`author_url`, text): A new link for the author name: a web address, or a Telegram @username. Leave empty to keep the current one.

**Outputs**

- `author_name` (text): The author shown under the title. Null when there is none.
- `author_url` (text): Where the author's name links to. Null when it links nowhere.
- `content_html` (text): The page's content as HTML, with full links to its pictures, ready for an email or a website.
- `content_text` (text): The page's content as plain text: a blank line between paragraphs, list items starting with -.
- `title` (text): The page's title.
- `url` (text): The page's address, e.g. https://telegra.ph/Weekly-update-10-16.
- `views` (number): How many times the page has been viewed.

**Example output**

```json
{
  "author_name": "Jane Doe",
  "author_url": "https://example.com/",
  "content_html": "<p>Updated: <em>both</em> are live now.</p>",
  "content_text": "Updated: both are live now.",
  "title": "Weekly update",
  "url": "https://telegra.ph/Weekly-update-10-16",
  "views": 3
}
```

### Get a page

Read any Telegraph page: its title, author, number of views and content, as HTML and as plain text.

**Inputs**

- Page (`page`, text, required): The page: pick one of yours, or give the address of any Telegraph page, such as a link from an earlier step.

**Outputs**

- `author_name` (text): The author shown under the title. Null when there is none.
- `author_url` (text): Where the author's name links to. Null when it links nowhere.
- `content_html` (text): The page's content as HTML, with full links to its pictures, ready for an email or a website.
- `content_text` (text): The page's content as plain text: a blank line between paragraphs, list items starting with -.
- `title` (text): The page's title.
- `url` (text): The page's address, e.g. https://telegra.ph/Weekly-update-10-16.
- `views` (number): How many times the page has been viewed.

**Example output**

```json
{
  "author_name": "Jane Doe",
  "author_url": "https://example.com/",
  "content_html": "<h3>What's new</h3>\n<p>This week we <strong>shipped</strong> two things:</p>\n<ul><li>Faster search</li><li>Dark mode</li></ul>\n<p>Read more at <a href=\"https://lodol.ai/\">https://lodol.ai</a></p>",
  "content_text": "What's new\n\nThis week we shipped two things:\n\n- Faster search\n- Dark mode\n\nRead more at https://lodol.ai",
  "title": "Weekly update",
  "url": "https://telegra.ph/Weekly-update-10-16",
  "views": 0
}
```

### Get account details

Get the connected Telegraph account's name, default author and number of pages, with a link that signs your browser in to the account so you can edit its pages on telegra.ph.

**Inputs**: None.

**Outputs**

- `account_name` (text): The account's name, which only its owner sees, above the Publish button on telegra.ph.
- `author_name` (text): The author name new pages are published under. Null when there is none.
- `author_url` (text): Where that author name links to. Null when it links nowhere.
- `page_count` (number): How many pages the account has published.
- `sign_in_url` (text): Open this to sign your browser in to the account and edit its pages on telegra.ph. It works once, within 5 minutes.

**Example output**

```json
{
  "account_name": "Lodol",
  "author_name": "Jane Doe",
  "author_url": "https://example.com/",
  "page_count": 2,
  "sign_in_url": "https://edit.telegra.ph/auth/lu7Gk3oDSqhR4bUa4yeCkkjM1JZx2zKMmqfNRNBzc8"
}
```

### Get page views

Count how many times a Telegraph page has been viewed: in all, or in one year, month, day or hour. Telegraph counts in UTC, a minute or so behind.

**Inputs**

- Page (`page`, text, required): The page: pick one of yours, or give the address of any Telegraph page, such as a link from an earlier step.
- Period (`period`, text): Which views to count. One of: `all_time` (All time), `year` (One year), `month` (One month), `day` (One day), `hour` (One hour). Default: `all_time`.
- Date (`date`, date): Any day in the year, month or day to count. Days run midnight to midnight UTC. Only when Period is One year, One month or One day.
- Hour (`hour`, date and time): Any time within the hour to count, such as 14:00 for the views from 14:00 to 15:00. Only when Period is One hour.

**Outputs**

- `period` (text): The period counted: all_time, year, month, day or hour.
- `period_end` (text): When the period ends, e.g. 2026-10-17T00:00:00Z. Null for all time.
- `period_label` (text): The period in words, e.g. 16 October 2026 (UTC).
- `period_start` (text): When the period starts, e.g. 2026-10-16T00:00:00Z. Null for all time.
- `url` (text): The page's address, e.g. https://telegra.ph/Weekly-update-10-16.
- `views` (number): How many times the page was viewed in the period.

**Example output**

```json
{
  "period": "day",
  "period_end": "2026-10-17T00:00:00Z",
  "period_label": "16 October 2026 (UTC)",
  "period_start": "2026-10-16T00:00:00Z",
  "url": "https://telegra.ph/Weekly-update-10-16",
  "views": 5
}
```

### List pages

List the pages this Telegraph account has published, newest first, with each one's link, title, opening words and views.

**Inputs**

- How many (`limit`, number): How many pages to list, up to 200. From 1 to 200. Default: `50`.
- Skip (`offset`, number): How many of the newest pages to skip, to list the next ones. At least 0. Default: `0`.

**Outputs**

- `has_more` (true/false): Whether there are more pages after these. List them with Skip.
- `pages` (list): The pages, newest first.
- `total` (number): How many pages the account has in all.

**Example output**

```json
{
  "has_more": false,
  "pages": [
    {
      "author_name": "Jane Doe",
      "author_url": "https://example.com/",
      "description": "Updated: both are live now.",
      "title": "Weekly update",
      "url": "https://telegra.ph/Weekly-update-10-16",
      "views": 3
    },
    {
      "author_name": "Jane Doe",
      "author_url": "https://example.com/",
      "description": "What's new\nThis week we shipped two things:",
      "title": "Launch notes",
      "url": "https://telegra.ph/Launch-notes-10-09",
      "views": 41
    }
  ],
  "total": 2
}
```

### Publish a page

Publish a new public page on telegra.ph from text written in Markdown or HTML, and get its link. It shows your account's author name unless you give another.

**Inputs**

- Title (`title`, text, required): The page's title, up to 256 characters. The page's address is made from it and the date, such as telegra.ph/Weekly-update-10-16.
- Content (`content`, text, required): What the page says, in Markdown (# Heading, **bold**, lists, [links](https://example.com)) or HTML. Pictures and videos go by web address. Telegraph has two heading sizes, so ### and smaller become the small one, and a table becomes a line per row.
- Author name (`author_name`, text): The name shown under the title. Leave empty for your account's author name.
- Author link (`author_url`, text): Where the author name links to: a web address, or a Telegram @username. Leave empty for your account's author link.

**Outputs**

- `author_name` (text): The author shown under the title. Null when there is none.
- `author_url` (text): Where the author's name links to. Null when it links nowhere.
- `content_html` (text): The page's content as HTML, with full links to its pictures, ready for an email or a website.
- `content_text` (text): The page's content as plain text: a blank line between paragraphs, list items starting with -.
- `title` (text): The page's title.
- `url` (text): The page's address, e.g. https://telegra.ph/Weekly-update-10-16.
- `views` (number): How many times the page has been viewed.

**Example output**

```json
{
  "author_name": "Jane Doe",
  "author_url": "https://example.com/",
  "content_html": "<h3>What's new</h3>\n<p>This week we <strong>shipped</strong> two things:</p>\n<ul><li>Faster search</li><li>Dark mode</li></ul>\n<p>Read more at <a href=\"https://lodol.ai/\">https://lodol.ai</a></p>",
  "content_text": "What's new\n\nThis week we shipped two things:\n\n- Faster search\n- Dark mode\n\nRead more at https://lodol.ai",
  "title": "Weekly update",
  "url": "https://telegra.ph/Weekly-update-10-16",
  "views": 0
}
```

### Update account details

Change the Telegraph account's name, or the author name and link that new pages are published under. Whatever you leave empty stays as it is.

**Inputs**

- Account name (`account_name`, text): A new name for the account, up to 32 characters. Only you see it, above the Publish button on telegra.ph.
- Author name (`author_name`, text): The name new pages show under their title. Pages already published keep theirs.
- Author link (`author_url`, text): Where that name links to: a web address, or a Telegram @username.

**Outputs**

- `account_name` (text): The account's name, which only its owner sees, above the Publish button on telegra.ph.
- `author_name` (text): The author name new pages are published under. Null when there is none.
- `author_url` (text): Where that author name links to. Null when it links nowhere.

**Example output**

```json
{
  "account_name": "Lodol",
  "author_name": "Jane Doe",
  "author_url": "https://example.com/"
}
```
