In the world of workflow automation, complexity is the enemy of reliability. Scripts break midway, APIs fail unexpectedly, and systems are left in confusing, inconsistent states. How do you build sophisticated automations that are also robust and predictable? The answer lies in breaking down complex processes into their smallest, most reliable components: atomic actions.
Welcome to action.do, the execution engine on the .do platform designed to power your agentic workflows. With action.do, you can define single, indivisible tasks to build complex automations and deliver services with unparalleled precision and reliability.
BUILDING BLOCKS FOR AUTOMATION
Think of an atomic action as the fundamental building block of any automated process. It's a single, all-or-nothing operation that either completes successfully or fails entirely, leaving no trace of a partial execution.
Consider a simple business task: sending a welcome email to a new user. This is a perfect candidate for an atomic action.
This atomicity is the cornerstone of reliable workflow automation. It eliminates ambiguity and ensures that your business processes, no matter how complex, are built on a foundation of predictable, trustworthy units.
The .do platform makes it incredibly simple to invoke these powerful building blocks. Using our API or language-specific SDKs, you can trigger any predefined action by its unique name and pass in the required parameters. This approach turns complex operations into a single, clean API call.
Here’s how you would execute a send-welcome-email action using our TypeScript SDK:
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');
In this example:
While an atomic action (action.do) is a single operation, a service (service.do) is a complete business capability composed of one or more actions orchestrated into a workflow.
Actions are the Lego bricks; services are the final creation.
For example, a new-user-onboarding service might be composed of several atomic actions orchestrated in sequence:
By combining these granular, reliable actions, you can construct powerful and resilient agentic workflows that represent complete business outcomes.
The .do platform empowers you to practice Business-as-Code. By encapsulating your business logic, external API integration points, and scripts into reusable, versioned, and callable actions, you treat your operations with the same rigor as your software.
You can define your own custom actions, turning any piece of your business into a standardized, automatable component. This modular approach not only increases reliability but also accelerates development, promotes reusability, and makes your entire system easier to understand, maintain, and scale.
Q: What is an 'atomic action' in the context of .do?
A: 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.
Q: How do actions differ from services?
A: 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.
Q: Can I create my own custom actions?
A: 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.
Q: How are actions invoked?
A: 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.
Q: What happens when an action fails?
A: 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.
Ready to build more resilient and scalable automations? Start defining your business with atomic actions. Discover the power of action.do and transform your workflows today.