web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to retrieve email
Power Automate
Unanswered

Unable to retrieve email

(0) ShareShare
ReportReport
Posted on by 12
Automatic translation from Japanese to English.


Hello.


I would like to get your opinion on a problem I have encountered.

 

I want to use Power Automate to retrieve emails when they are received in Gmail.
When I run it, I get the following error

"An error occurred while attempting to establish an SSL or TLS connection."


The revocation function could not verify the revocation of the certificate."
According to the validation procedure, the remote certificate is invalid."


How can I resolve this?

 

Please make any request in simple English, if possible.

 

Translated with www.DeepL.com/Translator (free version)

 

PS
Gmail IMAP is already set to enabled.
Password is "app password".

 

"Accept untrusted certificate."
is turned on, the acquisition is successful.
However, I think this is insecure and would like to know other ways.

 

 

I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    I believe if you are using Gmail from Power Automate you need to enable less secure apps in gmail.

    https://youtu.be/Ee7PDsbfOUI

     

     

     

  • wata Profile Picture
    12 on at

    I am very grateful for your quick advice.


    However, I could not find "enable less secure apps".
    Is it because I am using two-step verification?
    What should I do if I have two-step verification?

  • wata Profile Picture
    12 on at

    PS
    Gmail IMAP is already set to enabled.
    Password is "app password".

  • VJR Profile Picture
    7,635 on at
  • wata Profile Picture
    12 on at

    Hi @VJR 

     

    Thanks again and again for the advice!

    I tried based on the URL you gave me, but it did not work.

    It looks like the problem is not with Power Automate, but with the certificate...

     

    I'll put up the full text of the error in case you want to read it.
    Forgive the mixed Japanese!

     

    If there is any effective way to address this, please let me know.

     

     

    Spoiler (Highlight to read)

    Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: IMAP サーバー imap.gmail.com に接続できませんでした。 ---> MailKit.Security.SslHandshakeException: An error occurred while attempting to establish an SSL or TLS connection.

    The server's SSL certificate could not be validated for the following reasons:
    • The server certificate has the following errors:
    • 失効の関数は証明書の失効を確認できませんでした。

    ---> System.Security.Authentication.AuthenticationException: 検証プロシージャによると、リモート証明書は無効です。
    場所 System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
    場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
    場所 System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest, Boolean renegotiation)
    場所 System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
    場所 MailKit.Net.Imap.ImapClient.<ConnectAsync>d__88.MoveNext()
    --- 内部例外スタック トレースの終わり ---
    場所 MailKit.Net.Imap.ImapClient.<ConnectAsync>d__88.MoveNext()
    --- 直前に例外がスローされた場所からのスタック トレースの終わり ---
    場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    場所 MailKit.Net.Imap.ImapClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)
    場所 MailKit.MailService.Connect(String host, Int32 port, Boolean useSsl, CancellationToken cancellationToken)
    場所 Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.EmailActions.RetrieveEmails(Variant imapServer, Variant username, Variant varPassword, Variant mailFolder, Variant fromContains, Variant toContains, Variant subjectContains, Variant bodyContains, Variant sentSince, Variant sentUpTo, Variant saveAttachmentsInto, Variant& retrievedEmails, Int32 serverPort, Boolean enableSsl, Int32 retrieveOnlyUnread, Boolean saveAttachments, Boolean markAsRead, Boolean acceptUntrustedCertificates)
    --- 内部例外スタック トレースの終わり ---
    場所 Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.RetrieveEmails.Execute(ActionContext context)
    場所 Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

    Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: IMAP サーバー imap.gmail.com に接続できませんでした。 ---> MailKit.Security.SslHandshakeException: An error occurred while attempting to establish an SSL or TLS connection.The server's SSL certificate could not be validated for the following reasons:• The server certificate has the following errors:• 失効の関数は証明書の失効を確認できませんでした。---> System.Security.Authentication.AuthenticationException: 検証プロシージャによると、リモート証明書は無効です。場所 System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)場所 System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest, Boolean renegotiation)場所 System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)場所 MailKit.Net.Imap.ImapClient.<ConnectAsync>d__88.MoveNext()--- 内部例外スタック トレースの終わり ---場所 MailKit.Net.Imap.ImapClient.<ConnectAsync>d__88.MoveNext()--- 直前に例外がスローされた場所からのスタック トレースの終わり ---場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)場所 MailKit.Net.Imap.ImapClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)場所 MailKit.MailService.Connect(String host, Int32 port, Boolean useSsl, CancellationToken cancellationToken)場所 Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.EmailActions.RetrieveEmails(Variant imapServer, Variant username, Variant varPassword, Variant mailFolder, Variant fromContains, Variant toContains, Variant subjectContains, Variant bodyContains, Variant sentSince, Variant sentUpTo, Variant saveAttachmentsInto, Variant& retrievedEmails, Int32 serverPort, Boolean enableSsl, Int32 retrieveOnlyUnread, Boolean saveAttachments, Boolean markAsRead, Boolean acceptUntrustedCertificates)--- 内部例外スタック トレースの終わり ---場所 Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.RetrieveEmails.Execute(ActionContext context)場所 Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

     

  • VJR Profile Picture
    7,635 on at

    Humm...hard to tell. 

    - Were you able to find the "enable less secure apps" option in Gmail?

    - Doing a search on this error "An error occurred while attempting to establish an SSL or TLS connection" is giving a lot of results. So you can find out which one works for you.

    • For example the same error worked for someone here just by enabling less secure apps.

    That way you can check each search results and see which one works in your situation.

     

  • wata Profile Picture
    12 on at

    Sorry, my English is not very good so I rely on translations.
    Also, I don't often ask questions in a forum like this, so there may have been some elements that I left out.

     

    -- "enable less secure apps" was found.
    I enabled it, but it did not solve the problem.

     

    --I couldn't quite find it in Japanese, but surely I should have looked it up in English!

     

    And, I have noticed that accepting untrusted certificates works, so I will look into this.

     

    Thanks for the advice!

     

  • wata Profile Picture
    12 on at

    I was curious about the certificate so I ran it on another computer.

     

    As a result, I found that it worked correctly on the other computers.

     

    In other words, I think it may have been a computer-specific (perhaps certificate) problem.

     

    For now, I will run it on the computer on which it worked.

     

    Thanks again for all your advice!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard