Ana içeriğe geç

HTML şablon içinde Make

O HTML şablon ailesi bir Make Belge Oluştur Tek seçenek, bir belge oluşturur .html Düzeni bitmiş bir belgeye dönüştürür. Alıcı adı alanı ve satır öğesi döngüsü gibi bıyık etiketlerini, düzeninizle birleştirir. JSON veri ve çıktılar a PDF veya HTML Dosyayı zaten yöneten ekipler için uygundur. Bu, halihazırda dosyayı yöneten ekipler için idealdir. HTML veya e-posta şablonları.

İlgili Blog Yazıları
Bu özellik için henüz bir blog yazısı yok — yakında yayınlanacak.
Bu arada, her platforma yönelik eğitimler ve iş akışları için PDF4me bloguna göz atın.
Blogu ziyaret edin

Başlamadan Önce

HTML bıyık etiketli şablon
Örnek fatura_örneği_1.html İç içe geçmiş yollara sahip eksiksiz bir fatura düzenidir ve altbilgi Satır öğesi döngüsü. Yollar sizinle eşleşmelidir. JSON Yapı tam olarak böyle.
Eşleşen veri dosyası
Kullanmak fatura_örnek_veri_1.json (tavsiye edilen), test.xml, veya test.csv. JSON iç içe nesneler ve bir altbilgi sıralamak.
PDF4me bağlantıda Make
Bir tane oluşturun PDF4me bağlantıda Make ve yapıştırın API Aynı tuş her cihazda çalışır. PDF4me Senaryonuzdaki modül.

Örnek Dosya Paketi

Aşağıdaki dosyaları indirin. Bir HTML şablon artı eşleşen veriler JSON, XML, Ve CSV.

PDF4me'nin Şablon Kullanarak Belge Oluşturma modülü, Bağlantıyı gösteriyor, Şablon Adı PDF4me deposundan örnek bir şablona ayarlanmış, Belge Veri Türü Json, Belge Veri Metni boş, Belge Veri Dosyası önceki 2. adımdan eşlenmiş. Veri ve Meta Veri Json boş.

Hedef yapılandırması: PDF4me HTML Şablon + JSON içinde Belge Verileri Metni + PDF çıktı.

Nedir bu? HTML şablon şablon içinde Make?

O HTML Şablon ailesi, tarayıcı tarzında bir görünüm oluşturur. .html satır içi düzen CSS Bir belgeye dönüştürülür. Mustache sözdizimiyle yazılmış yer tutucular verilerinizden alınır ve döngü bloğu... {{#each subInfo}} Her satır öğesi için tablo satırını tekrarlar. Pazarlama için seçin. PDFs ve ekibinizin halihazırda tuttuğu marka stiline uygun faturalar HTML.

Nasıl yapılandırırım? HTML şablon içinde Make?

Modül alanlarını aşağıdaki gibi ayarlayın. Zorunlu alanlar kırmızı yıldız işaretiyle belirtilmiştir. Make UI.

ParametreGerekliNe işe yarar?Örnek
ConnectionRequiredPDF4me connection for the scenario. Click Add to create one with your API key.My PDF4me connection
Template File TypeRequiredSet to PDF4me HTML Template for this template family.PDF4me HTML Template
Output TypeRequiredFormat of the generated document. PDF for a print-ready file, or HTML for an email body or web preview.PDF
Template NameRequiredTemplate file name including extension. Map from the prior module file name output.invoice_sample_1.html
TemplateRequiredTemplate file binary. Map from the prior module data output (for example 1. Data from Dropbox Download a File).1. Data
Document DataTypeRequiredChoose Json for JSON payloads (most common) or Xml when the upstream system returns XML.Json
Document Data TextConditionalInline JSON or XML data. Use when Document Data File is empty.invoice_sample_data_1.json
Document Data FileConditionalMapped data file from a prior module. Use when Document Data Text is empty.1. Data

Çıktı

Bu modül, her çalıştırmada bir paket döndürür. Oluşturulan dosya şu konuma yerleştirilir: Belge Tarihi Çıkış alanı.

AlanTipİçeriğinde neler var?
Doc DataBinaryThe generated PDF document. Map into a downstream Upload File or Send Email Attachment module.
File NameStringOutput filename based on Template Name with the extension matching Output Type.
Mime TypeStringMIME type of the generated document.

Üretim modelleri

HTML şablonları için yaygın kullanılan Make kalıplarıReplace the manual test with these once the sample works.
Bulut depolamadan şablon
  1. Dropbox veya Google Drive mağazalar fatura_örneği_1.html.
  2. Dosya İndir seçeneği şablonu ikili veri olarak yükler.
  3. Belge Oluştur Tek harita Şablon Adı ve Şablon.
  4. Veriler şunlardan oluşturulur: Sheets veya bir webhook olarak JSON.
Teslim edilecek webhook PDF
  1. Webhook, kayıt yükünü alır.
  2. Tekli Belge Oluştur seçeneği, belgeyi şablonla birleştirir.
  3. Çıktı Türü PDF.
  4. E-posta Gönder veya Dosya Yükle seçeneği Belge Verilerini iletir.
Veri kaynağından toplu işlem
  1. Arama kayıtları birçok satır döndürür.
  2. Yineleyici, her seferinde yalnızca bir kaydı döngüye alır.
  3. Belge Oluşturma işlemi, her kayıt için yalnızca bir kez çalışır.
  4. Her dosya, kayıt başına ayrı bir klasöre yüklenir.

Sıkça Sorulan Sorular

Can HTML templates output a PDF in Make?+
Yes. Set Output Type to PDF for a print-ready file, or HTML for an email body or web preview. The same invoice_sample_1.html renders either way.
How do line items work in the sample?+
The subInfo array in the JSON drives the each subInfo block in the HTML table. Each object renders one row with plan, quantity, vat, and totalPrice. Add or remove array items to change the row count.
Why does test.csv have two rows?+
CSV flattens nested data. Each row is one line item while repeating the shared invoice fields such as recipient and dates. Both rows share the same totalAmount.
JSON, XML, or CSV: which should I use?+
JSON is best because it matches the nested mustache paths and the subInfo array. XML uses PascalCase elements. CSV suits spreadsheet exports but uses flattened column names.

İlgili Kılavuzlar

Temel şablon motoru için bkz. Sözcük Türleri .NET dokümantasyon ve Make veri yapıları referansı.