Cannot access a disposed object. Object name: 'Google.Apis.Http.ConfigurableHttpClient'

Hi everyone,
I use the REFramework process to read employee information from an Excel file and send an email to each employee. There are no errors when the transactionNumber is 1. However, the second time I encounter an error like this:

Send Email: Cannot access a disposed object.
Object name: 'Google.Apis.Http.ConfigurableHttpClient'.

Can you help me?
Thanks in advance,
Tuan

@Tuannna1

I tried to replicate the same error but I’m not succesful
I’m able to send the email without any issue
Can you check if any of the variables you are passing are getting null?
Also understand that you have click on select all while authenticating

Hope this may help you

Thanks,
Srini

@Srini84
I have verified that there are no issues with the variable and the authentication. I attempted to pass a simple string, but it still fails. However, when I use SMTP or Gsuite, it works fine!

Regards
Tuan

@Tuannna1

Can you hardcode the values and check still you are facing the same issue?

Thanks,
Srini

I have the same issue while using the GmailApplicationCard.
The initial 1/2 mails go through without a problem. But then it gives this identical error.

Send Email: Cannot access a disposed object.
Object name: ‘Google.Apis.Http.ConfigurableHttpClient’.

I tried the same process with a Microsoft 365 email account with no issues.

Seems to be some issue with the Gmail access??

1 Like

I have the same issue. It occurs anytime that the “Use Gmail” activity is encountered more than one time in a single execution/robot. I believe it only happens if you are using the Integration Service, but cannot confirm that right now.

1 Like

This is still an issue!

facing the same issue

They suggested changing any workflows that call the Use Gmail activity to be “Isolated”. This workaround has worked for me.

image

1 Like

I am also experiencing sending emails with Gmail via Integration Service. I will try the isolated invoking of the workflow to see that if fixes it.

Okay so one thing I noticed is that if you use a HTML template that should go into the BODY and not into the HTML Body from Text field…

See image for details.

Hi Friend
I´having exactly the same issue also created a post about it

Did it solve your problem entirely? What does the isolated property mean?

1 Like

See this post:

Hey,

We are sorry for this issue. Can anyone attach a Workflow where this issue happens together with its details so we can replicate it?

Best regards,

1 Like

Hi. I made a sample project to show you how this error occurs.

I think the fix would be to throw a warning that says something about the html template path being in the wrong place. Or somehow editing the send email activity so that if you put the html template in those places it doesn’t mess up. Or just simplifying the options in the activity so it’s easy to know if the email will send a regular TEXT email or if it is sending a HTML email.

As you can see, the first email succeeds because the Html Template Path is only in the “body document path” field in options.

The second and third emails do not send (you might have to comment out other code to run these each one at a time).

Second email error: This fails because the html template path is only in the “HTML body from text” option and that breaks the email sending.

Third email error: This fails because the html_template_path is in both the “body document path” and “html body from text” option and causes an error.

Show_Mail_Fail.zip (147.3 KB)