Automatically Uploading Salesforce Files to Google Drive

Drive Connect can automatically upload files from Salesforce Files to Google Drive through the use of Flow. Files upload to Google Drive can automatically be linked to the record they were originally attached to and show up in the Drive Links component. Salesforce Files can also be automatically deleted from Salesforce once they are uploaded to Google Drive.

How it Works

On installation of Drive Connect the File object is created in your org which is required to automatically upload files.

When content documents are created in Salesforce a file record gets created that is used to trigger the flow. This means that once a flow is setup using the Upload to Drive operation, the flow will trigger on any object record that you upload a file to Salesforce. The file record will get deleted so you will not see any file records.

Creating the Flow

If users would like to automatically upload their files they will need to create a flow using the File object, which can be done doing the following.

  1. Go to Setup
  2. Search for Flows
  3. Click on New Flow
  4. Select Record Trigger Flow and then click Create
  5. On Configure Start select the File Object and set the configure trigger as A record is created

    Note: The automatic upload feature can only be configured by the File custom object that is created on installation of Drive Connect.

  6. Click on Done
  7. Next go to New Action
  8. Search for the action Automate Drive
  9. Complete configuration of the action and click on Done, below are is list of some of the available options:
    1. Publish Results Event – if this is toggled on and Link file to record is enabled then on file upload to Google Drive the Drive Links component will automatically refresh to show all of the uploaded files
    2. Destination – By default it is set to Default Object Folder, however this can be changed to any of the following destinations:
      1. Default Record Folder
      2. Folder in Default Record Folder
      3. Linked Folder
      4. My Drive
      5. Folder from Drive…
    3. Link file to record – if this is enabled then the uploaded Salesforce files will appear on the Drive Links component once the flow has completed
    4. Delete Salesforce File – if this is enabled then the uploaded Salesforce files will be deleted from the Salesforce File component once the flow has completed

      Note: By default the record name merge field is in the name field, publish events is toggled on, the link to record and delete Salesforce file checkbox are enabled. There is one child operation available New Drive Shortcut

  10. Click on Save
  11. Click on Activate
  12. Now that your flow is setup you can now go to an object record and upload a file to Salesforce and your files will appear in the designated Google Drive location