Alert customer success when enterprise SSO goes live
The moment an enterprise customer switches on single sign-on, your account team hears about it in Slack and the milestone lands on their CRM record.
Run this workflow whenever WorkOS sends a connection.activated webhook event. That event is the signal that an enterprise customer has finished turning on single sign-on and the connection is ready to roll out, so treat every delivery as a go-live moment that my account team needs to hear about immediately.
Start from the webhook payload. Read the organization ID and the connection details off the event. WorkOS IDs are type-prefixed, so pass the full prefixed value (org_..., conn_...) everywhere it is used, never a trimmed version. Note the connection type, which tells us which identity provider the customer connected, for example Okta SAML, Microsoft Entra ID, or Google SAML. If the payload does not carry a readable provider name, call WorkOS Get a Connection with the connection ID to resolve it.
Call WorkOS Get an Organization with that organization ID to resolve the customer's display name and their associated domains. These domains are what I will match on in the CRM, so keep the full list rather than just the first one.
Then call WorkOS List Directories, filtered to the same organization, to check whether that customer has also set up directory sync (SCIM). If one or more active directories come back, directory sync is already in place. If none come back, single sign-on is live but directory sync is still outstanding, which means the customer is still adding and removing users by hand. Treat that as the useful follow-up signal, not a footnote.
Look the customer up in the CRM using HubSpot Search Companies, matching on the organization's domain. If the organization has several domains, try them in turn until a company matches. If more than one company comes back for a domain, pick the best match against the organization name and say in the Slack message that the match was ambiguous.
When a company matches, log the milestone with HubSpot Create Note associated to that company record. The note should state that single sign-on went live, the date it activated, which identity provider was connected, and whether directory sync is also configured or still outstanding. Write it so an account manager reading the record in six months understands what happened without any other context.
Finally, post to my customer success channel with Slack Bot Send a Message. Name the organization, state which identity provider they connected, and say clearly whether directory sync is done or still outstanding, so the CSM knows the exact next step to chase. When directory sync is missing, spell out that the customer is still managing users manually and that SCIM is the natural next conversation. Keep it to a short, scannable message rather than a wall of text.
If no HubSpot company matches any of the organization's domains, still post the Slack message. Say explicitly that the CRM match failed, list the domains that were tried, and include everything that was resolved from WorkOS so the go-live is still actionable. Never let a failed CRM lookup silently swallow the notification, and do not skip the Slack post just because the note could not be written.
What does this prompt do?
- Catches the moment an enterprise customer finishes turning on single sign-on, so the milestone reaches your account team instead of stopping with engineering.
- Works out who the customer actually is: their company name, their domains, and which identity provider they connected.
- Checks whether that same customer has also set up automated user provisioning, so you know whether manual user management is still in their way.
- Posts a go-live message to your customer success channel and records a note on the matching company in your CRM, flagging it clearly if no company matched.
What do I need to use this?
- A WorkOS account where your enterprise customers' single sign-on connections are set up
- A HubSpot login that can search companies and add notes to them
- A Slack workspace and the channel your customer success team actually watches
- Customer domains filled in on your HubSpot company records, so the lookup has something to match on
How can I customize it?
- Change which Slack channel receives the alert, or route different customer segments to different channels.
- Reword the go-live announcement and the note that gets saved to the customer record.
- Decide whether missing automated user provisioning reads as an upsell prompt or just a status line.
FAQs
How quickly does the alert arrive?
What happens if the customer isn't found in our CRM?
Will this work on HubSpot Free?
Does it tell us whether the customer still needs directory sync?
Will the message look like it came from a person?
Related templates
When someone leaves, we check which shared passwords they used in their final months and post a ranked rotation list to your security channel.
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.
Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.
Stop letting SSO go-lives stall in engineering.
Give your account team the full activation story, with the next step already spelled out, the moment it happens.