Upload Gmail Attachments to Dropbox Automatically with webMethods.io Integration

Overview

Learn how to set up an integration to automatically upload all files received as email attachments in Gmail to your Dropbox account in this step-by-step webMethods.io Integration workflow tutorial.

Prerequisite:

  1. Gmail account
  2. Dropbox account

Steps

  1. Login to your webMethods.io Integration tenant or sign up for a free trial if you’re new.
  2. Create a new project or choose an existing one.
  3. Go ahead and get started by creating a blank workflow. If you need a refresher on how to get to this point, this guide can be a great introduction.
  4. Click on the small setting icon on the Start step and choose the Gmail trigger.

Select New attachment as a trigger and complete the authorization – connect webMethods.io Integration with your Gmail account (check the following Tutorial - Using Google services with webMethods.io Integration).

Click Save. You should see the test trigger window.

To test your trigger, you need to perform the trigger action – send an email to your Gmail email address and attach a file:

Go back to the webMethods.io Integration workflow and click Test. You should see the output data from the trigger which webMethods.io Integration will use to configure and test the rest of the workflow. Click Done.

  1. Search for the Gmail connector and add it to the canvas with the drag and drop feature. This automatically connects with the Gmail trigger.

image

image

Click on the small settings icon on the Gmail connector, select Download Attachment as action and complete the authorization – connect webMethods.io Integration with your Google account.

Click Next.

Now you can proceed with the action configuration – use the Incoming data panel and drag and drop the threadId string from the trigger output to the Message ID field:

Click Next, Test and then Done.

  1. Note that in one email you can receive multiple attachments and we need to upload them one by one. That is why, add the Loop connector to the canvas with the drag and drop feature. This automatically connects with the Gmail connector.

image

image

  1. Click on the small settings icon on the Loop connector – select Each item as Loop Type and drag and drop the Download attachment result array from the Incoming data panel to the Source Array/Object field:

Click Next, Test and then Done.

  1. Connect the Loop connector to the Stop step. Double click the Loop connector icon to open the Loop canvas. Search for the Dropbox connector and add it to the canvas with the drag and drop feature:

image

  1. Click on the small settings icon on the Dropbox connector, select Upload a file as action and complete the authorization – connect webMethods.io Integration with your Dropbox account.

Click Next.

Now you can proceed with the action configuration – in the Source File Path field, drag and drop the file_path string of the current value of the loop. In the Destination Folder Path field, choose the folder in your Dropbox account where all the attachments will be saved.

Click Next and then Done.

  1. Save your workflow and run it using the play button in the right upper corner and review the result. If you have configured the workflow correctly, the email attachment will be uploaded to your Dropbox folder shortly.

image

Now every time you receive an email with attachments, they will be automatically uploaded to your Dropbox account. Please note that this may take some time.

  1. At the bottom-left corner of the screen you can find the Execution history of the workflow:

From here you can monitor the executions status and view error details if needed:

2 Likes