In today's digital landscape, the average business juggles a dozen or more SaaS applications. Your customer data lives in a CRM, payments are processed by Stripe, team communication happens in Slack, and your core application logic resides in a custom database. While each tool is powerful on its own, the real challenge—and opportunity—lies in making them work together.
Traditional automation tools often fall short. They rely on brittle UI integrations or offer limited, pre-built connectors that can't handle custom logic. This leaves you with data silos and manual processes that are slow, error-prone, and impossible to scale.
What if you could build an intelligent orchestration layer that sits on top of your entire tech stack? A system that speaks the native language of modern software: the API.
This is the promise of API-first automation, and it’s the core philosophy behind Workflows.do. In this post, we’ll explore how you can use Workflows.do to seamlessly integrate your existing tools and build powerful, AI-driven business processes that are as reliable as your production services.
API-first automation isn't just about having an API. It's a design approach where every part of the automation process—from triggering the workflow to executing each step—is built around direct API interactions.
Instead of trying to mimic human clicks in a user interface, you communicate directly with your services in a structured, reliable way. This code-centric approach offers several key advantages:
Workflows.do acts as the central hub for your business logic, connecting to your stack through two primary integration points: Triggers that start a workflow and Actions that execute tasks within it.
A workflow is a response to a business event. With Workflows.do, you can initiate a process from virtually anywhere:
Once a workflow is triggered, it can orchestrate actions across your entire tech stack. This is where the power of writing workflows as code becomes clear. In a .do file, you have direct access to api and db objects that you configure to talk to your services.
Let's look at the onUserSignup example to see this in action:
import { AI } from 'workflows.do'
export default AI({
onUserSignup: async ({ ai, api, db, event }) => {
const { name, email, company } = event
// 1. Call external APIs for data enrichment
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({ profile: socialProfiles.github }) : undefined
// 2. Use AI Agents to perform complex research
const companyProfile = await ai.researchCompany({ company })
const personalProfile = await ai.researchPersonalBackground({ name, enrichedContact })
// 3. Orchestrate actions with other services
const emailSequence = await ai.personalizeEmailSequence({ name, company, personalProfile, companyProfile })
await api.scheduleEmails({ to: email, sequence: emailSequence })
// 4. Update your internal systems
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, company, summary, url } })
},
})
In this single file, we've seamlessly integrated six different systems:
This isn't just a chain of API calls; it's an intelligent process. The workflow uses the data from one API (peopleDataLabs) to inform the next (github), then feeds all of that context to powerful AI Agents (ai.researchCompany) to perform tasks that would be impossible with traditional automation.
Connecting to multiple APIs introduces potential points of failure. What happens if a third-party service is temporarily down or your database connection flickers?
Workflows.do is architected for this reality. It provides a robust execution engine that abstracts away the complexity of building resilient systems:
The beauty of defining workflows in Typescript is that developers can build, test, and version business logic with the same rigor they apply to application code.
But the result isn't just for developers. Once a workflow like onUserSignup is deployed, it becomes a reusable service for the entire company. The sales team can trigger a lead enrichment workflow from their CRM, or the marketing team can kick off a personalization process, all without ever seeing a line of code. It's 'Services-as-Software'—turning complex, coded logic into simple, accessible tools.
Ready to stop wrestling with brittle integrations and start building an intelligent, unified tech stack?