If you're a developer, you've been there. You need to connect a new user signup to your CRM, trigger a Slack notification when an invoice is paid, and enrich a user profile with data from a third-party API. You find yourself writing script after script of what can only be described as "glue code"—brittle, repetitive, and often poorly documented code whose only job is to shuffle data between different systems.
This glue code is the unseen technical debt of modern business automation. It's hard to test, a nightmare to debug, and impossible to reuse. A minor change in one service's API can cause a cascade of failures across your entire system.
What if you could stop writing glue code? What if you could encapsulate every third-party integration and every piece of business logic into a standardized, reusable, and observable building block?
This is the promise of action.do. It's time to transform your messy integration scripts into a library of atomic, composable assets.
The concept of connecting services via APIs is powerful, but the implementation is often messy. This "glue code" approach suffers from several critical flaws:
This is not a scalable foundation for automation. It’s building your business logic on a foundation of sand.
action.do introduces the concept of the atomic action. Think of it as the smallest, indivisible unit of work in your entire business. It's a self-contained, reusable function that performs a single, specific task and does it well.
Instead of a monolithic script that does ten things, you create ten distinct actions. This is the foundation of reliable Business-as-Code.
Let's look at a common task: enriching a new user's profile with data from a service like Clearbit and then updating your internal database.
The old way is a script. The new way is to define an action.do:
import { Do } from '@do-platform/sdk';
// Initialize the .do client with your API key
const-do = new Do(process.env.DO_API_KEY);
// Define a new atomic action to enrich user data
const enrichUserAction = await-do.action.create({
name: 'enrich-user-profile',
description: 'Fetches user data from Clearbit and updates the DB.',
inputs: {
email: 'string',
},
handler: async (inputs) => {
const userData = await clearbit.lookup(inputs.email);
const dbResult = await db.users.update({ email: inputs.email, data: userData });
return { success: true, userId: dbResult.id };
}
});
console.log('Action created:', enrichUserAction.id);
Let's break down why this is a game-changer:
This might sound like a serverless function (e.g., AWS Lambda, Google Cloud Functions), but an action.do is a higher-level abstraction designed specifically for building agentic workflows.
While a serverless function gives you a place to run code, an action.do is a fully managed, versioned, and observable business capability. You don't have to worry about infrastructure, IAM roles, or setting up a separate logging stack. The .do platform provides built-in input validation, security, and versioning, abstracting away the boilerplate so you can focus purely on the business logic of your task. It embodies the principle of Services-as-Software.
A crucial design principle of the .do platform is that actions are atomic and do not call other actions.
This might seem limiting, but it's a feature that enforces a clean separation of concerns. An action is responsible for a single task. The job of orchestrating a sequence of actions belongs to an agentic workflow.
For example, a "New User Onboarding" workflow would orchestrate several atomic actions in a sequence:
This model makes your business processes incredibly clear and robust. The workflow defines the what—the sequence of business steps. The actions define the how—the specific, encapsulated implementation of each step. If the send-welcome-email step fails, you know exactly which action to investigate, without affecting the other parts of the workflow.
Stop drowning in glue code. By reframing your third-party integrations and internal tasks as a collection of atomic actions, you build a system that is more reliable, easier to maintain, and infinitely more scalable.
action.do gives you the fundamental building blocks to define, execute, and repeat any unit of work, laying a robust foundation for powerful and intelligent business automation.