Excelの各行と未読メール処理について

現在3つのRPAを作成中で、1つ目は品番申請。2つ目は品番申請後に届くメール内のURLから品番コードを取得し、Excelに記載後規格申請。3つ目は規格申請後に届くメール内のURLから規格コードを取得し、Excelに記載し完了メール送信です。

3つとも同じ申請のExcelファイルを使用しており、A列からAT列までぎっしりと申請に必要な項目が入力されています。2、3つ目のRPAでは未読メールを対象に繰り返し(Excelの各行)で動作を行っていくのですが、今まで申請した項目に沿った品番コードを参照して、対象の行に入力する方法はあるのでしょうか?

複数列申請したいものがあった場合、Excelの入力行、未読メール共に複数になるため【このメールにはこの情報が記載してあるから、この品番コードをここに転記する】などのように上手く判断する方法が知りたいです。
文章で説明するのが難しくわかりずらいかもしれませんが、よろしくお願いいたします。

こんにちは

上記だけでは実現したいことが良くわかりませんので、ダミーでも良いので具体的な入寮データーと期待する出力を共有いただくと良いかと思います。

Like you mentioned

Its bit difficult to understand what you are trying to achieve. Could you please share some sample input and output for each of the RPA process?

Best Approaches:

1. Identifying the Correct Row in Excel:

  • Use a unique identifier (e.g., application reference number, timestamp, or a combination of columns) to match an email to its corresponding row.
  • Perform a lookup in Excel before updating values to ensure the correct row is modified.

2. Extracting and Mapping Data from Emails:

  • Use regex or keyword-based extraction to retrieve the required part number or standard code from the email body or URL.
  • Categorize emails based on content:
    • If email contains part number confirmation, update the Part Number column.
    • If email contains standard confirmation, update the Standard column.

3. Handling Multiple Matches & Entries:

  • If an email corresponds to multiple rows, apply rules such as:
    • First available match (if order matters).
    • Most recent application (use timestamps for sorting).
    • All matching rows (if multiple entries need updates).
  • If an email contains multiple codes, parse and distribute them accordingly.

4. Processing Unread Emails Efficiently:

  • Loop through unread emails row by row.
  • Extract relevant details, match them to pending applications in Excel.
  • Update the corresponding row, then mark the email as processed (move to “Processed” folder or mark as read).