Add pre-built pre-meeting brief and CRM update automations
Summary
Context: GPUI automations only ran after meetings ended or summaries finished (note_enhanced / meeting_completed), and api-crm only exposed contact search without deal/note context or note writeback. Held as draft until the 1.4.36 bridge and GPUI 2.0.0 release train lands on main (targeted for 2.0.1).
Intention: Add pre-built GPUI automations and CRM API endpoints to generate pre-meeting briefs before calls begin and log post-meeting summaries and action items back to matched CRM contacts and deals.
Direction:
- Added
POST /crm/contact-contextandPOST /crm/log-noteacross HubSpot, Attio, Salesforce, Pipedrive, and Close incrates/api-crm, mapping provider auth failures to424 reconnect_requiredviaNangoConnectionState::mark_reconnect_requiredand regeneratingapps/api/openapi.gen.jsonandpackages/api-client. - Added the
BeforeMeetingtrigger,PreMeetingBrief/CrmUpdatestarter automations and workflow steps in GPUI (apps/desktop-gpui/src/workspace/automations), CRM context enrichment & safe empty-memo brief saving (open_note/brief.rs), and theBriefScheduler/brief_tickloop (meeting/schedule/brief_schedule.rs,application/meeting_schedule.rs). - Operational notes: CRM writeback (
POST /crm/log-note) requires CRM write scopes enabled in Nango Dashboard for HubSpot, Attio, Salesforce, and Pipedrive (read-only connections return424 reconnect_requiredand surface a reconnect prompt).closeis implemented end-to-end inapi-crmand GPUI, but is not yet configured as a Nango integration in production.
Demo
N/A: verified via Rust unit and local runtime/wiremock integration tests; held as draft pending GPUI 2.0.0 release cutover.
Verification
cargo test --locked -p api-crm -p api-nango -p api-calendar: passed (api-calendar1/1,api-crm19/19,api-nango29/29)cargo clippy --locked -p api-crm --all-targets --no-deps -- -D warnings: passedcargo test --locked -p api gen_openapi_jsonandpnpm -F @anlg/api-client typecheck: passedapps/desktop-gpui:cargo clippy --locked --workspace --all-targets --no-deps -- -D warningspassed;cargo fmt --checkanddprint checkpassed; lib tests passed (automations6/6,brief11/11,crm_update1/1,brief_schedule2/2,persistence_tests::automation1/1 — linked locally on Xcode 27 / Swift 6.4 using-L nativeflags pointing attarget/debug/build/*/out/swift-rs/*/out/Products/Debug)ci.yamlscripts:test_check_license_boundary.py(9 tests OK),check_license_boundary.py, changelog/version checks passed;node --testpassed 101/103 with 2 macOS host-only failures (spawnSync pwsh ENOENT) inscripts/desktop-release-provenance.test.mjs
Summary by cubic
Adds two pre-built GPUI automations — a pre-meeting brief generated before calls begin and a post-meeting CRM update — so meeting summaries and action items can be written back to matched CRM contacts and deals. Previously automations only ran on note_enhanced or meeting_completed events.
api-crm gains POST /crm/contact-context and POST /crm/log-note for HubSpot, Attio, Salesforce, Pipedrive, and Close, with the OpenAPI spec and API client regenerated. GPUI adds the BeforeMeeting trigger, starter workflows, CRM context enrichment for briefs, and a scheduler that prepares briefs before upcoming meetings. Provider auth failures now map to 424 reconnect_required and mark the connection for reconnection.
Operational notes
- Logging notes back requires CRM write scopes in the Nango Dashboard for HubSpot, Attio, Salesforce, and Pipedrive; read-only connections receive a reconnect prompt.
- Close is implemented end-to-end but is not yet configured as a Nango integration in production.