Sync Salesforce contracts to Google Drive folders
Recipe ToolsCRMMarketingDocument/File
What it does
When a specified interval triggers, this automation searches Salesforce for contracts. It creates matching folders in Google Drive and syncs attachments from each contract to keep files organized.
Who it's for
Legal teams who need to organize Salesforce contracts in Google Drive without manual file management.
How teams use this
Organize contracts by folder weekly
Run the automation every week to search Salesforce for new contracts and create matching folders in Google Drive. Attachments sync automatically so the team always has current files.
Sync contracts to a shared team drive
Point the automation to a shared Google Drive folder instead of individual drives so the entire legal team can access organized contracts. The search and sync logic stays the same.
Filter contracts by status before syncing
Add a condition to the SOQL query WHERE clause so only contracts with a specific status, such as executed or pending, are synced to Google Drive. This keeps the folders focused on active records.
Include related documents from Salesforce
Extend the search to include content documents linked to contracts so all related files, not just attachments, are synced to Google Drive. Set the automation to check for both object types.
How it works
- Trigger on a specified interval. The automation runs on a schedule you set, such as daily or weekly, to keep Salesforce contracts and Google Drive folders in sync.
- Search for contracts in Salesforce. Search Salesforce for contracts using a SOQL query with a WHERE clause so only matching records are processed in the next steps.
- Create or find folders. For each contract, search Google Drive for a matching folder. If none exists, create a new folder and store its ID for the next step.
- Search for attachments in Salesforce. Search Salesforce for attachments linked to each contract so they can be synced to the corresponding Google Drive folder.
- Sync attachments to Google Drive. For each attachment found, upload it to the matching Google Drive folder so all contract files are organized and accessible.