cancel
Showing results for 
Search instead for 
Did you mean: 

how to scan and get google/gmail mailbox data and save email as file

JaquelineSantos
Level 4
I have a process that needs to scan gmail inbox, get data from the email and save it as a file. Does anyone know how it is possible to develop this process?


------------------------------
Jaqueline Santos
------------------------------
1 BEST ANSWER

Helpful Answers

Hi Jaqueline,

We automated a similar use case a month back where we were saving the incoming emails on Gmail as PDF's. However, there is no straight way API based automation to save or export emails from Gmail as of now. The way we did was using UI based automation. For your use case, you can spy the Gmail web application to get the appropriate selectors in the following steps:

Step 1: Open the message that you want to download as .eml file
Step 2: Click on the triple dot options at the top right corner and click on Show Original
Step 3: Right Click on the Download Original link and select the menu option Save As
Step 4: Type the file path with '.eml' extension.

If any popup comes you can handle it by some other actions or a relevant business object that you can create for the same. 

Not a very neat approach but for the time being something similar worked for us. Hope it helps you in some way

------------------------------
Devneet Mohanty
Consultant
PriceWaterhouseCoopers India
Ranchi
7381926237
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

View answer in original post

4 REPLIES 4

Hi Jaqueline,

We automated a similar use case a month back where we were saving the incoming emails on Gmail as PDF's. However, there is no straight way API based automation to save or export emails from Gmail as of now. The way we did was using UI based automation. For your use case, you can spy the Gmail web application to get the appropriate selectors in the following steps:

Step 1: Open the message that you want to download as .eml file
Step 2: Click on the triple dot options at the top right corner and click on Show Original
Step 3: Right Click on the Download Original link and select the menu option Save As
Step 4: Type the file path with '.eml' extension.

If any popup comes you can handle it by some other actions or a relevant business object that you can create for the same. 

Not a very neat approach but for the time being something similar worked for us. Hope it helps you in some way

------------------------------
Devneet Mohanty
Consultant
PriceWaterhouseCoopers India
Ranchi
7381926237
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Thank you very much, i will try this solution.


------------------------------
Jaqueline Santos
------------------------------

ewilson
Staff
Staff
@Jaqueline Santos,

Google has a REST API for GMail as well as a .NET client library, but they can only be used with GMail​ accounts that are part of a Google Workspace environment which is a business instance. In other words you can't use the API with personal GMail accounts.

If you're using Google Workspace I'd recommend going the API route for collecting the emails.

Cheers,

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

As Devneet mentioned, this is the best option as of now for Gmail .

------------------------------
MuraliKrishna
Senior Consultant - Automation Developer
------------------------------