Using Drive Connect Automation with Salesforce flows

The Drive Connect app comes packaged with the Automate Drive flow action, which can be added to Record-Triggered flows to perform operations when records are created or updated. Schedule-Triggered flows with object conditions configured can also use this flow action to perform operations on a batch of records.

In order to enable Drive Connect Automation, ensure the Marketplace App is installed and the Automated Process User is configured. For detailed steps, see the Setup and configure Drive Connect Automation article.

Create Automate Drive actions using Salesforce Flows

Note: For information on how Salesforce Flows work, we suggest first reading Salesforce documentation on Automating Your Business Processes.

  1. Navigate to Setup > Process Automation > Flows.
    Navigate to SetupSelect Flows
  2. From the Flows page, click New Flow.
    New Flow
  3. Select Record-Triggered Flow (or Schedule-Triggered Flow) and click Next.
    Record-Triggered Flow
  4. You will be prompted to set up your starting node's criteria on how the flow will be initiated as well as configure the Salesforce object the action will take place on. You can go back to this screen by editing the Start node of the flow.
    5.1_Start-element

  5. From the Elements list from the left pane, drag and drop Action onto the canvas builder area to the right. This will auto-display the New Action modal.
    Add action
  6. In the Action field, search and select Automate Drive (apex-driveconnect__automateDrive).
    Search Automate Drive

    • If you are not logged into your Google Workspace, you will see a prompt to sign in. Click Sign In and walk-through the Google authentication flow to continue.
      Automation auth
  7. Fill out the required fields for Label and API Name, then select the Operation picklist.
    Add operation

Adding Sibling Operations

Drive Connect Automation supports adding multiple sibling operations. These operations are considered same level operations to any existing operation in your flow. You can add a sibling operation by selecting the Add Drive Operation button for parent level operations (or select Add Child Operation for same level child operations).

Add sibling operation

Note: If adding multiple sibling operations, the automation will run sequentially in the order they are created/listed in the Drive Operations builder.

Note: Operations defined in the Automate Drive action are subject to Google API usage limits. When using the action for Schedule-Triggered flows, we recommend configuring your filter conditions to limit batch sizes to 100 records or less in order to avoid failures for actions that include multiple operations.

Save and Activate Your Flow

Before you can trigger your newly created flow, you must ensure the flow is saved and activated by completing the following steps below:

  1. Ensure all elements are connected. Select the node at the bottom of the Start element and drag the node to your Action element.
    Connect action
  2. Click Save.
    Save flow
  3. Enter the required fields for Flow Label and Flow API Name, and click Save.
    Save flow details
  4. Click Activate.
    Activate flow
  5. For a Record-Triggered Flow, go back to your Salesforce object/record and trigger your flow. Once triggered you can see the component display a state where automation is in progress.
    Automation spinner

Note: The Automate Drive action performs operations asynchronously. A retry mechanism is built into the action to support multiple concurrent operations on the same record. If a failure occurs, Queueable Apex calls a Future Method to wait and retry the operations for a maximum of five times before they are deemed unsuccessful and terminated.