---
title: "Telegram resume and cover letter bot with AI and LaTeX"
kind: "Kit"
category: "Writing"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/96394f6b-62e2-4cd2-8184-b697ac3d2131"
updated: "2026-11-12"
---

# Telegram resume and cover letter bot with AI and LaTeX

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that turns a Telegram bot into a resume assistant. It keeps each person’s profile in Supabase, tailors it to a job description, and sends back resume and cover letter PDFs built from LaTeX.

Telegram resume and cover letter bot with AI and LaTeX is an n8n workflow in the Writing category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow turns a Telegram bot into a resume and cover letter assistant. A person sends a resume as a PDF, or types details about themselves. An AI model reads it and keeps a profile for that person in Supabase. Commands then show the profile, tailor it to a job description, check it against the job’s keywords and write a cover letter. The PDF files are compiled from LaTeX on your own server and sent back in the chat. Ninety-eight nodes do the work.

### Who it suits

Career coaches, bootcamps and job seekers who want a resume kept up to date by chat. It also suits builders who want a large, real example of an n8n bot with commands, memory and a database. Running it means storing people’s resumes, so it fits a service for people who agreed to that.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Career services | Coaches | Keep a client’s master resume and tailor it for each job | A coach asks the bot to tailor a client’s profile to a posted role and sends back the PDF. |
| Education | Bootcamps | Give graduates a resume tool they can use in a chat | A bootcamp shares the bot with a cohort that uploads their resumes. |
| Recruiting | Staffing agencies | Turn a messy PDF into a clean layout that tracking systems read | A recruiter uploads a candidate’s resume and gets a compiled version. |
| Software | Developers | Study a bot with commands, memory and a LaTeX build | A developer swaps Supabase for another table and keeps the rest. |

This is a large setup: you need n8n, a Supabase table, two model accounts and a server with LaTeX. Nothing in the file states a setup time.

### Where to use it

Any n8n that can reach Telegram, Supabase, Ollama’s cloud, Cerebras and your server will run it.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- Your own models: point the two credentials at any OpenAI compatible address and change the model names
- Another layout: edit the LaTeX templates in the two code nodes

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Five accounts cover every step.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Telegram | A bot made with @BotFather |
| Supabase | A \`Profiles\` table with \`telegram\_id\`, \`telegram\_username\`, \`master\_profile\` and \`tailored\_profile\`, plus the project URL and the service role key |
| Ollama and Cerebras | One API key for each, for the main and the fallback models |
| A Linux server | SSH with a password, and a full TeX Live install with \`pdflatex\` |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add a Telegram credential with your bot token and select it in `Telegram Trigger` and in every Telegram node.
3. Create the `Profiles` table in Supabase. Add a Supabase credential and select it in the seven Supabase nodes.
4. Add an OpenAI credential whose base URL is `https://ollama.com/v1` and whose key is your Ollama key. Select it in `Ollama`, `Ollama JD`, `Ollama Fix LaTeX Model`, `Ollama CL Model`, `Classifier Model`, `Classifier Model1` and `Ollama ATS Model`.
5. Add a second OpenAI credential whose base URL is `https://api.cerebras.ai/v1` and whose key is your Cerebras key. Select it in the seven nodes whose names start with `Cerebras`.
6. Add an SSH credential for your server and select it in `Write LaTeX File`, `Write LaTeX File (Retry)`, `Read PDF Base64` and `Compile Cover Letter`.
7. Publish the workflow, open your bot, send `/start` and then a resume as a PDF.
8. Send `/view` and `/download` and check that a PDF comes back.

### How to use it

Publish the workflow and open your bot. Send a resume as a PDF, then use the commands: `/view`, `/download`, `/optimize` with a job description, `/viewoptimized`, `/downloadoptimized`, `/coverletter`, `/analyze` with a job description, and `/clear`.

What to change for a different result

| To change | Where |
| --- | --- |
| The resume layout | The template in \`Generate LaTeX\` |
| The cover letter layout | The template in \`Generate LaTeX Cover Letter\` |
| The voice of the cover letter | The system message of \`AI Cover Letter Agent\` |
| What counts as a complete profile | The checks in \`Assess Master Profile\` |
| The welcome text and the command list | \`Telegram Info Reply\` |
| The models | The seven main model nodes and their seven fallbacks |

### Example

You send a resume PDF, then send `/optimize` with a job description pasted after it.

The bot reads the PDF and saves your master profile. The tailoring step writes a second profile aimed at that job and saves it next to the first. You then send `/downloadoptimized`, and the bot replies with a compiled PDF and its LaTeX source.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A router reads each message and sends it down the right path. LaTeX is a typesetting language, and a program called pdflatex turns it into a PDF, which is why a server is needed.

**For experts.** Seven agents share one pattern. Each has a main model, a Cerebras fallback and 3 tries.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Command Router\` | A Switch node with sixteen outputs that reads the message text or the button data | \`/optimize\` and \`/analyze\` with no job description go to a warning |
| \`Intent Classifier\` | An agent that sorts free text into a question or an update | \`Parse Intent\` checks the first words first and trusts the model only when they do not decide |
| \`AI Agent\` | Turns the PDF text or a chat message into profile changes, with \`Window Buffer Memory\` | The memory is keyed by the chat id |
| \`Supabase Fetch by ID\` | Looks up the row by chat id, with \`Supabase Fetch by Username\` as a second try | \`Check Migration Needed\` fills in the id for a row found by user name |
| \`Write LaTeX File\` | An SSH node that writes the source from base64 and runs \`pdflatex\` twice | It prints SUCCESS or the compile log, and \`If Compile Success\` reads that |
| \`AI Fix LaTeX Agent\` | Rewrites the source after a failed compile | One retry, then \`Send Compile Error Msg\` |

### Good to know

It keeps people’s resumes, so treat it with care.

- Personal data: each resume is stored in your Supabase table, and its text goes to Ollama and to Cerebras. Tell your users and delete rows when they ask
- \`/clear\`: it deletes the profile at once, with no confirmation step
- Your server: the SSH nodes run shell commands on it. The LaTeX is passed as base64, so what the model writes is not run as a command. Use a server and a user account that hold nothing else
- Files: temporary files go to \`/tmp\` and are removed after a good run. A failed run can leave some behind
- Models: the original copy used \`qwen3-coder:480b\`, \`rnj-1:8b\` and the Cerebras model \`zai-glm-4.7\`. Ollama’s cloud list, read on 12 November 2026, shows neither of the first two, and Cerebras deprecated the third on 17 August 2026. Mindket’s copy uses \`gpt-oss:120b\`, \`gpt-oss:20b\` and \`gpt-oss-120b\`
- Billing: each message can use up to 3 tries on a main model before its fallback runs. The compile uses your own server
- Telegram text: the messages use HTML formatting, and the workflow escapes the model’s text first
- Not run: Mindket did not run the workflow, the Ollama and Cerebras calls or the SSH step. It read n8n’s source and the vendors’ pages instead
- Credentials: the JSON holds none

## README

```markdown
# Telegram resume and cover letter bot with AI and LaTeX

An n8n workflow that turns a Telegram bot into a resume and cover letter assistant. A person sends a resume as a PDF, or just types details about themselves. An AI model reads it and keeps a profile for that person in Supabase. Commands then show the profile, tailor it to a job description, check it against the job's keywords, write a cover letter and send back compiled PDF files. Ninety-eight nodes do the work.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 98 nodes and no sticky notes. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

Mindket cleaned the copy and swapped the retired models:

- The seven main chat models used `qwen3-coder:480b` and `rnj-1:8b` on Ollama's cloud. Ollama's cloud model list, read on 12 November 2026, shows neither. The four larger ones now use `gpt-oss:120b` and the three smaller ones use `gpt-oss:20b`, both on that list.
- The seven fallback models used the Cerebras model `zai-glm-4.7`, which Cerebras deprecated on 17 August 2026. They now use `gpt-oss-120b`, which is on Cerebras's current shared list.
- Every credential is removed. The Telegram, Supabase, SSH, Ollama and Cerebras credentials are yours to add.
- The file had no settings. Mindket's copy uses the current execution order, `v1`.
- No host name, address or key was in the file, so there was nothing else to replace.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Telegram bot made with @BotFather.
- A Supabase project with a table named `Profiles` and four columns: `telegram_id` (a `bigint`), `telegram_username` (`text`), `master_profile` (`text`) and `tailored_profile` (`text`).
- An Ollama account with an API key, to call its cloud models.
- A Cerebras API key, for the fallback models.
- A Linux server you can reach over SSH with a password, with a full TeX Live install. The template uses packages such as `cfr-lm`, `marvosym` and `tcolorbox`, and the commands `pdflatex` and `base64` must work there.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a Telegram credential with your bot token. Select it in `Telegram Trigger` and in every Telegram node. The nodes that say they need one are marked in n8n.
3. In Supabase, create the `Profiles` table described above. Add a Supabase credential with the project URL and the service role key, and select it in the seven Supabase nodes. Keep the table out of public access, because the service role key skips row security.
4. Add an OpenAI credential whose base URL is `https://ollama.com/v1` and whose key is your Ollama API key. Select it in `Ollama`, `Ollama JD`, `Ollama Fix LaTeX Model`, `Ollama CL Model`, `Classifier Model`, `Classifier Model1` and `Ollama ATS Model`.
5. Add a second OpenAI credential whose base URL is `https://api.cerebras.ai/v1` and whose key is your Cerebras key. Select it in the seven nodes whose names start with `Cerebras`.
6. Add an SSH credential for your server, with its host, port, user name and password. Select it in `Write LaTeX File`, `Write LaTeX File (Retry)`, `Read PDF Base64` and `Compile Cover Letter`.
7. Publish the workflow so the Telegram trigger stays on.
8. Open your bot in Telegram, send `/start`, then send a resume as a PDF.
9. Send `/view`, then `/download`, and check that a PDF comes back.

## How a run goes

1. `Telegram Trigger` takes every message and every button press. It downloads any file that comes with it.
2. `Supabase Fetch by ID` and `Supabase Fetch by Username` look for the person's profile row. `Check Migration Needed` gives a row found only by user name the person's numeric id.
3. `Assess Master Profile` checks that the profile has a name, a contact, a summary, skills, education, work experience and projects. Until it does, most commands answer with what is missing.
4. `Command Router` sends the message down one of sixteen branches. They cover a greeting, `/start` and `/info`, an incomplete profile, media the bot cannot read (a photo, sticker or voice note), `/view`, `/clear`, a PDF upload, chat, `/download`, `/downloadoptimized`, `/optimize`, `/viewoptimized`, `/coverletter` and `/analyze`. Two more branches warn when `/optimize` or `/analyze` comes with no job description.
5. A PDF upload goes through `Extract PDF Text` and `AI Agent`. The agent fills in the profile and `Parse JSON`, `Safe Profile Merge` and `Row Exists?` save it with `Supabase Update` or `Supabase Create`. A file that is not a readable PDF gets an error message.
6. Free text goes to `Intent Classifier`, and `Parse Intent` also checks the first words of the message. A question goes to `Query Agent`, which answers only from the saved profile. Anything else goes to `AI Agent`, which updates the profile, with `Window Buffer Memory` keeping the last turns of that chat.
7. `/optimize` followed by a job description goes to `AI JD Agent`. It writes a tailored copy of the profile and `Supabase Save Tailored` stores it. The master profile stays as it was.
8. `/analyze` followed by a job description goes to `ATS Gap Agent`, which lists the keywords the profile lacks. The reply is split to fit Telegram's message limit.
9. `/download` and `/downloadoptimized` run `Generate LaTeX`, which fills a resume template, and `Write LaTeX File` sends it to your server. The server compiles it twice with `pdflatex`. On success `Read PDF Base64` returns the PDF, and `Send PDF (Telegram)` and `Send LaTeX Source (Telegram)` deliver both files.
10. When the compile fails, `AI Fix LaTeX Agent` rewrites the source, `Write LaTeX File (Retry)` tries once more, and `Send Compile Error Msg` tells the person if that fails too.
11. `/coverletter` uses `AI Cover Letter Agent`, which writes the letter from the tailored profile and its job description, then `Compile Cover Letter` builds the PDF the same way.
12. `/clear` runs `Supabase Clear Profile` and deletes the row at once.

## Change the look

- The resume layout: the template in `Generate LaTeX`.
- The cover letter layout: the template in `Generate LaTeX Cover Letter`.
- The voice of the cover letter: the system message of `AI Cover Letter Agent`.
- What counts as a complete profile: the checks in `Assess Master Profile`.
- The welcome text and the command list: `Telegram Info Reply`.
- The models: the seven chat model nodes and their seven fallbacks.

## Good to know

- Resumes are personal data. Each one is stored in your Supabase table, and its text goes to Ollama and to Cerebras. Tell your users, and delete rows when someone asks.
- `/clear` has no confirmation step. A press on it deletes the profile.
- The SSH nodes run shell commands on your server. The LaTeX text is passed as base64, so what the model writes is not run as a command. Use a server and a user account that hold nothing else.
- Files are written to `/tmp` with the execution number in the name and removed after a successful run. A failed run can leave files behind.
- The Telegram messages use HTML formatting, and the workflow escapes the model's text before sending it.
- Each AI node retries up to 3 times and then falls back to its Cerebras model.
- Mindket did not run the workflow, the Ollama and Cerebras calls, or the SSH step. It read n8n's source and the vendors' pages instead, so test every command once by hand.
- The JSON holds no credential.
```

## What is in it

3 files, 185 KB, downloaded as a zip.

```text
NOTICE.md  529 B
README.md  7 KB
workflow.json  177 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 83 steps, starting on a Telegram event
- AI: 7 steps call an AI model: AI Agent, Intent Classifier, Query Agent, AI Fix LaTeX Agent, AI JD Agent and 2 more
- Sign-ins: Signs in to: Supabase, Telegram and OpenAI
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads 8 of its 9 step types. It does not read: Ssh

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/96394f6b-62e2-4cd2-8184-b697ac3d2131)
- [Its page on Mindket](https://mindket.com/p/96394f6b-62e2-4cd2-8184-b697ac3d2131)
