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

ドキュメントを解析 Power Automate

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

PDF4me ドキュメントを解析する 保存した解析テンプレートを PDF 内部 Power Automate フローを実行し、トレースIDと動的コンテンツとして使用できる抽出フィールドデータを返します。パイプファイルコンテンツ SharePoint、 Outlook、 OneDrive、またはDataverseでは、テンプレートを参照します。 テンプレート名(TemplateId)解析された値を直接ルーティングします SharePoint リストの更新、Dataverse 行の作成、 Outlook メール、またはTeams通知。1つのアクション、1つのテンプレート、すべての Microsoft 365 ワークフロー。

関連ブログ記事(1)

この操作を実行する前に: 解析テンプレートを作成する PDF4me ダッシュボード。キャプチャキーを定義して選択します。 正規表現 安定したパターンまたは JavaScript 表現 条件付きロジックの場合。 Power Automate アクションは、そのテンプレートを参照します。 テンプレートID。 見る ドキュメントの解析情報を準備する 完全なセットアップについては、正規表現の例(INV-\d{6,10}、 \d{2}/\d{2}/\d{4})、そして2人の作業員 JavaScript 表現分類器のサンプル。

認証 API リクエスト​

の PDF4me コネクタを接続します Power Automate 有効な 繋がり あなたの PDF4me API キー。フロー作成時に一度接続を作成し、その後は毎回接続を作成します。 PDF4me テナント内のアクションがそれを再利用します。

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

テンプレート名は、TemplateId GUIDを受け入れます。
ダッシュボードから人間が読めるテンプレート名ではなく、GUIDテンプレートIDを貼り付けてください。GUIDは名前変更後も安定しており、本番環境で安全に使用できる値です。
安定したパターンの正規表現、 JavaScript 条件付きロジック
テンプレートにキャプチャルールが記述されています。請求書番号、日付、金額には正規表現を使用します。 JavaScript 表現 文章 分類ルールとフォールバックルール用の変数を用意し、それに基づいて条件またはスイッチでルーティングします。
ネイティブ Microsoft 365 情報源
ファイルコンテンツはきれいにマッピングされます SharePoint ファイルの内容を取得し、 Outlook 添付ファイルを取得する、 OneDrive ファイルコンテンツを取得し、Dataverseでファイルをダウンロードします。同じTemplateIdが機能します Make、 n8n、 Zapier直接 REST。
Power Automate の「ドキュメントの解析」アクション

パラメータ​

パラメータ必須その機能例
File ContentOptionalContent of the document to parse. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content.@{body('Get_file_content')?['$content']}
File NameOptionalName of the document, including its extension (for example `invoice.pdf`).invoice.pdf
Template NameOptionalName of the parsing template to use, as set up in PDF4me.your value

解析テンプレート内の式タイプ​

正規表現安定したパターン
請求書番号(INV-\d{6,10})、日付(\d{2}/\d{2}/\d{4})、量($?\d{1,3}(?:,\d{3})*(?:.\d{2})?) 生産キャプチャキーの約80%。
JavaScript 表現条件論理と分類器
キャプチャ領域のテキストは次のように渡されます 文章; 文字列を返します。マルチマーカー分類、フォールバックルール、日付正規化。参照 ドキュメントの解析情報を準備する 2つの作業サンプルについて。

出力​

このアクションは、トレースIDと解析されたフィールドデータを動的コンテンツとして返し、下流のすべてのアクションで利用できるようにします。

分野タイプ内容物
traceIdTextTrace ID of the request, as returned by PDF4me.
parseInfoObjectValues read from the document. The connector defines no fields for this object; its contents depend on the parsing template. Use Parse JSON or expressions to read them.

フローの例​

Power Automateの一般的なワークフローパターンTypical ways to chain Parse Document into a Power Automate flow.
Outlook Dataverseへの請求書
  1. Outlook 新しいメールが届くと、受信トレイ/APでトリガーが作動します。
  2. 添付ファイルフィルターにそれぞれ適用する PDFs のみ。
  3. Parse Documentは、添付ファイルに対して請求書テンプレートを実行します。
  4. Dataverseで新しい行を追加すると、invoiceNumber、totalAmount、vendorNameがInvoicesテーブルに書き込まれます。
  5. チームがチャットまたはチャンネルにメッセージを投稿すると、APチームに通知されます。
SharePoint ライブラリをリスト更新する
  1. SharePoint フォルダ内にファイルが作成されると、/Documents/Invoices でトリガーが起動します。
  2. SharePoint ファイルコンテンツを取得すると、 PDF バイナリ。
  3. Parse Documentは請求書のフィールドを抽出します。
  4. SharePoint アイテムの更新は、解析された値を同じアイテムのメタデータに書き戻します。
分類と経路設定フロー
  1. フォームまたはPower Appsの送信により、 PDF。
  2. Parse Document はテンプレートを実行します JavaScript 文書タイプを返す式キー。
  3. タイプフィールド(請求書/注文書/契約書)に基づいてアクションの経路を切り替えます。
  4. 各ブランチは解析された値を適切な宛先 (Dynamics、 SharePoint、 Outlook 承認)。

よくある質問​

What goes in the Template Name field?+
Paste the TemplateId GUID from the PDF4me dashboard. Despite the field label, the GUID is the safer production value. It is stable across renames and identical to the value used by the REST API and the other platform connectors.
Where does File Content come from?+
Any Microsoft 365 action that returns a binary file: SharePoint Get file content, Outlook Get attachments, OneDrive Get file content, Dataverse Download file. Reference both File Content and File Name as dynamic content from that step.
What is Trace ID used for?+
Trace ID is a unique identifier for the parse operation. Log it to a SharePoint list or Dataverse table to maintain an audit trail. Reference it in error notifications so support staff can find the operation in PDF4me logs.
Can I classify documents at parse time using JavaScript?+
Yes. Inside the template add a JavaScript Expression on a capture key. The capture area text is passed as the variable text and your function returns a string. Use it for invoice vs order classification, then route on it with a Power Automate Switch or Condition action.
How do I write the parsed values back to the source SharePoint item?+
In SharePoint, the trigger When a file is created or modified gives you the item ID. Pass the file binary to Parse Document, then use SharePoint Update item with the same ID to write each parsed key (invoiceNumber, totalAmount, etc) into the column with the matching name.
Does it work with Power Automate Desktop or only with Power Automate (cloud)?+
The PDF4me Connect connector is a cloud connector available in Power Automate (the web flow designer). For desktop automation, call the same Parse Document REST endpoint with the HTTP action.

関連アクション​

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

ヘルプが必要な場合​