0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Outlookアドレスコピペから各種情報抽出するPower Automateフロー

Last updated at Posted at 2024-10-15

緒言

社内限定ですが、Outlookメールのアドレスからその人の漢字氏名や部署名、上司の連絡先等の情報を抽出するフローが欲しくて作りました。結構使ってます。

作り方

【前半】下準備

image.png

  1. トリガーでOutlookメールの宛先やcc等からコピペ

  2. 抽出結果を格納する配列変数を定義

  3. Composeでトリガー入力の複数アドレスコピペをsplitで分解

    split(replace(replace(triggerBody()?['text'],'<',';'),'>',''),';')
    
  4. 分解結果の中の自社ドメインを含む文字列のみフィルター

【中盤】情報抽出と格納

image.png

  1. 前半のFilter arrayの結果でApply to each

  2. Get user profile(V2)で情報抽出
    UPNにはtrim(items('Apply_to_each'))を設定

  3. Get manager(V2)で上司の情報抽出

  4. Get manager(V2)が失敗した場合の結果格納
    image.png

  5. Append to array variableがスキップされた場合の結果格納
    ※ すなわちGet manager(V2)が成功した場合
    image.png

【後半】データまとめ

image.png

  1. Create CSV tableで配列をCSVへ
  2. Composeで文字化け対策 (詳細はこちらの記事参照)
    concat(decodeUriComponent('%EF%BB%BF'),body('Create_CSV_table'))
    
  3. メール等で結果を通知

結言

全社員の全情報をサッと確認できる公式ツールあれば良いのに・・・

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?