You need to sign in to do that
Don't have an account?
Sunil Pal
Add salesforce document in google drive
Hi all,
Any ane done the integration of salesforce and google.I want to upload files from salsforce to google drive using apex code.
Please help.
Thanks
Hi ,
Here is some code about salesforce to google drive integration,
http://theforcetimes.wordpress.com/tag/upload-files-from-salesforce-to-google-drive/
Hope this may helpful to you...!
Thanks for your reply Arun
Is there any working example except this link i have already gone through this and iam not getting my output here.
Thanks
Sunil,
Please check the following links where you can get a couple of examples for your integration.
http://stackoverflow.com/questions/10764740/how-to-upload-a-file-from-salesforce-to-google-drive
http://cloudfindhq.com/5-tips-for-salesforce-users-who-work-with-dropbox-or-google-drive/
http://stackoverflow.com/questions/16973602/how-to-create-and-upload-a-file-in-google-drive-using-salesforce-apex-and-drive
If this post is helpful please throw Kudos.If this
post solves your problem kindly mark it as solution.
Thanks,
Subhani,
Salesforce Certified Developer,
www.mydbsync.com
even i have same problem
if u have code pls share me
Link is very usefull
You need to first authenticate the credentials from the link https://console.developers.google.com/project
Follow the link for the step to create the project and credentials -- credentials https://help.salesforce.com/articleView?id=000239696&type=1
The second Step you need to create one visual force page, I have added the VF page
The third step is you need to create the apex-class and assign the client id and client secret which you will get from google API credentials,
I have attached the apex-class also after following this step you will be authenticated and your file will be uploaded from salesforce to google drive.
Feel free to ask if you need further clarification.
Mark, it as best answers if you like it.
Thanks!
i need you help please to Create google drive Folder via Apex trigger ( one folder by opportunity )
thank you
Hey Yosra,
For that first, you need to create the project in "Google API console" and set the customer id and refresh token. Link https://console.developers.google.com/project or you need to Play around Google Playground from the refresh token.
After the project is created in Google API Console.
You need to go to Salesforce, In setup- search "Auth" and use the customer id, secret and endpoint URL etc from the console where you have set.
After that, you need to write the trigger depending on the condition as per your requirements.
For the reference, you can use this trigger.
Then you need to create the apex class and use the "ID" that code as used in "Auth" in Salesforce.
You can use this code as the reference.
Now you can then save the data from Salesforce to Google drive.
Thanks,
Let me know if you need more details
Realize this is an old post, but worth trying. Is there a way to upload the file from salesforce to a specific google drive folder, and then create a link in salesforce under the account to view the file?
Thanks!
@Azhar Jamil 5
THANKYOU SOOOOO MUCH.. I'm currently working on GOOGLE DRIVE INTEGRATION to UPLOAD FILE using LWC and APEX.
I was able to upload files but the CONTENT inside files was getting uploaded in base64 format (Not the Actual Data), and finally here I Saw your code and only pick one line ****Content-Transfer-Encoding: base64**** to check that if it's gonna do the trick or not.. and BOOOOOM. IT WORKED.
I was just missing this part ****Content-Transfer-Encoding: base64**** in my whole integration, just added this line and everthing is working great.
Thankyou again.