In the push for digital transformation, automation is king. Businesses are constantly seeking ways to streamline operations, reduce manual effort, and deliver services faster. Yet, building robust, reliable automation can be complex and fragile. A single failure in a multi-step process can leave systems in an inconsistent state, causing headaches for developers and customers alike.
Enter the low-code movement, a paradigm shift that empowers more people to build applications and workflows with minimal traditional coding. But how do we merge the accessibility of low-code with the rock-solid reliability required for mission-critical business processes?
The answer lies in a powerful, foundational concept: atomic actions. These are the fundamental building blocks for modern automation, and with action.do, they become the bridge that makes powerful, agentic workflows accessible to everyone.
BUILDING BLOCKS FOR AUTOMATION
Imagine building a complex structure with LEGO® bricks. Each brick is a single, complete, and reliable unit. You don't worry about a brick falling apart halfway through connecting it. An atomic action is the digital equivalent of that LEGO brick.
In the context of the .do platform, an atomic action is the smallest, indivisible unit of work within a workflow. It represents a single task—like sending an email, updating a database record, or calling an external API—that has only two possible outcomes:
There is no in-between. This "all-or-nothing" principle is called atomicity, and it's what eliminates the risk of partial updates and inconsistent data, bringing precision and reliability to your workflows. This approach is a core tenet of Business-as-Code, where your business logic is encapsulated into versioned, testable, and reusable components.
Low-code platforms excel at creating user interfaces and simple business logic. Where they often struggle is in orchestrating complex backend processes and integrating securely with third-party systems. This is typically where a professional developer has to step in to write custom, often brittle, API integration code.
Atomic actions change the game by creating a perfect synergy between technical and non-technical teams:
This division of labor makes workflow automation both accessible and safe. It empowers the people closest to the business problem to build their own solutions while ensuring that the underlying operations are secure, reliable, and governed by engineering best practices.
Invoking an atomic action is designed to be incredibly simple. Using the .do API or our SDKs, you can execute a powerful, multi-step backend process with just a few lines of code.
Consider this example of executing a send-welcome-email action:
import { Do } from '@do-platform/sdk';
// Initialize the .do client with your API key
const client = new Do({ apiKey: 'YOUR_API_KEY' });
// Execute a predefined atomic action by name
async function sendWelcomeEmail(userId: string) {
try {
const result = await client.action.execute({
name: 'send-welcome-email',
params: {
recipientId: userId,
template: 'new-user-welcome-v1'
}
});
console.log('Action Executed Successfully:', result.id);
return result;
} catch (error) {
console.error('Action Failed:', error);
}
}
// Run the action for a new user
sendWelcomeEmail('user_12345abc');
The beauty of this code is what it doesn't show. We don't see any SMTP configuration, email templating logic, or API calls to a mail service provider. All of that complexity is neatly encapsulated within the send-welcome-email action, making it a reusable and reliable asset for any application or workflow.
If an action.do is a single brick, a service.do is the fully assembled house.
For example, a "New Customer Onboarding" service could be a workflow that chains together several atomic actions:
By building complex services from simple, reliable atomic actions, you create robust systems that are easy to understand, modify, and scale.
Ready to build your automations on a foundation of unbreakable blocks? Explore action.do and start turning your business processes into reliable, API-callable assets today.
What is an 'atomic action' in the context of .do?
An atomic action is the smallest, indivisible unit of work within a workflow. It represents a single, specific task—like sending an email or updating a database record—that either completes successfully or fails entirely, ensuring system reliability and preventing partial states.
How do actions differ from services?
An action (action.do) is a single, granular operation. A service (service.do) is a higher-level business capability composed of one or more actions orchestrated into a workflow. Actions are the building blocks; services are the valuable outcomes.
Can I create my own custom actions?
Yes. The .do platform empowers you to define your own custom actions using Business-as-Code. You can encapsulate any business logic, external API call, or script into a reusable, versioned, and callable action for your agentic workflows.
How are actions invoked?
Actions are invoked programmatically through the .do API or our language-specific SDKs. You simply call the action by its unique name and provide the necessary parameters, allowing for seamless integration into any application or system.
What happens when an action fails?
Because actions are atomic, a failure is handled cleanly without leaving your system in an inconsistent state. The platform provides detailed error logging and allows you to configure automated retries, notifications, or alternative compensatory actions.