Good day, could you provide me with a guide on how to develop a robot that monitors incoming emails to a Gmail account, and when it finds one containing a bank statement (I know the subject), it downloads the attachment to a folder?
1. UiPath Integration Service:
- Ensure you have access to UiPath Automation Cloud and Integration Service.
- Connect the Gmail account to UiPath Integration Service:
- In UiPath Automation Cloud, go to Integration Service > Connections.
- Add Google Workspace as a connection.
- Log in with your Gmail credentials and grant the necessary permissions to access Gmail.
2.Steps to Build the Workflow
Step 1: Set Up the Google Workspace Integration
1.Install UiPath.GSuite.Activities Package:
- In UiPath Studio, go to Manage Packages > All Packages and install UiPath.GSuite.Activities.
- Configure the Google Workspace Integration in UiPath Integration Service:
- Sign in to UiPath Automation Cloud > Integration Service.
- Add a Google Workspace connection, authenticate with your Gmail account, and give it access to email (Gmail API permissions).
- Configure UiPath Studio to Use Integration Service:
- In your UiPath Studio project, click on Project > Add Connection and select Google Workspace from the list of integrations.
- This adds the integration activities to your project.
Step 2: Monitor Emails and Download Attachments
- Use
Google Workspace > Gmail > Get Emails
Activity:
- Configure this activity to retrieve emails with a specific subject.
- Set Query to
"subject:Bank Statement"
. This will search for emails with “Bank Statement” in the subject line. - Set Max Results to limit the number of emails fetched in each run (e.g., 10 or 20).
- Loop Through Each Email:
- Use a
For Each
activity to loop through the list of emails returned.
- Download Attachments:
- Inside the loop, add a
Get Attachments
activity, setting the Message property to the current email item (e.g.,item
). - Configure a For Each Attachment loop to go through each attachment and specify a folder path where the attachments should be saved.
- Save the Attachments:
- For each attachment in the loop, use the Save Attachment activity.
- Set the File Path property to the desired folder path (e.g.,
"C:\BankStatements\"
) where attachments will be stored.
1 Like
Use integration services and google workspace activities for this.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.