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

文書分類 Zapier

文書を分類する は Zapier アクション PDF4me 一致する PDF 正規表現に反するコンテンツまたは JavaScript pdf4me.comで定義したルールに基づいて、一致するクラス名を返します。これを使用して、請求書、契約書、領収書を適切なフォルダまたはワークフローブランチに振り分けることができます。機械学習やトレーニングデータは不要です。

関連ブログ記事(1)

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

PDF4me 文書を分類する 1つ取る PDF そして返します クラス名 事前に作成したルールに一致するものを、Zap 内で定義します。次のようなクラスを定義します。 pdf4me_請求書 次のような正規表現を使用 請求書(。*) で PDF4me ダッシュボードで、返されたクラス名を使用します フィルター、パス、ファイルのアップロード、Google スプレッドシート、または Airtable 分類器を作成したりトレーニングしたりすることなく、文書を種類別に並べ替える手順。

認証 API リクエスト​

アクセスするには PDF4me ウェブ API を通して Zapierすべてのリクエストには、適切な認証情報を含める必要があります。

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

授業はpdf4me.comで行われ、 Zapier
クラスの作成と編集 (クラス名と正規表現または JavaScript パターン) 文書分類ダッシュボード まず。 Zapier アクションは、 PDF アカウントに既に存在するクラスに対して。
ルールベースであり、機械学習ではない
ラベル付きトレーニングデータと固定の分類体系を必要とするML分類器とは異なり、このアクションは正規表現または JavaScript 自分で記述する表現。トレーニング実行も、信頼度閾値の調整も不要。各クラスを識別するテキストを正確に制御できます。
ファイルのみ必要
ファイル名はオプションであり、識別のみに使用されます。このアクションは、 PDF それ自体は、トリガーからの元のファイル参照を、後続のステップで引き続き使用します。
Zapierのドキュメント分類アクションの設定パネルには、トリガーからマッピングされたファイルと、ファイル名とファイル拡張子から構築されたファイル名が表示されます。

アクションパネルの設定:ファイルは必須、ファイル名はオプションで、トリガーのファイル名と拡張子から生成されます

パラメータ​

必須 Zapier UI: ファイル。ファイル名は省略可能です。

パラメータ必須その機能例
FileRequiredThe PDF file to classify. Map from your trigger (for example File from New File in Folder) or a previous step.1. File
File NameOptionalName of the PDF for identification in the response. Typically built from the trigger's File Name plus File Ext.document.pdf
クラスの作成
オン 文書分類ダッシュボード編集をクリックし、クラス名を追加します(例: pdf4me_請求書) 正規表現を選択するか、 JavaScript、次のようなパターンを入力します。 請求書(。*)テストする前に「変更を保存」をクリックしてください。 Zapier。

出力​

分野タイプ内容物
Class NamesTextNames of the classes the document matches, as text (for example `Class1, Class2`).
traceIdTextTrace ID of the request, when PDF4me returns one. Give it to PDF4me support when reporting a problem.

ドキュメント分類の設定方法 Zapier?​

  1. の上 pdf4me.com、 開ける 文書を分類する クラスを追加します (クラス名と正規表現または JavaScript パターン)をクリックして、 変更を保存。
  2. Zap に追加 PDF4me アクションアプリとして選択 文書を分類する。
  3. 接続 PDF4me アカウントを作成するか、既存の接続を選択してください。
  4. 地図 ファイル トリガーまたは前のステップから。必要に応じてマッピングします。 ファイル名。
  5. ステップをテストして確認します クラス名 期待どおりのクラスを返します。
  6. 使用 クラス名 で フィルター または パス Zapを分岐させる手順、または ファイルのアップロード 出力を文書の種類ごとに命名する。

機械学習分類器の代わりにルールベース分類を使用すべきなのはどのような場合ですか?​

文書の種類が、一貫したフレーズ、ヘッダー、またはIDパターン(請求書番号の形式、固定の契約タイトル、既知のフォームコードなど)で識別でき、トレーニングなしで即座に結果が必要な場合は、「文書の分類」を選択してください。カテゴリが曖昧な場合、コンテンツの表現が大きく異なる場合、または既にラベル付けされたデータセットをトレーニングに使用できる場合は、Google Cloud Natural LanguageやAmazon Comprehendなどの機械学習分類器を選択してください。

典型的な構成​

ワークフローの例Common Zapier patterns using Classify Document.
請求書と契約書を別々のフォルダに振り分ける
  1. フォルダー内の新しいファイル トリガー (Dropbox、Google Drive、 SharePoint)新しい PDF。
  2. ドキュメントを分類し、ファイルとファイル名をマッピングして、クラス名を返します。
  3. パスのステップはクラス名に基づいて分岐します。請求書は一方の方向へ、契約書はもう一方の方向へ進みます。
  4. ファイルのアップロード機能は、各部門をそれぞれ専用のフォルダ(会計/請求書、法務/契約書など)に保存します。
まず分類し、次に一致するテンプレートで解析する。
  1. フォルダ内の新しいファイル トリガーは、受信時に起動します PDF。
  2. Classify Documentは、ドキュメントのクラス名を返します。
  3. 「パス」ステップでは、「クラス名」が「請求書」の場合は請求書テンプレートを使用して「ドキュメントの解析」を実行し、「クラス名」が「領収書」の場合は領収書テンプレートを使用して「ドキュメントの解析」を実行します。
  4. 各パスは、抽出されたフィールドをそれぞれ対応する下流ステップにマッピングします。
ファイル名に検出されたクラスをプレフィックスとして追加する
  1. フォルダ内の新しいファイル トリガーは、受信時に起動します PDF。
  2. Classify Documentは、ドキュメントのクラス名を返します。
  3. ファイルのアップロードには、トリガーからの元のファイルを使用し、「ファイル名の指定」を「クラス名」にアンダースコアと元のファイル名を追加した値に設定します。

実践的なヒント​

Test your regex on pdf4me.com before wiring the Zap
Save Changes only commits a class once its pattern actually matches sample content. Confirm the class works in the dashboard test panel first, then map File in Zapier.
Always handle the unmatched case
Class Names comes back empty or unmatched when no saved class fits, this is not an error. Add a default Paths branch or a catch-all Filter so unclassified documents still land somewhere reviewable.
Keep patterns specific to avoid false matches
A broad regex like invoice(.*) can also match a contract that happens to mention the word invoice. Anchor patterns to consistent headers, ID formats, or fixed phrases unique to each document type.
The action does not return the PDF itself
Only Class Names and Trace Id come back. Keep referencing the original File from your trigger for any follow-up step like Upload File or Parse Document.
JavaScript expressions unlock logic regex cannot
For classification rules that need more than pattern matching, for example combining two conditions, use a JavaScript expression class instead of a Regular Expression class.

チートシート​

分野価値
ActionClassify Document
Classes defined atpdf4me.com Classify Document dashboard
FileRequired, from trigger or previous step
File NameOptional
OutputTrace Id, Class Names
Unmatched resultEmpty/unmatched Class Names, not an error
Credits1 credit per classification run

よくある質問​

How is this different from AI or machine-learning document classification?+
Services like <a href="https://cloud.google.com/natural-language/docs/classifying-text" target="_blank" rel="noopener noreferrer">Google Cloud Natural Language</a> and <a href="https://docs.aws.amazon.com/comprehend/latest/APIReference/API_ClassifyDocument.html" target="_blank" rel="noopener noreferrer">Amazon Comprehend</a> classify text with trained machine-learning models and a predefined category taxonomy. PDF4me Classify Document instead matches PDF content against a regex or JavaScript rule you write and store on pdf4me.com. There is no model training, no taxonomy to adopt, and no confidence score to tune, you decide exactly what pattern identifies each document type.
Where do I create document classes?+
Classes are created and stored in your PDF4me account, not inside Zapier. Open the Classify Document dashboard on pdf4me.com, add a Class Name with a Regular Expression or JavaScript pattern, and click Save Changes. The Zapier action only evaluates a PDF against classes that already exist in your account.
What does the action return if no class matches?+
Class Names comes back empty or unmatched rather than throwing an error when the PDF content does not match any saved expression. Route this case through a Filter or a default Paths branch so unclassified documents still land somewhere reviewable instead of silently disappearing from the workflow.
Can I classify a document without sending the PDF content again in the next step?+
Yes. Classify Document returns only Class Names and Trace Id, it does not return or modify the PDF file itself. Keep referencing the File field from your trigger or an earlier step for any follow-up action such as Upload File, Parse Document, or an email attachment.

関連アクション​

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

  • 請求書のルーティング請求書をクラス別(例:「invoice」に一致する正規表現)にAPワークフローにルーティングする
  • 領収書処理式パターンを使用して経費管理のための領収書を識別する
  • 文書の分類分類ルールを使用して、財務書類を種類別に整理します。

ヘルプが必要な場合​