Skip to main content

Files Connect

Files Connect is a Salesforce service that connects Salesforce orgs to external file repositories. This allows users to create and reference external files from Salesforce, such as in Chatter posts and the standard Files tab, and uses less storage than hosting files directly inside Salesforce. When Files Connect is enabled with Komodo Publications Planning, users can also initiate document creation and collaboration user flows from inside Salesforce to the external file repositories. This page provides guidance on how to set up and configure Files Connect with Komodo Publications Planning and how to use Files Connect documents within Komodo Publications Planning. For more information about Files Connect, visit Salesforce's documentation on Salesforce Files Connect.

Warning

While Salesforce's Files Connect service can be used with many different external file repositories, like Google Drive, Box, Sharepoint, One Drive, and more, the Komodo Publications Planning product currently only supports a Files Connect integration with Google Drive.

Additionally, the default Files Connect integration uses Google Drive as an external data source and has a file size limit of 6MB when saving files from Komodo Publications Planning to Google Drive, creating snapshots of external documents, and creating package files for external documents. Customers can purchase the premium Files Connect integration to use Google Drive as an external service and increase the file size limit to 75MB for files that are saved to Google Drive and 2GB for snapshots and package files. Customers must make sure to follow all of the setup and configuration steps below, including step 7. (Premium) Enable the premium Files Connect integration, to use the premium integration.

Setup and configuration

To set up and configure the Files Connect service inside a Salesforce org that has Komodo Publications Planning installed:

1. Create an OAuth consent screen in the Google Cloud console

2. Create an authentication provider in Salesforce

3. Enable Files Connect in Salesforce

4. Grant permission to use Files Connect in Salesforce

5. Define an external data source for Google Drive in Salesforce

6. Grant permission to use Google Drive as an external data source in Salesforce

7. (Premium) Enable the premium Files Connect integration

2. Create an authentication provider in Salesforce

To create an authentication provider for Google Drive in your Salesforce org, complete the following steps. For more information, visit the same Salesforce documentation on how to Create an Authentication Provider for Google Drive.

  1. Log into your Salesforce org.

  2. In Setup, search for and select Auth. Providers.

  3. Click New.

  4. In the Provider Type dropdown, select Open ID Connect. Additional fields will appear.

  5. Enter the following details:

    Name

    Enter a name for the provider that should appear in the Salesforce org. For example, Google Drive.

    URL suffix

    Enter the suffix that should appear at the end of the authentication URL path. For example, in the URL path https://login.salesforce.com/services/authcallback/00Dx00000000001/MyGoogleProvider, the suffix is MyGoogleProvider.

    Consumer Key

    Enter the client ID from step 1t above.

    Consumer Secret

    Enter the client secret from step 1t above.

    Authorize Endpoint URL

    Enter the following:

    https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force

    Token Endpoint URL

    Enter the following:

    https://accounts.google.com/o/oauth2/token

    Default Scopes

    Enter the following:

    openid email profile https://www.googleapis.com/auth/drive
  6. Click Save. The Auth. Providers page will open again and show the newly created authentication provider.

  7. Click the name of the authentication provider to open its details page.

  8. Under the Salesforce Configuration section, copy the Callback URL value.

  9. Navigate back to the OAuth 2.0 client credentials details page in the Google Cloud console from step 1t.

  10. Under the Authorized redirect URIs section, click + Add URI, paste the Callback URL, and click Save.

3. Enable Files Connect in Salesforce

To enable the Files Connect service in your Salesforce org, complete the following steps. For more information, visit Salesforce's documentation on how to Enable Salesforce Files Connect for Your Organization.

  1. Navigate back to your Salesforce org.

  2. In Setup, search for and select Files Connect.

  3. Check the Enable Files Connect checkbox.

  4. Set File Sharing to Reference.

  5. Click Save.

4. Grant permission to use Files Connect in Salesforce

To grant admins and/or users permission to configure and use the Files Connect service in the Salesforce org, respectively, create a new permission set or modify an existing permission set to include the Files Connect Cloud system permission. For more information, visit Salesforce's documentation on how to Let Users and Administrators Access Files Connect Data Sources.

Warning

You must be granted the permission set with the Files Connect Cloud system permission to complete the next setup and configuration steps.

5. Define an external data source for Google Drive in Salesforce

To define Google Drive as an external data source for your Salesforce org:

  1. In Setup, search for and select External Data Sources.

  2. Click New External Data Source.

  3. Enter a name for the external data source. This will appear as the label on the button in the Files Connect component. For example, if you set the name to Google Drive, the button to authenticate to the external service will be "Connect to Google Drive" while the button to select a file from the external service will be "Select from Google Drive".

  4. In the Type dropdown, select Files Connect: Google Drive.

    Note

    If the Files Connect: Google Drive option is missing from the Type dropdown, double check that you have completed step 3 and step 4 above.

  5. Set the Identity Type to Per User.

  6. Set the Authentication Protocol to OAuth 2.0. Additional fields will appear.

  7. Set the Authentication Provider to the authentication provider created in step 2.

  8. Leave the Scope field empty.

  9. Check the Start Authentication Flow on Save checkbox.

  10. Click Save.

  11. Complete the Google authentication flow to enable the external data source.

    Note

    If the authentication flow fails, double check that you have completed step 2.

    The Administration Authentication Status will appear as Authenticated.

6. Grant permission to use Google Drive as an external data source in Salesforce

To grant admins and/or users permission to use Google Drive as an external data source in the Salesforce org:

  1. Open the permission set from step 4.

  2. Click External Data Source Access.

  3. Click Edit.

  4. Select the external data source created in step 5 and click Save.

7. (Premium) Enable the premium Files Connect integration

If you have purchased the premium Files Connect integration that allows for larger files to be snapshotted, used for package files, and saved to Google Drive as an external service in addition to an external data source, you must complete the following steps to enable the premium integration.

  1. In Setup, navigate to the Default (PP_Default) MCM Global Setting (mvn__CM_Global_Setting__mdt) metadata record.

  2. Ensure that the Enable External Files Connect Service (mvn__CM_Enable_External_Files_Connect__c) field is checked (i.e., equals true). Modify the field as needed.

  3. Uncheck the Hide Files Connect File Button (mvn__CM_Hide_Files_Connect_File_Button__c) field (i.e., set to equal false).

  4. Set the Files Connect Environment (mvn__CM_Files_Connect_Environment__c) field to the environment of your Salesforce org.

User authentication

After the Files Connect service is set up and configured with the Komodo Publications Planning product, every user must authenticate to Google Drive to create or reference files in the external data source. Users can initiate the authentication flow by clicking Connect to Google Drive anywhere in Komodo Publications Planning where the Files Connect component is available, such as:

  • the Files Connect tab in the New Document wizard;

  • the Files Connect tab in the New Package File wizard.

Once the authentication flow is complete, a Finish Authorization modal will appear in the Salesforce org and the Connect to Google Drive button will change to a Select from Google Drive button.

Note

The label on the Connect to Google Drive and Select from Google Drive buttons are driven by setup and configuration step 5c above as well as the CM_Authorize_File_Repository and CM_Select_From_File_Repository custom labels.

(Premium) Additional authorization

If you have purchased and enabled the premium Files Connect integration, every user must also authorize the Files Connect service to push files to and edit files in Google Drive as an external service.

To authorize the Files Connect service, users must:

  1. Click Authorize Files Connect Service anywhere in Komodo Publications Planning where the Files Connect component is available. With the premium Files Connect integration, the Files Connect component is available in several additional areas, such as:

    • the File Details component;

    • the Files Connect tab in the Upload New Version wizard; and

    • the Files Connect tab in the New Draft wizard.

    Salesforce's "Allow Access?" page will open.

  2. Click Allow. A success page/tab will open.

  3. Close the success page/tab and return to the Komodo Publications Planning screen.

Once the authorization flow is complete, a Finish Authorization modal will appear in the Salesforce org and the Authorize Files Connect Service button will either change to the Select from Google Drive button if the user authentication steps above have already been completed or to the Connect to Google Drive button if the user has not yet authenticated to Google Drive.

Possible error messages

If a user encounters the following error message(s) when trying to authenticate or use the Files Connect integration, you should check that the integration was configured properly, that the user has the required permission set, and that the values on the Default MCM Global Setting metadata record have been set appropriately.

Error message

Possible reason(s)

There are no external data sources configured. Please contact an admin to configure Files Connect and add external sources to use this feature.

  • the Files Connect service was not properly configured; or

  • the user was not granted the appropriate permission set to use the Files Connect Service

To add a file contact your administrator to allow additional file options

  • the Hide External File Button (mvn__CM_Hide_External_File_Button__c) field, the Hide Files Connect File Button (mvn__CM_Hide_Files_Connect_File_Button__c) field, and the Hide M365 File Button (mvn__CM_Hide_M365_File_Button__c) field on the Default (PP_Default) metadata record of the MCM Global Setting (mvn__CM_Global_Setting__mdt) custom metadata type are all checked (i.e., equals true)

User flows

After a user authenticates to Google Drive, the user can then initiate the following user flows with the Files Connect service.

Create a new external document

Users can upload documents in Komodo Publications Planning to Google Drive. If the document is not yet linked to a file in Google Drive, users can select a location or folder in Google Drive to upload the new document; if the document is already linked to a file in Google Drive, users can either replace it or create a new file. If a document has multiple versions with different Google Drive references, Komodo Publications Planning uses the last document version for operations such as creating a snapshot of the document.

Warning

The link between the Document record and the source file in Google Drive should never be broken, and users who perform actions that may break the link will see warning messages. For example, if a document has multiple versions and a user attempts to delete the version of the document that is linked to a Google Drive file, then a Confirm External Source Replacement pop-up will appear. For more information about document versions and snapshots with the Files Connect service, reference the Create a snapshot of an external document section below.

Create a new file

To create an external document that references a new Google Drive file:

  1. Navigate to the Documents tab and click New Document. The New Document wizard will open.

  2. Select Files Connect for where the file should be hosted. A Files Connect box will appear with the available file services that have been configured (e.g., Google Drive).

  3. Click Select from Google Drive. The Select from Google Drive wizard will open.

  4. Select My Drive or any available Google Drive folder.

  5. Click New. A dropdown will open a list of file types that can be created.

  6. Select the type of file to be created. Only the following Microsoft 365 and Google Drive file types are available. A wizard will open.

    Table 145. Files Connect types

    File type

    Microsoft 365

    Google Drive

    Document

    Microsoft Word

    Google Docs

    Spreadsheet

    Microsoft Excel

    Google Sheets

    Presentation

    Microsoft PowerPoint

    Google Slides

    File Upload

    N/A - all Microsoft 365, text, and image files are supported as long as the file extension exists as a Content Type (mvn__CT_Content_Type__mdt) metadata record



  7. Select whether the file should be created with Microsoft 365 or Google Drive, enter a name (and description) for the file, and click Create. The New Document wizard will appear again, and the Title field will be automatically populated with the file name.

    Note

    If the file is created with Microsoft 365, the new file will use the template in the corresponding static resource. For more information, reference the Configure Microsoft 365 file templates section below. However, if the file is created with Google Drive, the new file will be blank.

    Warning

    If you have the default Files Connect integration, users can only create external files in Google Drive that are up to 6MB in size. If you have purchased and enabled the premium Files Connect integration, users can create external files in Google Drive that are up to 75MB in size.

  8. Complete the remaining fields and progress through the rest of the New Document wizard. The new Document record will be created, and the document's details page will open.

    Note

    If the file extension that appears in the final screen of the New Document wizard is ".undefined", then snapshots cannot be created for the external document. For more information, reference the Create a snapshot of an external document section below.

Use an existing file

To create an external document that references an existing Google Drive file:

  1. Navigate to the Documents tab and click New Document. The New Document wizard will open.

  2. Select Files Connect to indicate where the file should be hosted. A Files Connect box will appear with the available file services that have been configured (e.g., Google Drive).

  3. Click Select from Google Drive. The Select from Google Drive wizard will open.

  4. Select the Google Drive folder where the file exists or can be found.

  5. Select the file that should be created as a document in Komodo Publications Planning.

  6. Click Select. The New Document wizard will appear again, and the Title and Description fields will be automatically populated with the file name and description.

  7. Complete the remaining fields and progress through the rest of the New Document wizard. The new Document record will be created, and the document's details page will open with a preview of the file's existing content.

Configure Microsoft 365 file templates

When a user creates a new Microsoft 365 file in Google Drive through the Files Connect service in Komodo Publications Planning, the file is generated with a Microsoft 365 template that is stored as a static resource and defined on the MCM Global Setting (mvn__CM_Global_Setting__mdt) custom metadata type. As a result, the static resource for every Microsoft 365 file type and the configuration on the MCM Global Setting custom metadata type are required for documents to be created as new Microsoft 365 files in Google Drive. Komodo Publications Planning ships with several static resources that act as empty Microsoft 365 file templates, but you can add and configure your own templates as well.

To create a new template for a Microsoft 365 file type:

  1. Upload the Microsoft 365 file template as a static resource. The static resource must be either a .docx, .pptx, or .xlsx, file.

  2. Navigate to the MCM Global Setting (mvn__CM_Global_Setting__mdt) custom metadata type.

  3. Edit the Default (PP_Default) metadata record and update the MCM Global Setting field that corresponds to the type of file that was uploaded as a static resource:

    Static resource file type

    MCM Global Setting field

    .docx

    Files Connect Word Template (mvn__CM_Files_Connect_Word_Template__c)

    .pptx

    Files Connect PowerPoint Template (mvn__CM_Files_Connect_PowerPoint_Template__c)

    .xlsx

    Files Connect Excel Template (mvn__CM_Files_Connect_Excel_Template__c)

View an external document

To view an external document, users can open the file directly from the MCM - Document Version File Details (cmDocumentVersionFileDetails) component. When users click Open in the File Details component, a new browser tab is launched that opens the file in Google Drive. Users can also preview the file directly on the Document record's details page, but the file preview is an image of the first page of the file and may not be available for every external document.

Share an external document

To share an external document, users must first modify the sharing settings of the source file. For more information, reference Google's documentation on how to Share files from Google Drive. Users can then share the external document in Komodo Publications Planning by either adding document collaborators to the Document record or clicking Copy Link in the File Details component and sharing the file link. If a document collaborator is added to a Document record or given the file link of a Google document that they do not have access to in Google Drive, then one of two things will occur. If the document collaborator is part of the same organization, then they can request access to the Google document. However, if the document collaborator is outside of the organization, they will see an "Unauthorized" page.

Edit an external document

Unlike how users can check out regular Document records and files that are hosted inside Komodo Publications Planning, users cannot check out external documents and the Check Out Document option on the Document record's details page is disabled (i.e., greyed out). However, users can still make edits to and collaborate on the external documents by opening the file in Google Drive the same way users would to view the file. Any changes made to the file in Google Drive will be reflected in the file preview on the Document record's details page when available.

(Premium) Create a new external document version

If you have purchased and enabled the premium Files Connect integration, users can create new document versions in Google Drive through Komodo Publications Planning. If the current external document is a reference to a file in Google Drive, a snapshot must be created to save the Google Drive file reference as a local document in Komodo Publications Planning so that a new external document version can be created. For more information, follow the snapshot creation steps in the Create a manual snapshot section below and make sure to leave the Save snapshot to current document version field unchecked. The Create Snapshot button will change to the New External Version button.

Note

To create a new external document version on a local document:

  1. Click New External Version. The Upload New Version modal will open.

    Note

    If the Create Snapshot button appears in place of the New External Version button, make sure you first create and save a snapshot of the external document to the current document version. You can then click Create New Version to open the New Version modal and add a new document version that will be used as the new external document version, as desired.

  2. Select either the Replace Existing File tab or the Upload New to Folder tab.

    1. Use the Replace Existing File tab to replace the existing contents of the original file in Google Drive, if one exists. The system will check that the MIME type of the original file in Google Drive and the file type of the local file in Komodo Publications Planning match before it uses the Komodo Publications Planning file to update the Google Drive file.

    2. Use the Upload New to Folder tab to use the local file in Komodo Publications Planning to create a new file in Google Drive. Users will be able to select a folder in Google Drive where the new file should be created while individual files in Google Drive will be disabled (i.e., greyed out) from selection.

  3. Enter a reason for creating a new external document version.

  4. Click Save.

Start a workflow with an external document

Users can start workflows and complete tasks with external documents the same way as with other documents in Komodo Publications Planning. However, external documents cannot be sent as attachments in emails and will be removed from the Attachments table in the Start Workflow modal.

Create a snapshot of an external document

If users want to track changes that are made to external documents at different points in time, users can create manual and automatic snapshots. All snapshots will increment minor versions of the external documents.

Warning

Snapshots can be created for external files in Google Drive but not for Google Drive file types; the Create Snapshot button will be disabled (i.e., greyed out) for any external file of a Google Drive file type. Additionally, if you have the default Files Connect integration, snapshots can only be created for external files that are up to 6MB in size. If you have purchased and enabled the premium Files Connect integration, snapshots can be created for external files that are up to 2GB in size.

Create a manual snapshot

To create a manual snapshot of an external document:

  1. Navigate to the document's details page.

  2. Click Create Snapshot. The New Snapshot Version modal will open.

    Note

    If the Create Snapshot button is disabled, make sure you have edit access to the Document record and that the external document is the latest version of the Document record. If the Create Snapshot button is replaced with the New External Version button, this is because the file is stored in Komodo Publications Planning, and instead of taking a snapshot, you can create a new document version. For more information, reference the (Premium) Create a new external document version section above.

  3. (Optional) Check the Save snapshot to current document version checkbox. This is unchecked (i.e., equals false) by default and can be configured via the Snapshot file to current version (CM_Files_Connect_Snapshot_To_Current__c) field on the Default (PP_Default) MCM Global Setting (mvn__CM_Global_Setting__mdt) metadata record.

    When checked, the latest contents of the external file will be retrieved and stored inside the current Document Version record while the link to the external file will be referenced in a new Document Version record. The new Document Version record will therefore maintain the connection between the Document record and the external file, store the latest version of the external file, and increment a minor version of the document. (For example, Version 0.1 will now reference the downloaded copy of the external file while Version 0.2 will reference the actual external file.) When unchecked, the link to the external file will remain on the current Document Version record while the latest contents of the external file will be retrieved and stored inside a new Document Version record. The new Document Version record will therefore still increment a minor version of the document but will lose the reference to the external file such that snapshots can no longer be created for the external document. (For example, Version 0.1 will continue to reference the actual external file while Version 0.2 will reference the downloaded copy of the external file.)

  4. Enter a reason for creating a snapshot.

  5. Click Save.

(Premium) Create snapshots for larger files

If you have purchased and enabled the premium Files Connect integration, users can create snapshots of external documents that are larger in file size. When users complete the steps in the Create a manual snapshot section above, the creation of the snapshot is queued and the document is checked out to ensure that no other user can make modifications to the external document.

Note

Due to the greater file size limit that comes with the premium Files Connect integration, the snapshot creation process can take up to 10 minutes.

Create automated snapshots

To configure automated snapshots to be taken when an external document enters a specific state:

  1. Navigate to the Document State Entry Action (mvn__CM_Document_State_Entry_Action__mdt) custom metadata type.

  2. Edit an existing metadata record or create a new metadata record.

  3. Set the Document State field to the state that the external document must enter to trigger the automated snapshot.

  4. Set the Type field to New Snapshot Version.

  5. Click Save.

When an automated snapshot is created, the latest contents of the external file will be saved in either the current Document Version record or a new Document Version record based on the Snapshot file to current version (CM_Files_Connect_Snapshot_To_Current__c) field on the Default (PP_Default) MCM Global Setting (mvn__CM_Global_Setting__mdt) metadata record.

When checked, the latest contents of the external file will be retrieved and stored inside the current Document Version record while the link to the external file will be referenced in a new Document Version record. The new Document Version record will therefore maintain the connection between the Document record and the external file, store the latest version of the external file, and increment a minor version of the document. (For example, Version 0.1 will now reference the downloaded copy of the external file while Version 0.2 will reference the actual external file.) When unchecked, the link to the external file will remain on the current Document Version record while the latest contents of the external file will be retrieved and stored inside a new Document Version record. The new Document Version record will therefore still increment a minor version of the document but will lose the reference to the external file such that snapshots can no longer be created for the external document. (For example, Version 0.1 will continue to reference the actual external file while Version 0.2 will reference the downloaded copy of the external file.)

Warning

If you configure two Document State Entry Action metadata records for the same document state but one is for a new snapshot version while the other is for a new major version, an automated snapshot will create two versions of the external document. To avoid this, do not configure two document state entry actions for the same document state.

Configure snapshot notifications and audit logs

You can configure notifications to be sent and audit logs to be created whenever a manual or automated snapshot is created. To configure snapshot notifications and audit logs:

  1. Navigate to the Document System Event Notification (mvn__CM_Document_System_Event_Notification__mdt) custom metadata type.

  2. Click New.

  3. On the System Event Configuration field, search for and select Document New Version Snapshot (CM_Document_New_Version_Snapshot). The Create Document Audit Log checkbox on the related Document New Version Snapshot (CM_Document_New_Version_Snapshot) System Event (mvn__SE_System_Event__mdt) metadata record is set to true by default.

  4. Click Save.

Create a package file for an external document

Similar to typical Document records and files hosted inside Komodo Publications Planning, external documents can also have one or more package files. Package files for external documents can themselves be created through the Files Connect service. However, package files for external documents retrieve and contain the actual contents of the external files while external documents only link out to the external files. As a result, package files that are created from the Files Connect service can only be created from existing Microsoft 365 files in Google Drive and cannot be created with new files or with files of Google Drive file types.

Warning

If you have the default Files Connect integration, package files can only be created with external files in Google Drive that are up to 6MB in size. If you have purchased and enabled the premium Files Connect integration, package files can be created with external files that are up to 2GB in size.

To create a package file for an external document:

  1. Navigate to the document's details page.

  2. On the MCM - Document Version Package Files (cmDocumentVersionPackageFiles) component, click New. The New Package File wizard will open.

  3. Click the Files Connect tab.

  4. Click Select from Google Drive. The Select from Google Drive wizard will open.

  5. Select the Google Drive folder where the file exists or can be found.

  6. Select the Microsoft 365 file that should be created as a package file for the document.

  7. Click Select. The New Package File wizard will appear again.

  8. Click Save. The package file will be created and added to the Package Files component.

External documents and files in the Collaborator Portal

Any external documents or files that are created in the Salesforce instance of Komodo Publications Planning will appear in the My Publications tab in the Collaborator Portal. However, Collaborator Portal users will only be able to view the documents' metadata and cannot open or view the actual files. Additionally, only the package files for the external documents can be downloaded; the document files themselves cannot be downloaded, and users who try to click the KPP_PortalDownloadIcon.png Pub and KPP_PortalFilesIcon.png Pub & Package Files buttons will be thrown the following error message: "You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary."

To enable Collaborator Portal users to open, download, and/or view the files, a snapshot of the external file must be created in the Salesforce org so that a local version of the file is created and stored in Komodo Publications Planning.