メインコンテンツへスキップ

ドキュメントを1つ生成 Zapier

ドキュメントを生成 シングル は Zapier アクション PDF4me 単語を融合する、 HTMLメールマージ、またはGoogleドキュメントテンプレート JSON または XML データを使用して、完成したドキュメントを1つ作成します。 CRM 記録を契約書に、注文データを請求書に、フォームの提出内容を証明書に、すべてZap内で処理します。

関連ブログ記事(2)
Dropboxフォルダに新しいファイルができましたか?Zapierでメールマージを実行しましょう。たった6つのステップで、完全に自動化されます!
DropboxからのZapierメールマージ:フォルダ内の新規ファイル、JSONデータの検索、PDF4meによるWord文書(メールマージ)の生成、PDFへの変換、両方を出力先にアップロード。監視フォルダの自動化、ステップバイステップ。
投稿を読む →
フォルダに新しいファイルが追加されましたか?ZapierがPDFとWord文書を生成します。たった6つのステップで、完全に自動化!
Zapier + Dropbox + PDF4me:フォルダに新しいファイルが届いたら、Googleドキュメントのテンプレートを探し、Generate Documentを2回実行(データテキストからPDF、トリガーファイルからDOCX)し、両方をアップロードします。コード不要のトリガーワークフローです。
投稿を読む →

このアクションが何をするか

PDF4me ドキュメントを生成 シングル テンプレート ファイル 1 つとデータセット 1 つを受け取り、Zap 内にマージされたドキュメント 1 つを返します。 言葉、 HTML、 PDFメールマージ、またはGoogleドキュメント テンプレート、データ提供 インラインテキスト または データファイル出力形式を選択してください。契約書作成、請求書作成、証明書発行、オファーレター作成など、マージコードを書かずに1つのレコードを1つの文書に変換するあらゆるワークフローに最適です。

認証 API リクエスト​

アクセスするには PDF4me ウェブ APIすべてのリクエストには適切な認証情報を含める必要があります。 PDF4me アカウントに一度 Zapier そして、Zap のすべての「ドキュメント生成シングル」ステップでそれが再利用されます。

見逃してはならない重要な事実​

入力データ形式タイプによって、どのデータフィールドが必要かが決まります。
設定して 文章 そして データテキスト インラインの必須フィールドになります JSON/XML. 設定する ファイル そして データファイル 前のステップでマッピングされたデータファイルの場合、このフィールドは必須項目になります。もう一方のフィールドは、切り替えスイッチをオンにするまで非表示のままです。
テンプレートファイルの種類はWordに限定されません/HTML/PDF
ドロップダウンには、 メールマージ (差し込み印刷フィールド用に作成されたWordテンプレート) Googleドキュメント (マージテンプレートとして使用されるGoogleドキュメントのエクスポートファイル)を、実際のZap構成で確認します。この値を、テンプレートファイルが実際にどのように作成されたかに合わせてください。
2つの出力形式に対応するため、2回実行してください。
1 つのテンプレートで、異なる 2 つのドキュメント生成シングル ステップにデータを供給できます 出力ドキュメントタイプ 値(例: PDF それから Docx単一のトリガーから、ロックされたコピーと編集可能なコピーの両方を生成する。
ZapierのPDF4meアクションパネルでドキュメントを生成すると、テンプレートファイル、テンプレートファイル名、テンプレートファイルタイプ(PDFに設定)、入力データ形式タイプ(テキストに設定)、データテキスト、入力データタイプ(Jsonに設定)、およびメタデータフィールドが表示されます。

アクションパネルに「入力データ形式タイプ」を「テキスト」に設定して、「データテキスト」フィールドを表示します。

パラメータ​

必須 Zapier UI: テンプレートファイル、テンプレートファイルの種類、入力データ形式の種類、入力データの種類、および(入力データ形式の種類に応じて)データテキストまたはデータファイルを指定します。テンプレートファイル名、出力ドキュメントの種類、PDFの編集可否、およびメタデータはオプションです。

パラメータ必須その機能例
Template FileOptionalTemplate file to populate. Map it from a previous step (Dropbox, Google Drive, Upload File).template.docx
Template File NameOptionalName for the output file. If left blank, the name is picked from Template File's own filename.contract_template
Template File TypeRequiredFormat of the template: Word, HTML, PDF, Mail Merge (Word built for mail-merge fields), or Google Docs (Google Docs export). Defaults to PDF Form.Mail Merge
Input Data Format TypeRequiredWhether data is supplied as inline text or a file. Text reveals Data Text. File reveals Data File. Defaults to Text.Text
Data TextRequiredInline JSON or XML string to merge into the template. Required when Input Data Format Type is Text.[{"firstname":"John","lastname":"Adams"}]
Data FileConditionalData file (JSON or XML) mapped from a previous step. Required when Input Data Format Type is File.data.json
Input Data TypeRequiredStructure of the supplied data, must match Data Text or Data File exactly. Defaults to Json.Json
Output Document TypeRequiredFormat of the generated document: Pdf, Docx, and other supported formats. Defaults to Word.Pdf
Keep Pdf EditableOptionalWhen the output is a PDF from a fillable template, keeps its form fields interactive instead of flattening them. Defaults to No.false
Meta DataOptionalMetadata to attach to template fields during generation.-
Template File URL (Either provide Template File or Template File URL)OptionalLink to the template file to fill, as an alternative to File. Map a file URL from a previous step.
Template File NameOptionalFile name of the template, including its extension. It is sent to PDF4me as the template file name (the app's help text calls it the name for the output file).
Data File URL (Either provide Data File or Data File URL)ConditionalShown when Input Data Format Type is File. Link to the data file, as an alternative to Data File. Map a file URL from a previous step.

出力​

分野タイプ内容物
documentIdTextID PDF4me gives the resulting document.
errorMessageTextError message when PDF4me could not process the file; empty otherwise.
fileExtensionTextExtension of the resulting file, for example `.pdf`.
fileNameTextName of the resulting file, without extension.
fileUrlTextDownload link of the resulting file. Map it into any later step that needs the file, for example an upload to Google Drive, Dropbox or OneDrive.
fileAlternateUrlTextAlternative download link of the resulting file, with the file name at the end of the URL.
fullFileNameTextName of the resulting file, with extension.
jobIdTextID of the PDF4me job that processed the request.
traceIdTextTrace ID of the request, when PDF4me returns one. Give it to PDF4me support when reporting a problem.

ドキュメントを1つ生成するように設定するにはどうすればよいですか Zapier?​

  1. 追加 PDF4me Zap のアクション アプリとして選択し、 ドキュメントを生成する。
  2. 接続 PDF4me アカウントを作成するか、既存の接続を選択してください。
  3. 地図 テンプレートファイル 前のステップから設定して テンプレートファイルの種類 それに合わせて(Word、 HTML、 PDFメールマージ、またはGoogleドキュメント)。
  4. セット 入力データ形式タイプ に 文章 そして満たす データテキスト インライン付き JSON/XMLまたは、 ファイル そして地図 データファイル 前のステップから。
  5. セット 入力データタイプ に JSON または XML データの実際の形式に合わせるため。
  6. オプションで設定可能 出力ドキュメントタイプ そして PDFを編集可能な状態に保つ次に、その手順をテストします。
  7. 返されたマップ ファイルURL 生成されたドキュメントをアップロードファイル、Gmail、またはストレージアクションに送信して配信します。

典型的な構成​

ワークフローの例Common Zapier patterns using Generate Document Single.
メールマージテンプレート JSON データファイル
  1. 監視対象のDropboxフォルダに新しいファイル(Wordテンプレート)が保存されます。
  2. 「ファイルの検索」ステップでは、一致するファイルを見つけます。 JSON データファイルは同じフォルダ内にあります。
  3. テンプレートファイルタイプ「メールマージ」、入力データ形式タイプ「ファイル」、検索ステップからのデータファイル、入力データタイプ「JSON」を使用して、ドキュメントを1回生成します。
  4. 「ファイルのアップロード」ステップでは、生成されたドキュメントがDropboxに保存されます。
Googleドキュメントテンプレート、インライン JSONデュアル出力
  1. 「ファイルの検索」ステップでは、.docx形式でエクスポートされたGoogleドキュメントのテンプレートを検索します。
  2. テンプレートファイルタイプ「Google Docs」、入力データ形式タイプ「テキスト」、データテキストをインラインで指定してドキュメントを1回生成します。 JSON 配列、出力ドキュメントタイプ PDF。
  3. 2 番目の「ドキュメントを1つ生成」ステップでは、入力データ形式タイプがファイル、出力ドキュメントタイプが Docx の同じテンプレートを再利用し、編集可能なコピーを生成して、 PDF。
CRM ウェブフックによってトリガーされる契約への記録
  1. Webhooksによる Zapier トリガーは、 CRM。
  2. フォーマッターステップはペイロードを整形します JSON 契約テンプレートが想定する構造。
  3. テンプレートファイルタイプがWord、入力データ形式タイプがテキスト、フォーマッタステップからのデータテキスト、入力データタイプがJSON、出力ドキュメントタイプがPDFの単一実行でドキュメントを生成します。
  4. Gmailの手順により、生成された契約書がクライアントにメールで送信されます。
HTML 軽量証明書のテンプレート
  1. コース完了のトリガーは、学習管理システムのWebhookから発火します。
  2. テンプレートファイルタイプを使用したドキュメントのシングル実行を生成する HTML入力データ形式タイプ:テキスト、データテキスト:学習者名、コース、日付を含む、出力ドキュメントタイプ:PDF。
  3. 「ファイルのアップロード」ステップでは、証明書が学習者用の共有ドライブフォルダに保存されます。

実践的なヒント​

Match Template File Type to how the template was built
Word for a plain merge-field .docx, Mail Merge for a template designed around the mail-merge field pattern, Google Docs for a Google Docs export. Picking the wrong type can leave placeholders unfilled.
Toggle Input Data Format Type before filling in data
Data Text and Data File are mutually exclusive: only the field matching your Input Data Format Type selection is required. The other stays out of the way.
Input Data Type must match your data exactly
Json for JSON data, Xml for XML data. A mismatch causes template fields to bind incorrectly or come back empty.
Run twice for two formats from one template
Set Output Document Type to Pdf in one step and Docx in a second step using the same template and data to get both a locked and an editable copy.
Use Keep Pdf Editable only for fillable-PDF templates
This toggle only matters when the template is itself a fillable PDF and the output is Pdf. It has no effect on Word, HTML, or Mail Merge templates.
Batch runs need Generate Documents Multiple, not this action
This action produces one document per run. To generate many personalized documents from one template and a list of records in a single step, use Generate Documents Multiple instead.

チートシート​

分野価値
ActionGenerate Document
Template FileFrom a previous step
Template File TypeWord / HTML / PDF / Mail Merge / Google Docs
Input Data Format TypeText or File
Data TextRequired when Input Data Format Type is Text
Data FileRequired when Input Data Format Type is File
Input Data TypeJson or Xml
Output Document TypePdf, Docx, and other supported formats
Keep Pdf Editablefalse (default behavior in documented workflows)

「Generate Document Single」の代わりに何を使えば良いですか?​

ワークフローで、1 つのテンプレートとレコードのリストから多数のパーソナライズされたドキュメントを 1 回の実行で作成する必要がある場合は、Zap 実行ごとに 1 つのドキュメントを作成するのではなく、 複数のドキュメントを生成するテンプレートが入力可能な場合 PDF 口ひげ/差し込みフィールドのテンプレートではなく、フォームを使用します 記入する PDF 形状 テンプレートエンジンを経由させるのではなく、AcroFormのフィールドに直接入力する。

よくある質問​

What is the difference between Data Text and Data File?+
Input Data Format Type controls which field is required. Text reveals Data Text for inline JSON or XML, useful when a prior step already exposes the data as text such as a webhook body or a Formatter step output. File reveals Data File for a data file mapped from a previous step, such as a downloaded JSON file. Only the field matching your selection is required at a time. See <a href="https://zapier.com/blog/create-documents-from-templates/" target="_blank" rel="noopener noreferrer">Zapier's own guide on building documents from templates</a> for background on template-merge workflows.
What template types does Generate Document Single support?+
Template File Type accepts Word (.docx with mustache or merge-field placeholders), HTML (.html with template placeholders), PDF (a PDF layout template), Mail Merge (a Word template built around the mail-merge field pattern), and Google Docs (a Google Docs export used as a merge template). Match this value to how the template file was actually authored.
What does Keep Pdf Editable do?+
Keep Pdf Editable applies only when the output is a PDF generated from a fillable-PDF template. Left off, the generated PDF is a static, completed document. Turned on, it preserves interactive form fields in the output so a recipient can still edit values after the document is generated.
What output formats can Generate Document Single produce?+
Output Document Type sets the generated file's format independently of the template format, options include Pdf and Docx among other supported formats. Running the same template through the action twice with different Output Document Type values produces both a PDF and a Word copy from one source, a pattern documented in PDF4me's own Zapier trigger workflows.
Do I need to specify Input Data Type as Json or Xml?+
Yes. Input Data Type is required and must match the actual structure of the data supplied in Data Text or Data File. A mismatch, such as selecting Json for XML-formatted data, causes the template engine to fail to bind fields and the generated document returns with placeholders unfilled. For background on JSON structure basics, see <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON" target="_blank" rel="noopener noreferrer">MDN's JSON reference</a>.

関連アクション​

複数のドキュメントを生成する
1つのテンプレートとレコードリストから、1回の実行で複数のパーソナライズされたドキュメントを生成します。これは、Zapの実行ごとに1つのドキュメントを生成するのではなく、1回の実行で複数のドキュメントを生成できます。
PDFフォームに記入してください
テンプレートが入力可能なAcroFormである場合 PDF マスタッシュ/マージフィールドテンプレートを使用するのではなく、テンプレートエンジンを通さずに、フィールドを直接入力します。
ドキュメントを結合する
ここで生成された文書を他のファイルと結合して単一の出力にすることで、カバーレターと生成された契約書を1つにまとめるのに役立ちます。 PDF。

他のプラットフォームでの同じタスク​

業界におけるユースケースとアプリケーション​

  • 契約書作成: クライアントデータを含むテンプレートから、パーソナライズされた契約書を作成する
  • 法的文書の作成: 事件固有の情報を含む法的文書を作成する
  • 契約処理: 動的なデータ統合により契約書作成を自動化する
  • 文書自動化テンプレート処理で法的文書のワークフローを効率化

ヘルプが必要な場合​