Skip to main content

Integrating Google drive with Salesforce Using File Connect Feature

Summer 15 release is out and lot of features to dive into .One thing that caught my immediate attention was ability to integrate Google Drive with Salesforce through lightning connect .

It hardly took me 20 minutes to get this working on my developer edition and I am super excited to highlight step by step procedure to configure this .Please note salesforce did an amazing job on the documentation for this .Its crystal clear to me .

Just to add little more flavour with screenshot would help many folks I believe who have no time to read through documentation .(I strongly suggest please read through release notes )

Step 1

Enable File Connect in your instance .Please note since this is summer 15 release feature i did this in pre-release org 

Step 2

Allow your users to access google drive .Follow the step by step instruction documented in below link

Below shows the permission set that I have created .Remember to check file connect cloud permission 

Step 3

Create an authentication provider for Google Drive

The first step is to create a project in developer console of google 

i)Navigate to the developer console of google using below link 

ii)Enable Drive API and Drive SDK 

Follow below article path on more info .I am attaching screenshots to help you guide 

iii)Create web application so that you can obtain client secret and consumer key to fed back in salesforce

Step 4

Create a google auth provider in SFDC using auth provider configuration listed in document.Please note to specify type as the OPEN ID in the auth provider settings .

In the auth provider  settings you will need to provide client secret and consumer key to the SFDC from google and feed back the redirect or callback URL generated from SFDC back to google application  

Step 5

Create External data sources .Note the type as "File Connect:google drive" .This external data source needs to be added to permission and if your authentication is "per user" type your end users needs some training on how to add this from My Settings tab .Choose Oauth 2.0 protocol .

Validate and sync all objects .You will see an external object created in SFDC and also you will notice if you navigate to chatter files you will see all the data .

There are bunch of other features added as well in this release 

1)Files tab now can provide search layouts for searching these files and no need for searching from chatter

2)Focus Search on a Single External Data Source

3)Files Connect could previously access only standard fields from external data sources. But in Summer ‘15, you can add any custom fields and display them in unique search layouts.

4)Lookup Relationships Supported for Files Connect External Objects

Read through release notes and explore more .Lot of solid stuff in this release and make me wonder "Do salesforce engineers ever sleep". They sleep or not but for consultant like me ,they keep me awake by adding lot of features to the Product .

Hope this feature will make your customer happy that you can access all information from google drive now .

Popular posts from this blog

TLS 1.0 has been disabled For Sandbox - Salesforce

Salesforce has finally disabled TLS 1.0 in sandboxes .This is in preparation for disablement later in 2017 for PRODUCTION instances .

Now this would have not impacted your integrations in PRODUCTION org but if your integration is broken in your sandbox ,this means you have only few months to sort this and fix before this affects your integration for PROD live users .
Before we deep drive on how to possibly fix this and work with your external systems to figure solution ,lets first understand what is TLS and why did SFDC moved to 1.x and had to disable TLS 1.0
TLS 1.0 Explained

TLS 1.1 Improvements 
Added protection against cipher-block chaining (CBC) attacks. Support for IANA registration of parameters.

Clearly TLS 1.1 is more secure(Compared to 1.0) and protects salesforce resources against CBC attacks .
Identify if this change broke anything .The things that can be affected in your instances are as below Web requests to Salesforce URLs that require authenticationWeb requests to the login pag…

Opening Modal Using Lightning Component Framework of SFDC

One of my friend from India threw a challenge .The challenge was to open a modal by using latest and greatest lightning components framework and modals design from SLDS .For the love of community I thought of sharing the entire code base that I did .

So here we start ..

Business Use Case - Need a handy SalesLeader board component that can be used to display the Sales revenue generated by each sales rep for current year in the order of decreasing total revenue .On click of the tile ,we will show detail opportunity list aggregating the revenue .

The component can be dragged in lightning design experience or in App builder lightning Page .

Video Demonstration-

SalesLeaderBoard from Mohith Kumar Shrivastava on Vimeo.

Frameworks Used -
Lightning Design Systems (SLDS) for CSSLightning Component Framework for client side logicApex aura enabled class for backend logicApproach
The component hierarchy is very important to imagine or mindmap before we dig deeper- SalesLeaderMain

Invoking Apex Callout From Process Builder

Process builder is GA in Spring 15 and one of the queries I came across was around how to invoke apex callouts from Process builder .

Before process builder came we had two common approaches of calling webservice 

1)We have outbound messages as one of the Actions for workflows.This works if other party implements the WSDL that is generated once Outbound messaging is defined with appropriate end point .

2)Most of times future method invoked through triggers allowed to do apex callouts and invoke external web service provided the future method is annotated with @future(callout=true).This provides lot of flexibility and one of the best approaches .

3)Flow triggers was in BETA and this was also one of the ways we could invoke callouts provided the Flow implements process plugin .To understand in detail how to implement process plugin refer to the below example

The purpose of this blogpost is to demonstrate the new possibility of invoking apex callout through Process Builder 

I tried initi…