Overview
Learn how to set up an integration that will automatically upload all attachments you receive in a Cisco Webex Teams space to your Dropbox account in this step-by-step webMethods.io Integration workflow tutorial.
Prerequisite:
- Cisco Webex Teams account
- Dropbox account
Steps
- Login to your webMethods.io Integration tenant or sign up for a free trial if you’re new.
- Create a new project or choose an existing one.
- 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.
- Click on the small setting icon on the Start step and choose the Cisco Webex Teams trigger.
Select New Message as a trigger and complete the authorization – connect webMethods.io Integration with your Cisco Webex Teams account. After successful authentication, you should see a dropdown list with all spaces you are part of – select the one for which you want to set this trigger.
Set the Has File(s) option to true since we want only messages with attachments to trigger this workflow.
Click Save. You should see the test trigger window.
To test your trigger, you need to perform the trigger action – send a file in your Cisco Webex Teams space:
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.
- Search for the Dropbox connector and add it to the canvas with the drag and drop feature. This automatically connects with the Cisco Webex Teams trigger.
Before continuing with downloading the attachment and uploading it to Dropbox, we will perform a check on whether a folder with the sender’s name exists in the Dropbox account. If not webMethods.io Integration will create the folder first and then upload the file.
Click on the small settings icon on the Dropbox connector, select Search File and Folder Metadata as an action, and complete the authorization – connect webMethods.io Integration with your Dropbox account.
Click Next.
Now you can proceed with the action configuration – set the Folder Path field to search through all the folders, use the Incoming data panel and drag and drop the personName string from the trigger output to the Search String field:
Click Next, Test and then Done.
- Search for the Switch action and add it to the canvas with the drag and drop feature. This automatically connects with the previous step.
-
Let’s set up the first case – if no folder with the sender’s name exists.
7.1. Search for the Dropbox connector and add it to the canvas with the drag and drop feature. This automatically connects with the Switch action. Now hover over the case 1 arrow and click on the gear icon – this will open the condition window:
Add a condition – if the matches array from the previous step is empty:
Click Done.
7.2. Now click on the small settings icon on the Dropbox connector, select Create folder as an action, and complete the authorization – connect webMethods.io Integration with your Dropbox account. Click Next.
Choose the personName string from the trigger as Folder Name and set the Folder Path to “/”. Click Next, Test (this will create the folder) and then Done.
7.3. Search for the Cisco Webex Teams connector and add it to the canvas with the drag and drop feature. This automatically connects with the previous step. Click on the small settings icon on the connector, select Download attachments as an action, and complete the authorization – connect webMethods.io Integration with your Dropbox account. Click Next.
Choose the files array from the Trigger data in the Incoming data panel. Click Next, Test (this will download all files in the message) and Done.
7.4. The final step is to upload all files to Dropbox. We will use the Loop action to achieve this. Search for it and drag and drop it to the canvas. Click on the small settings icon on the Loop connector – select Each item as Loop Type and drag and drop the files array result array from the Incoming data panel to the Source Array/Object field:
Click Next, Test and then Done. 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:
Click on the small settings icon on the Dropbox connector, select Upload a file as an 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 filepath string of the current value of the loop. In the Destination Folder Path field, choose the folder path result from the Create folder action:
Click Next and then Done.
-
Now let’s set up the default case – a folder with the sender’s name already exists.
8.1. Search for the Cisco Webex Teams connector and add it to the canvas with the drag and drop feature. Connect it with the Switch action. Now hover over the case 2 arrow and click on the gear icon – this will open the condition window:
From the Select Case drop down menu select Default. Click Done.
8.2. Click on the small settings icon on the connector, select Download attachments as an action and complete the authorization – connect webMethods.io Integration with your Dropbox account. Click Next. Choose the files array from the Trigger data in the Incoming data panel. Click Next, Test (this will download all files from the message) and Done.
8.3. Add the Loop action again to the canvas and set it up the same way we did in step 7.4. only this time in the Upload File action use the filepath from the Search File and Folder Metadata action:
Click Next, Test and then Done. Close the Loop canvas and connect the Loop action to the Stop step.
-
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 attachment will be uploaded to your Dropbox folder shortly:
Now every time you receive a message with attachments in your Webex Teams space, they will be automatically uploaded to your Dropbox account. Please note that this may take some time.
- At the bottom-left corner of the screen you can find the Execution history of the workflow:
From here you can monitor the execution status and view error details if needed:
#webMethods-cloud#Thursday-tricks#tutorial#webMethods-io-Integration#webMethods