Генерация счетов в PDF из Google Таблиц с PDF.co Продолжение
Полный HTML-шаблон для PDF.co
Используйте этот HTML-код при создании шаблона PDF.co:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Invoice {{invoiceNumber}}</title>
<style>
body { font-family: Arial, Helvetica, sans-serif; margin: 36px; color: #222; }
.header { display: flex; justify-content: space-between; align-items: center; }
.brand { max-height: 56px; }
h1 { margin: 12px 0 4px; font-size: 22px; }
.meta { font-size: 12px; color: #555; }
.two-col { display: flex; gap: 24px; margin-top: 16px; }
.box { flex: 1; border: 1px solid #ddd; padding: 12px; border-radius: 6px; }
.label { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: .02em; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { border-bottom: 1px solid #eee; padding: 10px 8px; font-size: 13px; }
th { background: #fafafa; text-align: left; }
tfoot td { border-top: 2px solid #ddd; font-size: 13px; }
.right { text-align: right; }
.totals td { padding: 6px 8px; }
.grand { font-weight: 700; font-size: 14px; }
.notes { margin-top: 18px; font-size: 12px; color: #444; }
</style>
</head>
<body>
<div>
<div>
<div>Date: {{invoiceDate}} | Due: {{dueDate}}</div>
</div>
{{#company.logoUrl}}
<img src alt="Logo" />
{{/company.logoUrl}}
</div>
<div>
<div>
<div>From</div>
<div><strong>{{company.name}}</strong></div>
<div>{{company.address}}</div>
<div>{{company.phone}}</div>
<div>{{company.email}}</div>
</div>
<div>
<div>Bill To</div>
<div><strong>{{billTo.name}}</strong></div>
<div>{{billTo.address}}</div>
<div>{{billTo.email}}</div>
</div>
</div>
<table>
<thead>
<tr>
<th>#</th>
<th>Description</th>
<th>Qty</th>
<th>Unit Price</th>
<th>Line Total</th>
</tr>
</thead>
<tbody>
{{#items}}
<tr>
<td>{{line}}</td>
<td>{{description}}</td>
<td>{{qty}}</td>
<td>{{unitPriceFmt}}</td>
<td>{{lineTotalFmt}}</td>
</tr>
{{/items}}
</tbody>
<tfoot>
<tr>
<td colspan="4">Subtotal</td>
<td>{{subTotalFmt}}</td>
</tr>
<tr>
<td colspan="4">Tax ({{taxRatePct}})</td>
<td>{{taxAmountFmt}}</td>
</tr>
<tr>
<td colspan="4">Discount</td>
<td>-{{discountFmt}}</td>
</tr>
<tr>
<td colspan="4">Total</td>
<td>{{totalFmt}}</td>
</tr>
</tfoot>
</table>
<div>
<strong>Notes:</strong> {{notes}}<br />
<strong>Terms:</strong> {{terms}}
</div>
</body>
</html>
А получить workflow «Автоматизируем создание PDF-счетов: готовый workflow-шаблон для n8n с Google Таблицами и PDF.co» и другие шаблоны для n8n (более 1000 готовых сценариев автоматизации) вы можете в нашем Закрытом Нейроклубе по кнопке ниже:
Напишите в комментариях, какой шаблон для n8n вам нужен и какие задачи он должен выполнять. Я подберу подходящее решение или добавлю новый workflow.Также рекомендуем подписаться на наш Telegram-канал AI Мастерская.
Там выходят подробные разборы популярных сценариев для n8n, реальные кейсы автоматизации бизнеса и примеры, где рутинную работу полностью берут на себя роботы, а не человек.


