User onboarding is one of the most critical processes for any SaaS business. A great first impression can lead to a loyal, engaged customer, while a generic or clumsy experience can send them running to a competitor. The challenge? Creating a consistently high-touch, personalized experience at scale is incredibly difficult and often requires significant manual effort from sales and success teams.
What if you could automate that entire process? Not just a "Welcome!" email, but a deep, intelligent, and personalized onboarding journey for every single user.
That's exactly what we did. In this case study, we'll pull back the curtain and show you how we used Workflows.do to transform our standard user signup process into a powerful, AI-driven agent that researches new users, personalizes outreach, and equips our team with actionable insights—all as a single, observable, and reliable piece of code.
Traditional user onboarding is often a series of disconnected, shallow actions:
This is automation, but it isn't intelligence. It leaves a massive amount of value on the table. Our team members would still need to manually research the new user, look them up on LinkedIn, find their company's website, and try to piece together a profile before engaging. This process is slow, inconsistent, and simply doesn't scale.
We wanted a system that could automatically answer crucial questions for every signup:
This is where the "Business-as-Code" philosophy of Workflows.do shines. Instead of wrestling with brittle visual builders and stringing together a dozen different services, we defined our entire intelligent onboarding process as a single, version-controlled TypeScript file.
This approach gives us unparalleled power and reliability. Our business logic lives alongside the rest of our application code, enabling testing, collaboration, and seamless deployment.
Let's break down the exact code that powers our user onboarding. The entire process is handled by one event-driven workflow, onUserSignup, which kicks off the moment a new user finishes the registration process.
import { AI } from 'workflows.do'
export default AI({
onUserSignup: async ({ ai, api, db, event }) => {
const { name, email, company } = event
// 1. Enrich contact details with external data sources
const enrichedContact = await api.apollo.search({ name, email, company })
const socialProfiles = await api.peopleDataLabs.findSocialProfiles({ name, email, company })
const githubProfile = socialProfiles.github ? await api.github.profile({ name, email, company, profile: socialProfiles.github }) : undefined
// 2. Using enriched details, research the company and personal background with AI
const companyProfile = await ai.researchCompany({ company })
const personalProfile = await ai.researchPersonalBackground({ name, email, enrichedContact })
const socialActivity = await ai.researchSocialActivity({ name, email, enrichedContact, socialProfiles })
const githubActivity = githubProfile ? await ai.summarizeGithubActivity({ name, email, enrichedContact, githubProfile }) : undefined
// 3. Schedule a highly personalized email sequence to optimize onboarding
const emailSequence = await ai.personalizeEmailSequence({ name, email, company, personalProfile, socialActivity, companyProfile, githubActivity })
await api.scheduleEmails({ emailSequence })
// 4. Summarize everything, save to the database, and post to Slack
const details = { enrichedContact, socialProfiles, githubProfile, companyProfile, personalProfile, socialActivity, githubActivity, emailSequence }
const summary = await ai.summarizeContent({ length: '3 sentences', name, email, company, ...details })
const { url } = await db.users.create({ name, email, company, summary, ...details })
await api.slack.postMessage({ channel: '#signups', content: { name, email, company, summary, url } })
},
})
Let's unpack what's happening step-by-step.
The moment the workflow receives the onUserSignup event, it doesn't just accept the basic name, email, and company. It immediately begins enriching this data using pre-configured API connectors.
With Workflows.do, connecting to any third-party API is simple, turning complex data aggregation into a few lines of code.
This is where the magic happens. We pass the enriched data to a series of AI agents to perform tasks that would normally take a human researcher significant time.
This is the core of agentic workflows. The system isn't just executing commands; it's performing intelligent research to build a comprehensive user profile.
With a deep understanding of the user, the workflow now takes meaningful action.
To close the loop, the workflow ensures all this valuable information is stored and communicated to our team.
Building this workflow with Workflows.do provides benefits that are impossible to achieve with traditional automation platforms.
Are you ready to stop just automating tasks and start building intelligent, autonomous business processes?
Learn more about Workflows.do and turn your most complex operations into simple, reliable services.