In the world of workflow automation, we often think in big, sweeping processes. A "New User Onboarding" flow. A "Monthly Invoicing" cycle. While this top-down view is useful for planning, it often leads to building rigid, monolithic automations that are brittle, difficult to update, and a nightmare to debug.
What if we flipped the model? What if, instead of building one giant, interconnected machine, we created a collection of small, single-purpose tools that could be combined in infinite ways?
This is the paradigm shift behind atomic actions—a more powerful, flexible, and developer-friendly approach to automation. At action.do, we believe this is the future of building complex services, and it starts with a single, perfectly defined task.
Let's break it down. An atomic action is the smallest, indivisible unit of work in a business process. Think of it not as the entire assembly line, but as a single, highly specialized robotic arm on that line.
It's a discrete, self-contained task designed to do one thing and do it well.
Each action is like a function in your code: it accepts specific inputs and is expected to produce a predictable output. A workflow, then, is simply the orchestration of these actions—chaining them together to model a complete business process. The workflow tells the robotic arms what to do and in what order.
Traditional automation platforms often encourage you to build large, sprawling workflows where the logic for each step is deeply embedded within the whole. This approach quickly runs into problems:
By focusing on atomic actions, action.do gives developers and teams a robust framework for building scalable and maintainable automations. This is the core of creating modern Services-as-Software. Here’s why this API-first approach is so powerful.
Once you define an action like send-welcome-email, you can use it anywhere. Trigger it when a user signs up. Re-use it in a "Welcome Back" campaign for returning users. Plug it into a marketing automation sequence. You build it once and reuse it everywhere, saving countless development hours.
Each action is a self-contained unit that can be developed and tested in isolation. This brings the power of unit testing to your business processes. With action.do, defining an action is as simple as writing a function.
Check out how easy it is to define and execute an action using the SDK:
import { Do } from '@do-inc/sdk';
// Initialize the platform client
const platform = new Do({ apiKey: 'YOUR_API_KEY' });
// Define a simple, atomic action: send an email
const sendWelcomeEmail = platform.action('send-welcome-email', {
description: 'Sends a welcome email to a new user.',
handler: async (inputs: { email: string, name: string }) => {
// Business logic for the action would go here
console.log(`Sending welcome email to ${inputs.name} at ${inputs.email}`);
return { success: true, messageId: 'xyz-123' };
},
});
// Execute the action via the SDK
const result = await sendWelcomeEmail.run({
email: 'alex@example.com',
name: 'Alex',
});
console.log(result);
You can test the sendWelcomeEmail action independently to ensure it works perfectly before ever plugging it into a larger, more complex workflow.
Need to update your email service provider or change an email template? With atomic actions, you update the send-welcome-email handler in one place. Every workflow that uses this action is instantly and safely updated. If an action fails, you know precisely which component is broken, enabling you to fix it quickly without impacting other unrelated services.
When you have a library of reliable, single-purpose actions, you can begin to build truly dynamic and intelligent systems. This is the foundation for agentic workflows, where different "agents" (your atomic actions) can be combined, orchestrated, and even chosen dynamically by a higher-level process to accomplish a goal. This modularity allows you to build far more complex and adaptive services than a rigid, pre-defined flowchart ever could.
Moving from monolithic processes to atomic actions isn't just a different way to automate—it's a fundamentally better way to build. It’s about creating systems that are as resilient, flexible, and scalable as the code they're built on.
Ready to move beyond traditional automation? Start building with action.do and discover the power of executing atomic actions.
What is an 'atomic action' in the context of .do?
An atomic action is the smallest, indivisible unit of work in a business process. Think of it as a single, self-contained task like 'send an invoice,' 'update a CRM record,' or 'verify user identity.' These actions are the fundamental building blocks for creating services on the .do platform.
How is an action.do different from a full workflow?
An action.do represents a single step, while a workflow orchestrates multiple actions in a sequence or based on specific logic. You compose workflows by connecting various action.do agents together to model a complete business process and deliver a Service-as-Software.
Can actions accept inputs and produce outputs?
Yes. Every action is designed like a function. It accepts a structured set of inputs (e.g., customer details, order ID) and returns a structured output (e.g., a confirmation status, a user ID). This makes them predictable, reliable, and easy to integrate into larger systems.
What kind of tasks are suitable for an action.do?
Any discrete business task is a perfect candidate. Examples include sending notifications (email, SMS), performing a calculation, querying a database, calling an external API, or updating a record in a system of record. If you can define it as a single, repeatable function, you can build it as an action.do.