sorted
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSorted — Freelancer Tax & Invoicing Automation
Sorted — 自由职业者税务与发票自动化
Automates getSorted.de via real Chrome Beta browser for invoicing, expense tracking, and German tax report submissions.
通过真实Chrome Beta浏览器自动化getSorted.de的发票开具、费用追踪以及德国税务报告提交流程。
Prerequisites
前置条件
- Chrome Beta with (use
--remote-debugging-port=9222launch sequence)/real-browser - Google account session persisted in
~/.chrome-beta-profile - CLI installed
agent-browser
- 启用参数的Chrome Beta(使用
--remote-debugging-port=9222启动序列)/real-browser - 已在中持久化的Google账户会话
~/.chrome-beta-profile - 已安装CLI
agent-browser
Commands
命令
invoice create
invoice createinvoice create
invoice createCreate a new invoice on Sorted.
Required params: client name, amount
Optional: hours, rate, description, due date, service date, client type (business/person)
在Sorted上创建新发票。
必填参数: 客户名称、金额
可选参数: 工时、费率、描述、到期日、服务日期、客户类型(企业/个人)
invoice download <invoice-number>
invoice download <invoice-number>invoice download <invoice-number>
invoice download <invoice-number>Download a properly formatted PDF from Sorted (not browser print).
从Sorted下载格式规范的PDF文件(非浏览器打印版)。
invoice send <invoice-number> --email <email>
invoice send <invoice-number> --email <email>invoice send <invoice-number> --email <email>
invoice send <invoice-number> --email <email>Send invoice via email directly from Sorted (paid plan only). On free plan, downloads PDF and sends via Telegram instead.
直接从Sorted通过电子邮件发送发票(仅付费计划可用)。免费计划下,将下载PDF并通过Telegram发送。
invoice list
invoice listinvoice list
invoice listList all invoices with status (paid/unpaid).
列出所有发票及其状态(已支付/未支付)。
expense add
expense addexpense add
expense addAdd an expense entry.
添加费用条目。
tax status
tax statustax status
tax statusShow current tax obligations, deadlines, and overdue reports.
显示当前税务义务、截止日期及逾期报告。
tax preview <report-type> <period>
tax preview <report-type> <period>tax preview <report-type> <period>
tax preview <report-type> <period>Preview a tax report before submission.
提交前预览税务报告。
tax submit <report-type> <period>
tax submit <report-type> <period>tax submit <report-type> <period>
tax submit <report-type> <period>Submit a tax report to Finanzamt via ELSTER (requires paid plan).
通过ELSTER向Finanzamt提交税务报告(需付费计划)。
Sorted Navigation
Sorted导航
App URL:
https://app.getsorted.de/| Section | Sidebar link | Purpose |
|---|---|---|
| Dashboard | Sorted (logo) | Overview: taxes owed, income, expenses |
| Taxes | Taxes | Tax reports, deadlines, submissions |
| Income | Income | Invoice list, create/edit invoices |
| Expenses | Expenses | Expense tracking, receipts |
| Tax consultant | Tax consultant | Advisor connection |
| Personal details | Profile → Personal details | Freelancer info, Steuernummer |
| Bank accounts | Profile → Bank accounts (Beta) | Connected banks |
| Subscription | Profile → Subscription | Plan management |
| Import | Profile → Import your data | Bulk data import |
| Settings | Profile → Settings | App preferences |
应用URL:
https://app.getsorted.de/| 板块 | 侧边栏链接 | 用途 |
|---|---|---|
| 仪表盘 | Sorted(logo) | 概览:应缴税款、收入、支出 |
| 税务 | Taxes | 税务报告、截止日期、提交 |
| 收入 | Income | 发票列表、创建/编辑发票 |
| 支出 | Expenses | 费用追踪、收据管理 |
| 税务顾问 | Tax consultant | 顾问关联 |
| 个人信息 | Profile → Personal details | 自由职业者信息、Steuernummer |
| 银行账户 | Profile → Bank accounts (Beta) | 关联银行账户 |
| 订阅 | Profile → Subscription | 计划管理 |
| 导入 | Profile → Import your data | 批量数据导入 |
| 设置 | Profile → Settings | 应用偏好设置 |
Tax Report Types
税务报告类型
| Report | German name | Frequency | Description |
|---|---|---|---|
| Advance VAT | Umsatzsteuer-Voranmeldung (UStVA) | Quarterly | VAT collected on invoices |
| EU Summary | Zusammenfassende Meldung (ZM) | Quarterly | Revenue from EU customers |
| Annual Returns | EÜR + Einkommensteuererklärung | Yearly | Profit/loss + income tax |
| 报告 | 德语名称 | 频率 | 描述 |
|---|---|---|---|
| 增值税预缴 | Umsatzsteuer-Voranmeldung (UStVA) | 按季度 | 发票收取的增值税 |
| EU汇总报告 | Zusammenfassende Meldung (ZM) | 按季度 | 来自欧盟客户的收入 |
| 年度申报表 | EÜR + Einkommensteuererklärung | 按年度 | 盈亏 + 所得税 |
Invoice Creation Flow
发票创建流程
Step-by-step browser automation:
分步浏览器自动化:
- Navigate: → click
Income→AddCreate invoice - Set client: Click area on invoice preview
Client details- Search existing clients or click
Add new client - Choose or
BusinessPrivate person - Fill: name, VAT/TIN, street, city, zip, country (autocomplete dropdown — type then click match), email (optional)
- Click in dialog
Save
- Search existing clients or click
- Set invoice date: Click the date next to "Invoice date" (defaults to today)
- Set service date (REQUIRED): Click the empty area to the right of invoice date labeled "Service date"
- This is a date range picker — select start date, then end date
- If same-day service, click the same date twice
- Without service date, Save will fail silently — the field shows "Required" in red
- The clickable element has class and is positioned at ~x:734 y:413 on the invoice preview
clickable - If snapshot doesn't show it, use JS: find div with text "Service dateRequired" and click it
- Set due date: Click "Select date" under "Due date" → pick from calendar
- Add line item: Click
Add a line- Fields: description (text), quantity (number), unit dropdown (h/pcs/etc), rate (number)
- Click on collapsed values to re-edit them
- VAT: Automatically 0% for Kleinunternehmer accounts. Shows "Service not taxable in Germany" in notes
- Save: Click button. Title changes from "Add invoice" to "Edit invoice" on success
Save
- 导航: → 点击
Income→AddCreate invoice - 设置客户: 点击发票预览区的区域
Client details- 搜索现有客户或点击
Add new client - 选择或
BusinessPrivate person - 填写:名称、VAT/TIN、街道、城市、邮编、国家(自动补全下拉框 — 输入后点击匹配项)、电子邮件(可选)
- 点击对话框中的
Save
- 搜索现有客户或点击
- 设置发票日期: 点击“Invoice date”旁的日期(默认当天)
- 设置服务日期(必填): 点击发票日期右侧标有“Service date”的空白区域
- 这是一个日期范围选择器 — 选择开始日期,再选择结束日期
- 若为当日服务,点击同一日期两次
- 未设置服务日期时,Save会静默失败 — 该字段会显示红色的“Required”
- 可点击元素带有类,在发票预览上的位置约为x:734 y:413
clickable - 若快照未显示该元素,使用JS:找到文本为“Service dateRequired”的div并点击
- 设置到期日: 点击“Due date”下的“Select date” → 从日历中选择
- 添加行项目: 点击
Add a line- 字段:描述(文本)、数量(数字)、单位下拉框(h/pcs等)、费率(数字)
- 点击已折叠的值可重新编辑
- VAT: Kleinunternehmer账户自动设为0%。备注中显示“Service not taxable in Germany”
- 保存: 点击按钮。成功后标题会从“Add invoice”变为“Edit invoice”
Save
Gotchas
注意事项
- Service date is mandatory but easy to miss — it's not highlighted until you try to save
- German number formatting: dots are thousands separators (1.000 = one thousand), commas are decimals
- Collapsed fields: After saving, line item fields collapse to display-only. Click the displayed value to re-open the editable field
- Invoice number: Auto-generated sequentially (e.g., 2025-03-21). Can be edited by clicking it
- 服务日期为必填项但容易遗漏 — 只有尝试保存时才会高亮提示
- 德语数字格式: 点号是千位分隔符(1.000 = 一千),逗号是小数点
- 折叠字段: 保存后,行项目字段会折叠为仅显示状态。点击显示的值可重新打开编辑字段
- 发票编号: 自动按顺序生成(例如:2025-03-21)。点击可编辑
Invoice PDF Download Flow
发票PDF下载流程
CRITICAL: Do NOT use Chrome CDP — it captures the entire page including sidebar and settings panel. Always use Sorted's native PDF.
Page.printToPDF重要提示:请勿使用Chrome CDP的 — 它会捕获包括侧边栏和设置面板在内的整个页面。请始终使用Sorted的原生PDF。
Page.printToPDFStep-by-step:
分步操作:
- Open the invoice (click from Income list, or navigate after creating)
- Click button (top right, teal button)
Save and send - An "Email invoice" dialog appears with:
- To field (email)
- Subject (auto-filled)
- Message textarea
- Attachments section at the bottom showing the PDF filename
- Click the PDF link (e.g., )
ALL3 DOO BELGRADE-2025-03-21-20260506.pdf- It's a element with
genericandcursor:pointeronclick - The text matches pattern:
{CLIENT_NAME}-{INVOICE_NUMBER}-{DATE}.pdf
- It's a
- PDF downloads to
~/Downloads/ - Close the dialog (click or
Close)×
- 打开发票(从Income列表点击,或创建后导航至发票页面)
- 点击按钮(右上角,蓝绿色按钮)
Save and send - 弹出**“Email invoice”**对话框,包含:
- 收件人字段(邮箱)
- 主题(自动填充)
- 消息文本框
- 底部的附件区域,显示PDF文件名
- 点击PDF链接(例如:)
ALL3 DOO BELGRADE-2025-03-21-20260506.pdf- 这是一个元素,带有
generic和cursor:pointer属性onclick - 文本匹配模式:
{CLIENT_NAME}-{INVOICE_NUMBER}-{DATE}.pdf
- 这是一个
- PDF下载至目录
~/Downloads/ - 关闭对话框(点击或
Close)×
Email sending (paid plan)
邮件发送(付费计划)
On paid plans, the "Email invoice" dialog is fully functional:
- Fill field with client email (
To)@e49 - Edit if needed (auto-filled as "Gleb Kalinin sent you an invoice (#INVOICE-NUMBER)")
Subject - Write a in the textarea
Message - Toggle "Send a copy to my email" checkbox (checked by default)
- Click button (
Email invoice) to send@e15
On the free plan, the dialog shows "Sending invoices by email is not available in your plan" with a "Change my plan" link. The PDF download still works regardless.
付费计划下,“Email invoice”对话框功能完整:
- 在字段填写客户邮箱(
To)@e49 - 按需编辑(自动填充为“Gleb Kalinin sent you an invoice (#INVOICE-NUMBER)”)
Subject - 在文本框中撰写
Message - 切换“Send a copy to my email”复选框(默认已勾选)
- 点击按钮(
Email invoice)发送@e15
免费计划下,对话框会显示“Sending invoices by email is not available in your plan”及“Change my plan”链接。无论如何,PDF下载功能仍可正常使用。
Fallback: Telegram delivery (free plan)
备用方案:Telegram发送(免费计划)
When email sending is unavailable, download the PDF and send via Telethon (see "Sending Invoice After Download" section below).
当邮件发送不可用时,下载PDF后通过Telethon发送(见下方“下载后发送发票”部分)。
PDF filename pattern
PDF文件名模式
{CLIENT_NAME}-{INVOICE_NUMBER}-{YYYYMMDD}.pdfExample:
ALL3 DOO BELGRADE-2025-03-21-20260506.pdf{CLIENT_NAME}-{INVOICE_NUMBER}-{YYYYMMDD}.pdf示例:
ALL3 DOO BELGRADE-2025-03-21-20260506.pdfClient Management
客户管理
Existing clients are stored and reusable. When creating an invoice:
- The client picker shows all saved clients
- Search by name in the search box
- Edit/delete clients via small buttons next to each name
现有客户会被存储并可重复使用。创建发票时:
- 客户选择器显示所有已保存的客户
- 在搜索框中按名称搜索
- 通过每个名称旁的小按钮编辑/删除客户
Client fields (Business)
客户字段(企业)
- Business name (required)
- VAT number / TIN (optional)
- Street & Number
- City
- Zip Code
- Country (autocomplete — type and click match)
- 企业名称(必填)
- VAT编号/TIN(可选)
- 街道及门牌号
- 城市
- 邮编
- 国家(自动补全 — 输入后点击匹配项)
- 电子邮件
Client fields (Private person)
客户字段(个人)
- First name, Last name
- Address fields same as business
- 名、姓
- 地址字段与企业客户相同
Sending Invoice After Download
下载后发送发票
After downloading the PDF, send via Telegram using Telethon:
python
from telethon.sync import TelegramClient
import json
from pathlib import Path
config = json.loads((Path.home() / '.telegram_dl' / 'config.json').read_text())
session = str(Path.home() / '.telegram_dl' / 'user')
with TelegramClient(session, config['api_id'], config['api_hash']) as client:
client.send_file("username", "/path/to/invoice.pdf", caption="message")下载PDF后,使用Telethon通过Telegram发送:
python
from telethon.sync import TelegramClient
import json
from pathlib import Path
config = json.loads((Path.home() / '.telegram_dl' / 'config.json').read_text())
session = str(Path.home() / '.telegram_dl' / 'user')
with TelegramClient(session, config['api_id'], config['api_hash']) as client:
client.send_file("username", "/path/to/invoice.pdf", caption="message")Gleb's Sorted Account Details
Gleb的Sorted账户详情
- Status: Kleinunternehmer (no VAT charged)
- Finanzamt: Berlin - Wedding
- VAT-ID: DE369692682
- Tax Number: 2337201265
- Bank: Revolut Bank UAB, Zweigniederlassung
- IBAN: DE38 1001 0178 8157 1777 30
- BIC/SWIFT: REVODEB2
- Plan: Free (invoicing works, tax submission requires upgrade)
- 状态: Kleinunternehmer(无需收取VAT)
- 税务局: Berlin - Wedding
- VAT-ID: DE369692682
- 税号: 2337201265
- 银行: Revolut Bank UAB, Zweigniederlassung
- IBAN: DE38 1001 0178 8157 1777 30
- BIC/SWIFT: REVODEB2
- 计划: 免费版(发票功能可用,税务提交需升级)
Browser Session Setup
浏览器会话设置
Always use the skill's launch sequence. Session name should be unique per run:
/real-browserbash
SESSION=$(LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | head -c 6)
agent-browser --cdp 9222 --session "$SESSION" open "https://app.getsorted.de/"Google login is persisted — no need to re-authenticate each time.
请始终使用技能的启动序列。每次运行的会话名称应唯一:
/real-browserbash
SESSION=$(LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | head -c 6)
agent-browser --cdp 9222 --session "$SESSION" open "https://app.getsorted.de/"Google登录状态已持久化 — 无需每次重新验证。