Let us explore how you can integrate Gmail with Google Drive, following which, each time you receive an email with an attachment, it will automatically be uploaded to your Google Drive.
This automation requires a one-time setup, for which we will use Pabbly Connect.
We will first link Gmail with Pabbly Connect using Email Parser to capture the emails, then link Pabbly Connect with Google Drive and upload the file attachment to your Google Drive.
Steps to Automatically Upload New Email Attachments to Google Drive
1. Sign In / Sign Up to Pabbly Connect and Create a Workflow
2. Setup Email Parser by Pabbly as the Trigger App to Capture Emails
3. Add a Filter to the Workflow
4. Setup Google Drive as the Action App to Upload Files
Step 1:- Sign In / Sign Up to Pabbly Connect and Create a Workflow
A. Sign In / Sign Up
To begin this process, visit Pabbly Connect and create your account by clicking on the ‘Sign Up Free’ button. You can also click on Sign In if you already have an account.
Click on the Pabbly Connect ‘Access Now’ button
B. Create Workflow
To create a new workflow, click the ‘Create Workflow’ button.
Name your workflow, and click on ‘Create’.
Step 2:- Setup Email Parser by Pabbly as the Trigger App to Capture Emails
We will now look at the steps through which we will establish a link between Gmail and Pabbly Connect. This will help us to fetch the emails.
A. Trigger App
Trigger allows us to choose the application that will receive the data for Pabbly Connect. In our case, it would be Email Parser by Pabbly.
Choose ‘Email Parser by Pabbly’ as the Trigger App and copy the Email – this Email Address will be used to fetch the emails from your Gmail account.
B. Connect Gmail Account
Login to your Gmail account, and click on ‘Settings’ > ‘See all settings’.
Select ‘Forwarding and POP/IMAP’ and click on ‘Add a forwarding address’.
Paste the Email Address we copied earlier, and click on ‘Next’.
A dialogue box will pop up asking you for confirmation. ‘Proceed’ with forwarding to the given email address.
You will be asked to enter a confirmation code, which you will find under Response Received on Pabbly Connect.
Expand Response Received, copy the Confirmation Code, paste it into its given field, and click on ‘Verify’.
Enable Forwarding, click on ‘Save Changes’ and your connection will be established.
C. Test Connection
To test the established connection, click on ‘Re-Capture Email Parser Response’ and send a test email to your account using a different ID.
Switch to Pabbly Connect, and expand Response Received – under which the latest email details must be visible, thus confirming our connection.
Step 3:- Add a Filter to the Workflow
Since we want to upload only those files which are attached to specific emails and filter out all other irrelevant ones – we will add a filter to our workflow.
Choose ‘Filter by Pabbly’ as the Action App, select ‘Subject’ as your Label, select ‘Contains’ as the Filter Type, enter a keyword from the subject as Value, and click on ‘Save & Send Test Request’. This will ensure that the next step in our workflow will only be executed if the subject of your email contains that specific keyword
Step 4:- Setup Google Drive as the Action App to Upload Files
Action allows us to choose the application that will get executed by the workflow trigger.
We essentially want to upload the captured email attachments to Google Drive. Thus, Google Drive will be our Action App.
A. Action App
Choose ‘Google Drive’ as the Action App, select ‘Upload a File’ as an Action Event, and click on ‘Connect’.
B. Connect Google Drive Account
To connect with your Google Drive account, select ‘Add New Connection’ and click on ‘Connect With Google Drive’. Also, grant the authorization.
C. Map Necessary Fields
Now that you have connected your Google Drive account, all you need is to map the necessary details from the step above. Mapping ensures our data remains dynamic and changes as per the received responses.
Map the URL from the step above.
Copy the Folder ID from your Google Drive URL and paste it into its given field.
Map the File Name from the step above and click on ‘Save & Send Test Request’.
The moment you click on Save & Send Test Request, the file will be uploaded to your Google Drive account.
Our automation is complete. We have successfully integrated Gmail with Google Drive. Each time you receive a new email attachment on Gmail, it will automatically be uploaded to your Google Drive.
You can copy this entire workflow by clicking this link.
Sign Up for a free Pabbly Connect account, and start automating your business
Subscribe to our Youtube Channel for more such automation
For any other queries, visit our forum