Salesforce → Google Drive Action Agent (Pattern Demo)
When CRM records change (Lead → Opportunity), use AI to decide what should happen in Google Drive—create/update files, structure workspaces, and keep teams aligned.
Video
End-to-end view of how the workflow behaves in practice.
GitHub
Enter your email to unlock the repo link — we'll log access for our records.
How pieces connect
CRM events flow through policy-guarded orchestration into Google Drive, with audited write-back to Salesforce.
Salesforce
Flows, platform events, or webhooks signal record lifecycle changes.
Orchestration
Python service fetches context, enforces guardrails, and plans idempotent actions.
LLM + tools
Constrained action menu for Drive ops under policy validation.
Google Drive
Folders, Docs, Sheets, templates, sharing, and link outputs.
Write-back & notify
URLs and status to Salesforce; optional Slack or email announcements.
What it helps with
CRM data changes constantly, but most teams still do the follow-up work manually: create folders, copy templates, update docs, share the right links, and keep everything organized. The exact Drive structure varies by organization, but the pattern is the same: CRM events should trigger consistent, policy-driven actions in Drive.
Behaviors
- Watches Salesforce for meaningful lifecycle events (Lead conversion, stage changes, owner changes, close date changes, product updates)
- Uses AI + rules to decide which Google Drive actions to take based on your playbooks and guardrails
- Creates and/or updates Drive assets: folder structures, Docs, Sheets, and shared links
- Copies templates and fills them with Salesforce fields, plus AI-generated summaries, risks, and next-step checklists (with human review where needed)
- Keeps Drive content current as the Opportunity evolves (e.g., update a proposal doc, append meeting notes, update an estimate sheet)
- Applies permissions and sharing policies based on Salesforce roles/teams and optional client-sharing constraints
- Writes Drive links and status back to Salesforce so the CRM stays the source of truth
How it works
- 01Salesforce emits an event (Flow/Apex + Platform Event/Webhook) with the record ID and a snapshot of key fields
- 02An orchestration service fetches full context (Opportunity/Account/Contacts/Products) and runs an LLM with tool access under strict guardrails
- 03AI selects an action plan from a constrained menu (create folder, copy template, update doc, update sheet row, change sharing, post a link), and validates it against policy
- 04The service executes Drive operations idempotently (dedupe, retries, and safe updates) and logs every action for auditability
- 05Outputs are written back into Salesforce (Drive URL fields, activity/chatter notes, status flags) and optionally announced in Slack/email
- 06Teams can override/approve sensitive actions while routine actions run automatically
Want this for your team?
We adapt triggers, approvals, and integrations to your environment — then ship for production discipline, not demos.
Something similar in your stack?
Tell us what systems and policies matter—we'll map a pragmatic path to a pilot.