14
Integrate MULE ESB with Dropbox By Ramakrishna Narkedamilli

Mule Integration with Dropbox

Embed Size (px)

Citation preview

Page 1: Mule Integration with Dropbox

Integrate MULE ESB with Dropbox

By Ramakrishna Narkedamilli

Page 2: Mule Integration with Dropbox

Overview:

MuleSoft is a popular ESB technology to integrate various on-premise and cloud applications for data exchange. Dropbox is a cloud storage for personal and business people. Provides client software for many operating systems to sync with Dropbox account data. The Mule Dropbox connector allows applications to interact with Dropbox API to perform various actions.

In this presentation will going to see how to Integrate Mule ESB with Dropbox account to perform Authorization and create folder actions using Mule ESB Anypoint Dropbox connector.

Page 3: Mule Integration with Dropbox

Prerequisites:

Dropbox Developer account. Dropbox app key and app secret values Mule studio with runtime version 3.4+ Mule Dropbox connector.

Page 4: Mule Integration with Dropbox

Dropbox Developer Account Setup:

For this sample purpose, we need Dropbox account. We can sign up for free at https://dropbox.box.com/

Page 5: Mule Integration with Dropbox

Once account creation done, open the link and click on Create app button https://www.dropbox.com/developers/apps

Provide the appropriate values like below and click on Create app button available at bottom.

Page 6: Mule Integration with Dropbox

Finally note down the APP key and APP secret values and add the Oauth2 call back URL.

Page 7: Mule Integration with Dropbox

MULE ESB Flows for Dropbox Integration

The below Mule application is used to create folder under Dropbox account after performing authorization action using Mule Anypoint Dropbox connector.

Page 8: Mule Integration with Dropbox

Steps to be followed for integrating ‘Dropbox’ with MuleSoft Applications:

Install the Dropbox Connector in Anypoint Studio http://repository.mulesoft.org/connectors/releases/3.5

Page 9: Mule Integration with Dropbox

Create a new Anypoint Studio Project and Flow to create new folder.

Configure the Dropbox global element in global elements section by providing the App key and App secret values and setup the oauth callback for authorization.

Page 10: Mule Integration with Dropbox
Page 11: Mule Integration with Dropbox

In the flow first add HTTP inbound endpoint to trigger the service.

Add Dropbox endpoints in the flow for authorization and folder creation referring to Dropbox global connector.

In the Second Dropbox endpoint for folder creation enter MEL expression #[message.inboundProperties.'http.query.params'.foldername] in path variable to create folder in the Dropbox account rootpath.

Now at this position we are integrated with Dropbox to perform actions.

Page 12: Mule Integration with Dropbox

Running and Testing the Application:

Right-click on the application Run Mule Application. Open the browser and hit the url http://localhost:8082?foldername=Mule_POC_Folder Service will take the control to Dropbox for authorization and grant the permission

(This below screen will appear if you already logged in authorize it will ask you to login first then below screen will appear).

On the successful authorization, folder will be created under Dropbox account and response will be returned to browser in case of no errors

Page 13: Mule Integration with Dropbox

Folder creation Under Dropbox

Open the Dropbox account, now you’re able to see new folder “Mule_POC_Folder”

Page 14: Mule Integration with Dropbox

THANKS YOU By Ramakrishna Narkedamilli