Build an Automation
Hello World to the terminal when it runs.An automation runs your integration logic without an external request, on demand or on a schedule. Automations are ideal for data synchronization, report generation, and routine maintenance jobs. This quick start shows the full cycle: add an automation artifact, build the logic in the visual designer, run it, and review the scheduling options for production.
Prerequisites
A working WSO2 Integrator environment.
Step 1: Create the integration
-
On the project home page, click Create on Cloud.

-
The WSO2 Integrator cloud editor opens in your browser. Add an artifact to your integration, then deploy it to WSO2 Cloud from the Deploy to WSO2 Cloud panel on the right.

Step 2: Add an automation artifact
- Select your integration from the project overview canvas.
- Select + Add Artifact in the design canvas.
- Select Automation under Automation.
- Select Create.


Step 3: Add logic
- Select + after the Start node to open the node panel.
- Select Call Function.
- Select Print under io from the function list.
- Select Initialize Array for the Values parameter.
- Set Values to
"Hello World"and select Save.


Step 4: Run and test
- Select Run.
- Confirm the terminal output contains
Hello World.


Step 5: Deploy to WSO2 Cloud
Deploy your integration to WSO2 Cloud. Check Save and deploy.
Source code
View the generated Ballerina code
The steps above generate the following complete, runnable Ballerina program:
import ballerina/io;
import ballerina/log;
public function main() returns error? {
do {
io:print("Hello World");
} on fail error e {
log:printError("Error occurred", 'error = e);
return e;
}
}
Scheduling automations
Periodic invocation is configured in an external system once the automation is deployed. Available options include:
- Cron job: schedule the automation from a
cronentry on a Unix or Linux host. - Kubernetes: define a
CronJobresource to run the automation on a recurring schedule. - VM: use a host scheduler such as Windows Task Scheduler or
systemdtimers. - WSO2 Integration Platform: configure the schedule in the WSO2 Integration Platform when the integration is pushed to the cloud.