cancel
Showing results for 
Search instead for 
Did you mean: 

GmailのListMessageが不安定

kojikitaura
Level 4
ビジネスオブジェクト「Email - POP3/SMTP」のListMassageアクションについて教えて下さい。
弊社環境で初めて導入したのですが、成功率がまばらで原因が分かりません。
統計をとっていないので正確な成功率が分かりませんが、少なくとも5割程度だと思います。
最低でも8割くらいに持っていきたいです。
Gmailを使用中ですが同様の事象をご経験された方がいらっしゃればご教示いただきたいです。

[環境]
Gmail法人契約
安全性の低いアプリ:許可
二段階認証:有効
アプリパスワード発行済み

毎回エラーコメントは同様のものが出ます。
エラー:Internal : コードステージによって例外がスローされたため、コードステージを実行できませんでした。転送接続からデータを読み取れません: 既存の接続はリモート ホストに強制的に切断されました。。

受信メールをPOP3で取ってきたいのですが、上手くいきません。
送受信サーバーやポートは弊社環境はGmailでよく使われている汎用的なものでした。

開発時、もともとListMassegeは一度も成功しなかったのですが、安全性の低いアプリの許可と、
二段階認証の有効化、アプリパスワード発行をして設定したところ、成功するようになりました。
但し、成功率は冒頭に記載したとおりです。
またSMTPサーバーに接続して送信する分には成功率100%です。

またBluePrism社のサポートとやり取りをしたのですが明確な回答には至りませんでした。
サポートの作成した「コンシューマGmailのアカウントに接続してListMessageをするオブジェクト」を
頂戴して、インポートして弊社環境で実施したところ100%成功しました。
コンシューマGmailは問題なく、弊社の法人版Gmailに何かあるのでしょうか。

以上何卒宜しくお願い致します。

------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------
26 REPLIES 26

ewilson
Staff
Staff
Hello @kojikitaura,

You might want to take a look at the GMail API connector.​ It is a bit more complex than the POP3/SMTP VBO though and requires different configuration within your Google Workspace environment (to enable OAuth2 and client credentials).

Can you share details of how you've set the properties of the Configure action on the POP3/SMTP VBO?

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@kojikitaura さん

こんにちは!上記ですが、
POP3/SMTP VBOで、どのように構成アクションのプロパティを設定したか、詳細を教えてくれないかとのことです。可能でしたらシェアしてみてください。

------------------------------
-------------------------------
Nodoka Matsumoto
Customer Success Manager
Blue Prism
------------------------------
------------------------------- Nodoka Matsumoto Customer Success Manager Blue Prism

@NodokaMatsumoto さん
ご回答ありがとうございます。
プロパティの設定ですがキャプチャで良いでしょうか。
またオープンな場所なのでアドレス/パスワードは伏せるかたちで良いでしょうか。

以上何卒宜しくお願い致します。​

------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------

@ewilson さん
ありがとうございます。
キャプチャをお送りしますのでご確認をお願いします。
POP3に関して、成功するときと失敗するときがあるので、一概に間違っているというわけではなさそうです。
SMTPは100%成功します。

宜しくお願いします。​

------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------

@kojikitaura さん
はい、問題ないと思います!

@ewilson

>Can you share details of how you've set the properties of the Configure action on the POP3/SMTP VBO?
He will share the screenshot of it, it would be great​ if you can take a look at it. Thank you!​
He mentions in the below comment is;
POP3, I am not sure if my setting is really wrong as there are times when it succeeds and times when it fails.
SMTP is 100% success rate.


------------------------------
-------------------------------
Nodoka Matsumoto
Customer Success Manager
Blue Prism
------------------------------
------------------------------- Nodoka Matsumoto Customer Success Manager Blue Prism

Hello @kojikitaura,

Below is a screen shot of how I set up the Configure action. It's pretty much the same as yours. I do have a newer version of the POP3/SMTP VBO than you (evident in the presence of the OAuth2 settings), but that shouldn't have anything to do with your situation. How often are you polling GMail? I know there are bandwidth/polling limitations imposed by the server, so if you're checking to often it will typically respond with an error along the lines of Account exceeded POP command or bandwidth limits.​

1853.png
Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson さん
ご回答ありがとうございます。
パラメータ拝見しました。特に私の設定値と比べて相違は無さそうですね。

さて、ポーリングの間隔とのことですが、現在まだ本稼働前の開発段階です。
デバッグ実行でしか動かしておりませんので、決まった間隔があるわけでございません。

​Account exceeded POP command or bandwidth limits」このルールは初めて知りました。
仮にポーリング感覚が短いことに起因するとしたら、デバッグ実行の際、初回は必ずListMessageが
成功して、2回目以降は上記ルールによってしばらく失敗が続くということになりますでしょうか。
(失敗の発生周期に規則性がある?)

試していないので正確なことは言えませんが、デバッグしていて初回が必ず成功するという確約が
無かったような気がします。一
少しの間、初回実行が成功するか否かに注目してデバッグ実行に取り組んでみます。

以上宜しくお願い致します。

------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------

@kojikitaura,

Generally, you should see the first request succeed if that's the first thing you're doing with the mailbox. In other words, you're not calling Get Message or one of the Delete actions on the mailbox multiple times before calling List Messages. If you are seeing the failure on the first request, are you receiving an error response or just not getting back the result data you expect?

Cheers,​

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson さん

ご回答ありがとうございます。
改めて考えたのですが1つ理解できないことがあります。
Gmailの帯域制限ですが、あくまでも対象のアカウントが短時間で大量のメール送信/受信をした際に、制限を受けるという
ことですよね。

今回の処理はRPAでConfigureで認証してから、ListMessageをして、POP3サーバーから受信ボックスの​同期をしている
だけであって、Gmailサーバー上でメール受信をしているわけではないのですが、それでもGmailから制約を受けるので
しょうか。

宜しくお願い致します。

------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------