Workflows でドキュメント処理パイプラインを構築する

Document AI を使用して、ドキュメントを処理するステップが複数含まれるワークフローを構築する場合は、サーバーレス オーケストレーションを使用してワークフローを管理することをおすすめします。

Workflows は、一連のタスクを定義した順序でまとめてリンクできます。さらに、インフラストラクチャの管理は不要であり、需要に応じてシームレスにスケールします(ゼロへのスケールダウンも可能)。料金モデルは従量課金制で、料金は実行時間に対してのみ発生します。

Workflows には、Document AI API のコネクタが組み込まれています。コネクタでは、構成ファイルを使用して手順を定義する以外に、追加のコードは必要ありません。コネクタはリクエストの形式設定を処理し、API の詳細を非表示にします。コネクタには、認証、再試行と長時間実行オペレーションを処理する組み込みの動作もあります。

詳細については、コネクタを理解するをご覧ください。

このガイドでは、Invoice パーサー プロセッサを使用して、バッチ処理で一連のサンプル請求書を処理します。


このタスクを Google Cloud コンソールで直接行う際の順を追ったガイダンスについては、「ガイドを表示」をクリックしてください。

ガイドを表示


始める前に

  1. アカウントにログインします。 Google Cloud を初めて使用する場合は、 アカウントを作成して、実際のシナリオで Google プロダクトのパフォーマンスを評価してください。 Google Cloud新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $300 分を差し上げます。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  4. Verify that billing is enabled for your Google Cloud project.

  5. Enable the Document AI, Cloud Storage, Workflows APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the APIs

  6. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector