Workflows as Code

Reliable Business Process Execution

Automate, streamline, and execute complex business logic as reliable, agentic workflows. Define your business processes once as code and let our platform handle the rest.

Join waitlist

workflows.do

import { AI } from 'workflows.do'

export default AI({
  onUserSignup: async ({ ai, api, db, event }) => {
    const { name, email, company } = event

    // Enrich contact details from 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

    // Use AI agents to perform deep research
    const companyProfile = await ai.researchCompany({ company })
    const personalProfile = await ai.researchPersonalBackground({ name, email, enrichedContact })
    const socialActivity = await ai.researchSocialActivity({ name, email, socialProfiles })
    const githubActivity = githubProfile ? await ai.summarizeGithubActivity({ githubProfile }) : undefined

    // Schedule a highly personalized email sequence to optimize onboarding
    const emailSequence = await ai.personalizeEmailSequence({ name, company, personalProfile, socialActivity, companyProfile, githubActivity })
    await api.scheduleEmails({ email, emailSequence })

    // 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', ...details })
    const { url } = await db.users.create({ name, email, company, summary, ...details })
    await api.slack.postMessage({ channel: '#signups', content: { name, email, company, summary, url } })
  },
})

Deliver economically valuable work

Frequently Asked Questions

Do Work. With AI.