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

文書を分類する Make

このモジュールの機能

PDF4me文書を分類する 読む PDF そして返します クラス名 文書の種類(請求書、契約書、領収書、または定義した任意のカスタムクラス)を識別します。分類ルール(正規表現または JavaScript 式は一度設定すれば PDF4me pdf4me.com のアカウント。 PDF モジュールを通過する Makeそれらのルールと照合され、勝ったクラスラベルが返されます。そのラベルを Make ルーターは、ドキュメントを適切なフォルダーに送信したり、正しい解析テンプレートを選択したり、タイプ固有のダウンストリームアクションをトリガーしたりします。これらすべてを、手動でのソートなしで行います。

関連ブログ記事(1)

認証 API リクエスト​

毎 PDF4me モジュール Make 有効な 繋がり. 作成または選択して、 PDF4me API シナリオが分類要求を安全に認証できるようにするためのキー。

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

クラスはMakeではなく、アカウント内で最初に定義してください。
分類ルールはあなたの PDF4me ダッシュボード pdf4me.com → 文書を分類する. クラス名を追加します (例: pdf4me_請求書) と正規表現または JavaScript 表現(例: 請求書(。*))、次に「変更を保存」をクリックします。 Make このモジュールにはルールを定義するためのフィールドはなく、アカウントに保存したルールのみが適用されます。
このモジュールはクラス名のみを返し、 PDF
ドキュメントを分類すると、1 つのフィールドが出力されます。 クラス名一致したラベル。返したり変更したりしません。 PDF ファイルを渡さなければならない場合は、 PDF 下流モジュールにアップロード、解析、またはメール送信し、ドキュメント出力をマッピングします。 前 ダウンロードまたはトリガー手順は、このモジュールから実行しないでください。
分類実行ごとに1クレジット消費されます。
Classify Document モジュールの各実行では、1 つの PDF4me クレジットは、クラスの一致が見つかったかどうかに関係なく付与されます。大量のドキュメント(数百または数千)を処理するシナリオの場合 PDFs 毎日)クレジット配分を計画する PDF4me 大規模展開する前にダッシュボードを確認してください。一致しないドキュメント用にルーターのフォールバックブランチを追加して、サイレントエラーを回避します。
PDF4me Classify Documentモジュールで、接続設定が「My PDF4me connection」、ファイル名がステップ1のファイル名からマッピングされ、ドキュメントがステップ1のデータからマッピングされていることを示します。

このモジュールは、前のダウンロード手順で取得したファイル名とドキュメントのみを必要とします。分類ルールは、 PDF4me アカウントは自動的に作成され、内部にルール設定はありません。 Make。

パラメータ​

前提条件: 少なくとも 1 つのドキュメント クラスを作成します。 pdf4me.com → 文書を分類する このモジュールを使用する前に、以下を参照してください。 分類文書の設定 完全攻略ガイドはこちら。

パラメータ必須その機能例
ConnectionRequiredPDF4me API connection. Click Add and paste your API key if connecting for the first time.My PDF4me connection
FileRequiredHow the source document reaches the module. The radio lists your connected storage actions (for example Dropbox - Download a File) and Map. Choose Map to wire the fields below from earlier modules: File Name and Document only appear once Map is selected.Map
File NameRequiredFilename of the PDF to classify including .pdf extension. Map from the prior module's file name output.document.pdf
DocumentRequiredBinary content of the PDF to classify. Map from the prior module's data output: Dropbox, Google Drive, HTTP, or email attachment.1. Data

出力​

このモジュールは、シナリオ内の後続のモジュールでマッピングに使用できるフィールドを1つ返します。

分野タイプ内容物
Class NameTextName of the category the document was classified as.

クイックセットアップ​

  1. 行く pdf4me.com → 文書を分類する、 クリック 編集クラス名を追加します(例: pdf4me_invoice) 正規表現 (例: invoice(.*))、クリック 変更を保存。
  2. あなたの Make シナリオを追加 PDF4me → 文書を分類する ファイルダウンロード手順の後。
  3. 選択 繋がり (またはクリック) 追加 あなたと一緒に作成する PDF4me API 鍵)。
  4. 地図 ファイル名 そして 書類 以前のダウンロードまたはトリガーモジュールから。
  5. クリック 保存 そしてシナリオを実行します。 クラス名 出力には一致したドキュメントタイプが含まれます。 ルーター 種類別に分岐したり、種類固有のフォルダに保存するためのアップロードモジュールを使用したり、ファイル名にクラスをプレフィックスとして追加するための名前変更ステップを実行したりできます。

ワークフローの例​

ワークフローの例Common Make scenario patterns using Classify Document.
請求書、契約書、領収書はそれぞれ別のフォルダに振り分ける
  1. Dropbox ウォッチ フォルダーは、新しい PDF 「受信」フォルダに届きます。
  2. Dropbox ファイルのダウンロードは、 PDF バイナリ。
  3. Classify Document はクラス名を返します。例: pdf4me_請求書、 pdf4me_契約書、 または pdf4me_領収書。
  4. ルーターはクラス名: invoice で分岐します → /会計/請求書/契約 → /法律/契約/領収書 → /財務/領収書/。
  5. 各支店は PDF (ダウンロード手順から、分類手順からではなく)ターゲットフォルダに移動します。Slackが関係チームに通知します。
分類してから適切なテンプレートで解析する
  1. メールウォッチは、 PDF 添付ファイルがアカウントの受信トレイに届きます。
  2. 文書分類機能は、それが請求書、発注書、または納品書のいずれであるかを識別します。
  3. ルーターはクラス名に基づいて分岐し、対応するドキュメント解析モジュール、請求書の場合は請求書テンプレート、発注書の場合は発注書テンプレートを実行します。
  4. 抽出されたデータ(合計、ベンダー、日付)は、ドキュメントの種類ごとにGoogleスプレッドシートの行に書き込まれます。
  5. 1つのシナリオであらゆる文書タイプに対応でき、処理前に手動で分類する必要はありません。
到着時に文書の種類に応じてファイル名を自動変更する
  1. Google Drive Watch Files は、新しいファイルが存在するときにトリガーされます。 PDF 共有の「ドキュメント」フォルダにアップロードされます。
  2. Googleドライブの「ファイルを取得」機能を使うと、バイナリファイルがダウンロードされます。
  3. Classify Document はクラス名を返します。例: pdf4me_契約書。
  4. Google Drive ファイルのアップロードは、 PDF ファイル名にプレフィックスを付けます: クラス名 + アンダースコア + 元の名前 (例: pdf4me_contract_NDA_2025.pdf)
  5. 元の名前のないファイルは、参照用にアーカイブサブフォルダに移動されます。

よくある質問​

Where do I create and manage classification rules?+
Rules are created at pdf4me.com under the Classify Document section: not inside Make. Click Edit, add a Class Name and an expression (Regular Expression or JavaScript), then click Save Changes. The Make module automatically reads all saved classes from your account each time it runs. See the Set Up Classify Document guide for screenshots and full walkthrough.
What expression types are supported for defining a class?+
Two types: Regular Expression and JavaScript. Regex expressions match text patterns found anywhere in the PDF text content: for example, invoice(.*) matches any document containing the word "invoice". JavaScript expressions let you write more complex logic: multiple conditions, scored matching, or length-based rules, for documents where a single regex is insufficient.
What does the module output: does it return the PDF?+
No. The module outputs one text field, Class Name, the matched class label, for example pdf4me_invoice. The PDF itself is not returned. To pass the document to a downstream upload, email, or parse module, map the Document field from the prior download or trigger step: not from Classify Document.
What happens when no class expression matches the document?+
When no expression matches, the Class Name output is empty or contains an unmatched indicator. Add a fallback branch to your Router that handles empty Class Names: for example, route unclassified documents to a "Manual Review" folder and send a Slack alert. This prevents unmatched PDFs from being silently dropped or misrouted.
How many credits does each classification use?+
One credit per module execution, regardless of whether a match is found. For high-volume scenarios: processing hundreds of PDFs daily, estimate your monthly credit consumption before enabling at scale. Use the PDF4me dashboard to monitor usage and set up credit alerts if needed.

関連モジュール​

ヘルプが必要な場合​