Salesforce Integration With Google Drive

  Рет қаралды 5,778

Salesverse

Salesverse

Күн бұрын

This video explains and implements integration between Salesforce and Google Drive.
The Apex trigger and handler code are available in the comments section.

Пікірлер: 50
@brijeshkumarkj9196
@brijeshkumarkj9196 29 күн бұрын
had to make some changes to the code but it works well !! Thanks , but the file name is coming up Untitled , I wish that came up properly as well
@sauravincrt
@sauravincrt Жыл бұрын
Teach us more salesforce integration
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
Sure, will come up with more integration videos 👍
@TBabu-r7m
@TBabu-r7m 7 ай бұрын
Please do video for Salesforce with Google docs.
@ikkibwjoo170
@ikkibwjoo170 5 ай бұрын
what if , i want to upload file and folder into my shared drive instead of my drive
@YojithsaiVemuri
@YojithsaiVemuri 3 ай бұрын
I followed the same procedure as you said..but the response for fist callout post is getting authorization error...
@Salesforcemetaverse
@Salesforcemetaverse 2 ай бұрын
Please cross verify all the steps.
@SiddheshAshtankar
@SiddheshAshtankar 22 күн бұрын
Where i sthe code i cant find it ?
@abhinavmaharshi5166
@abhinavmaharshi5166 Жыл бұрын
i am using same code and object but file upload only salesforce file not upload in google drive
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
Check the logs and try to debug it, provide me any specific step where its breaking then I would be able to help.
@aakashjain8356
@aakashjain8356 Жыл бұрын
hey i am using same code to integrate through custom objects and i am using rich text filed to store images and sending on google drive but the images which are getting upload on drive are corrupted so please can you help me out here
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
Hi, I have not sent images yet using this integration, I need to see how you're doing and try to find resolution of your problem, maybe let's sit together on the weekend for 30 minutes and see.
@sagarchawale3233
@sagarchawale3233 Жыл бұрын
Hi, if we have folder with name New folder in Google Drive, can we save those shared Salesforce files automatically in that folder in google drive?
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
I haven’t tried that you would have to check it if we can do that, using the Zapier we can do but this way via api I can’t say for sure.
@evrengzib99
@evrengzib99 6 ай бұрын
I have done to upload to specific folder with file name
@aakashjain8356
@aakashjain8356 Жыл бұрын
can we change the filename to exact name that we uploaded in salesforce?
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
I cannot surely say with this API integration, if I find anything, I will update you.
@evrengzib99
@evrengzib99 6 ай бұрын
I handled file name and specific folder issue guys.
@sauravincrt
@sauravincrt Жыл бұрын
As well cpq from scratch
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
Please check my CPQ series: kzbin.info/aero/PLZmg_ySttr7D3WcNWARUDg_HjqX6qDODh Hope it covers quite well but still if something is missing, let me know I’ll try to prepare content around that as well.
@sauravincrt
@sauravincrt Жыл бұрын
@@Salesforcemetaverse sure sir, I'll check & marketing cloud is also we can learn sir ?
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
@@sauravincrt yes, please check in playlists, there’s marketing cloud, experience cloud, education cloud, SKUID, Einstein, Omnistudio and more.
@sauravincrt
@sauravincrt Жыл бұрын
@@Salesforcemetaverse oh that many learning modules sir ? Can i learn them all & ask my doubts sir ?
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
@@sauravincrt yeah, it’s all free to learn and I’ll surely try my best to answer your doubts.
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
ContentVersionTriggerHandler: public class ContentVersionTriggerHandler { @future(callout=true) public static void callGoogleDrive(String cvId){ String key = '45945997044-ibcdlgjdah5ug01t60fjrgknd2ssenqc.apps.googleusercontent.com'; String secert = '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'; String redirect_uri = 'developers.google.com/oauthplayground'; String accesstoken; String refreshToken = '1//04QkvioazkXTCCgYIARAAGAQSNwF-L9IrGPSUdFz-sNzm7Rx_x3OOovZqOyPnwYk_0qXKRGXnHAl0Ce1K3hO_n6YMp8Pk6L0lpFA'; HttpRequest req2 = new HttpRequest(); req2.setMethod('POST'); req2.setEndpoint('www.googleapis.com/oauth2/v4/token'); req2.setHeader('content-type', 'application/x-www-form-urlencoded'); String messageBody = 'client_id=' + key + '&client_secret=' + secert + '&refresh_token='+refreshtoken+'&redirect_uri=' + redirect_uri + '&grant_type=refresh_token'; req2.setHeader('Content-length', String.valueOf(messageBody.length())); req2.setBody(messageBody); req2.setTimeout(60 * 1000); Http h2 = new Http(); String resp2; HttpResponse res2 = h2.send(req2); resp2 = res2.getBody(); System.debug('resp2-->>'+resp2); JSONParser parser = JSON.createParser(resp2); while (parser.nextToken() != null) { if ((parser.getCurrentToken() == JSONToken.FIELD_NAME)) { String fieldName = parser.getText(); parser.nextToken(); if (fieldName == 'access_token') { accesstoken = parser.getText(); } else if (fieldName == 'expires_in') { Integer expiresIn = parser.getIntegerValue(); } else if (fieldname == 'token_type') { String tokentype = parser.getText(); } } } ContentVersion cv=[select id,title,ContentDocumentId,versiondata from Contentversion where Id =: cvId ]; Blob myBlob = cv.versiondata; String url = 'www.googleapis.com/upload/drive/v2/files?uploadType=media'; string authorizationHeader = 'Bearer ' + accesstoken; Integer contentSize = myBlob.size(); HttpRequest req1 = new HttpRequest(); req1.setheader('Authorization',authorizationHeader); req1.setheader('Content-Length',String.valueOf(contentSize)); req1.setheader('Content-Type','image/'+'PNG'); req1.setheader('Content-Type','application/'+'pdf'); req1.setMethod('POST'); req1.setEndpoint(url); req1.setBodyAsBlob(myBlob); Http h1 = new Http(); Httpresponse resp1 = h1.send(req1); } }
@thalurumahendrababu
@thalurumahendrababu 7 ай бұрын
How to get endpoint url ?
@Salesforcemetaverse
@Salesforcemetaverse 7 ай бұрын
Check this documentation please, developers.google.com/drive/api/reference/rest/v2
@TBabu-r7m
@TBabu-r7m 7 ай бұрын
Can we integrate Salesforce with Google Docs?
@Salesforcemetaverse
@Salesforcemetaverse 7 ай бұрын
I believe we should be able to, please check the reference link below, developers.google.com/docs/api/reference/rest
@TBabu-r7m
@TBabu-r7m 7 ай бұрын
Is there any possibility to do video for this integration?
@Salesforcemetaverse
@Salesforcemetaverse 7 ай бұрын
@@TBabu-r7m I will add it in my list but it’s mostly no because I do not like coding and it eats so much of my time, check tools like zapier, which saves a lot of time doing these integrations.
@TBabu-r7m
@TBabu-r7m 7 ай бұрын
Is this same as like Salesforce with Google Drive Integration? Then What is the String url I need to take please confirm once? Thank you for your help in advance. If you will do video for this integration, that is very helpful to us.
@Salesforcemetaverse
@Salesforcemetaverse 7 ай бұрын
@@TBabu-r7m That depends upon your specific requirement but I believe the endpoints would be the ones given in the documentation, you would to check it whether if you follow the same steps, it works or not
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
ContentVersionTrigger: trigger ContentVersionTrigger on ContentVersion (after insert) { for(ContentVersion cv: trigger.new){ ContentVersionTriggerHandler.callGoogleDrive(cv.Id); } }
@AnishaTiwari-wb1el
@AnishaTiwari-wb1el 3 ай бұрын
Do you have any GitHub repository for this?
@Salesforcemetaverse
@Salesforcemetaverse 3 ай бұрын
No
@AnishaTiwari-wb1el
@AnishaTiwari-wb1el 3 ай бұрын
@@Salesforcemetaverse can you make a video on integrating twilio with Salesforce and go to meeting with salesforce
@Salesforcemetaverse
@Salesforcemetaverse 3 ай бұрын
@@AnishaTiwari-wb1el Are you asking for which specific communication (call/sms/email) integration using Twilio?
@AnishaTiwari-wb1el
@AnishaTiwari-wb1el 3 ай бұрын
@@Salesforcemetaverse yes sms integration using Twilio
@dhananjaysarpe8261
@dhananjaysarpe8261 6 ай бұрын
it is free api?
@Salesforcemetaverse
@Salesforcemetaverse 6 ай бұрын
I believe API is free but you would need to pay for drive storage like we do for our personal Gmail storage. Check this link as well, developers.google.com/drive/api/guides/limits#:~:text=All%20use%20of%20the%20Google,your%20account%20is%20not%20billed.
@manojbankar-i2w
@manojbankar-i2w Жыл бұрын
hey abhishek i am getting error as "17:35:05:669 VARIABLE_ASSIGNMENT [56]|resp1|"System.HttpResponse[Status=Unauthorized, StatusCode=401]"|0x5d6156aa".
@Salesforcemetaverse
@Salesforcemetaverse Жыл бұрын
Ah, I see, please provide more information and screenshot as well. Also check all the steps again whether you’ve missed something.
Slack Integration With Salesforce
30:30
Salesverse
Рет қаралды 4,9 М.
How to Integrate Salesforce and Google Drive Using Files Connect
16:27
Arthur Backouche - Salesforce
Рет қаралды 12 М.
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 4,2 МЛН
So Cute 🥰
00:17
dednahype
Рет қаралды 58 МЛН
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 8 МЛН
Sales Cloud: Gmail Integration and Salesforce Inbox | Expert Coaching
11:07
Salesforce and Google drive with File Connect
12:47
Jitendra Zaa
Рет қаралды 22 М.
Salesforce Integration- Chat GPT integration with Salesforce
19:06
Salesforce API Fundamentals
37:51
Salesforce Developers
Рет қаралды 55 М.
Salesforce and SharePoint integration
18:03
Naresh k
Рет қаралды 14 М.
Integrate Google Drive with Salesforce File Connect
18:47
Yogendra Jangid - Salesforce System Architect
Рет қаралды 2,2 М.
Connect to Salesforce using Postman
22:08
SFDC Stop
Рет қаралды 108 М.
Новый уровень твоей сосиски
00:33
Кушать Хочу
Рет қаралды 4,2 МЛН