About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Tutorial
Build a scheduled agentic workflow for daily notifications
A practical example of building, importing, and scheduling an agentic workflow that automatically sends daily email notifications using watsonx Orchestrate
In an agentic AI system, multiple agents work on their own for managing tasks such as collecting data, making decisions, communicating, and taking actions. But some actions need to happen at the right time, not immediately. Many business processes depend on timing such as running something after a delay, at a specific time, or on a regular schedule. For example:
- Set the Data Backup Agent to run daily at 11:30 PM
- Run this monitoring tool every hour for the next 24 hours
These instructions create the foundation for scheduled agentic workflows. Scheduling agent actions keeps each workflow running smoothly and ensures tasks occur on time. This scheduling capability shifts an agentic system from reactive automation to proactive orchestration, where each agent can think, act, plan, and time its actions in a smart way.
In this tutorial, learn how to:
- Build an automated Daily Quote Scheduler by using IBM watsonx Orchestrate Agent Development Kit (ADK).
- Create reusable tools and combine them into agentic workflows that send a motivational quote to your inbox every morning without writing any cron jobs.
- Use enterprise email servers such as Gmail for email delivery.
- Schedule and monitor the automation in the watsonx Orchestrate user interface (UI), bringing AI orchestration, scheduling, and practical task execution into one place.
Architecture of daily quote scheduler

The architecture shows how a user can schedule events through conversational chat with AI agents.
- The user types “Schedule a daily quote email every day at 7 AM IST” in the web chat. This input triggers the orchestration flow.
- The request is routed to the Daily Quote Agent, which analyzes the request and selects the Send email Tool Flow as the next required action.
- The tool flow is a scheduled event or flow in watsonx Orchestrate. It runs at 7 AM IST every day. The custom email tool in the flow sends an email to the specified recipients.
- This setup is an example of an asynchronous process, useful when a task must run at a specific time, either one time or on a recurring schedule.
Prerequisites
- A local environment running the watsonx Agent Development Kit (ADK) version 1.15 or later. This tutorial was tested with ADK version 1.15.
- Python 3.11 or later. This tutorial was tested with Python 3.13.
- An active watsonx Orchestrate instance. You can create a free trial instance of watsonx Orchestrate SaaS on:
- An IDE such as Visual Studio Code.
- A mail account with an app password enabled. In this tutorial, you will use Gmail. You can also use SendGrid, Outlook, or IBM SMTP by updating your email tool credentials.
Steps
- Configure SMTP connections in watsonx Orchestrate
- Create the tools in watsonx Orchestrate ADK
- Build an agentic workflow to connect the tools
- Create the agents in watsonx Orchestrate
- Import the tools and the agentic workflow into watsonx Orchestrate
- Verify the agents in the watsonx Orchestrate UI
- Schedule the agentic flow in the watsonx Orchestrate UI
- Test the agent execution and verify the email output
Step 1. Configure SMTP connections in watsonx Orchestrate
Set up your Gmail account and create an SMTP connection that is required for the custom email tool.
To send email securely, you need the following values:
- GMAIL_USER: your Gmail address
GMAIL_APP_PASSWORD: an app-specific password generated in your google account. To get the GMAIL_APP_PASSWORD, complete the following steps:
- Open your google Account.
- Select Security & sign in.
- Under How you sign in to google, turn on 2-Step Verification.
- Open App Passwords).
- Create a new app password (for example, Watson Orchestrate).
- Copy the generated 16-character password. This is your GMAIL_APP_PASSWORD.
You will use GMAIL_USER and GMAIL_APP_PASSWORD in the next steps to configure the SMTP connection in watsonx Orchestrate.
Create the Gmail connection.
- Download the i-oic-wxo-scheduler-agent GitHub project.
- Open the project in VS Code.
- Locate the file connections/gmail_connection.yaml.
Run the following command from the connections folder.
## Import the Connection orchestrate connections import -f gmail_connection.yaml
To set the credentials for draft and live environments, update the following command with your GMAIL_USER and GMAIL_APP_PASSWORD values and then run the command.
### Draft environment orchestrate connections set-credentials \ --app-id gmail_connection \ --env draft \ -e 'GMAIL_USER=<your-email@gmail.com>' \ -e 'GMAIL_APP_PASSWORD=<your-app-password>'### Live environment orchestrate connections set-credentials \ --app-id gmail_connection \ --env live \ -e 'GMAIL_USER=<your-email@gmail.com>' \ -e 'GMAIL_APP_PASSWORD=<your-app-password>'Validate the connection setup in watsonx Orchestrate ADK.
## Verify the Connection orchestrate connections list
Step 2. Create the tools in watsonx Orchestrate ADK
Create the custom send_gmail_notification tool. This Python tool sends emails through Gmail using a secure SMTP connection. It enables automated email delivery from watsonx Orchestrate.
Open the agents folder in VS Code and locate the file send_mail_gmail.py.

Import this tool into watsonx Orchestrate using the watsonx Orchestrate ADK command line interface (CLI).
# Import the send_email_notification tool orchestrate tools import -k python -f send_gmail_tool.py --app-id gmail_connection
Create the quote generator tool. This Python tool returns a random motivational quote.
In the same working directory within VS Code, locate the file get_quote_min.py.

Import this tool into watsonx Orchestrate using the watsonx Orchestrate ADK CLI.
# Import the quote generator tool orchestrate tools import -k python -f get_quote_min.py
A confirmation message is displayed after the tool is successfully imported.
Step 3. Build an agentic workflow to connect the tools
Create an agentic workflow that links the quote generator tool and the email notification tool. This workflow calls the get_quote_min tool to fetch a quote and then sends that output to the email_test_agent agent for notification delivery.
In the same working directory within VS Code, locate the predefined workflow tools/daily_quote_flow_min.py file.

The workflow defines a schedulable flow named daily_quote_flow_min. It first runs the get_quote_min tool, then passes the result to an AgentNode called
notify_user_via_agent, which sends the quote by using the email_test_agent agent.Because
schedulable=True, this workflow appears in the watsonx Orchestrate scheduler, allowing users to create time-based triggers without writing additional code.
Step 4. Create the agents in watsonx Orchestrate
Create two following agents to complete the workflow setup.
Email test agent: The email_test_agent uses the
send_email_notificationtool so that other workflows or agents can send email notifications through it.
Scheduler agent: The daily_quote_agent acts as a scheduler. This agent uses both custom tools and intrinsic tools to run and manage scheduled workflows.
- Custom tools are written in Python and can be modified to fit your use case.
- Intrinsic tools are provided by the watsonx Orchestrate ADK and cannot be modified. These tools support scheduling, monitoring, and management of workflows.
The purpose of each tool used by the scheduler agent follows:
daily_quote_flow_min: uns the workflow that generates and sends the quote.i__get_flow_status_intrinsic_tool__: Retrieves workflow status and run history.i__get_schedule_intrinsic_tool__: Lists active schedules.i__delete_schedule_intrinsic_tool__: Deletes a schedule using itsschedule_id.
These tools allow the scheduler agent to run, monitor, list, and manage scheduled workflows, enabling recurring automation in watsonx Orchestrate.
Import the agents/schedule_daily_quote_agent.yaml scheduler agent by using the watsonx Orchestrate ADK CLI.

Step 5. Import the tools and the agentic workflow into watsonx Orchestrate
Import the schedulable workflow by running the following command in the terminal from the tools directory in VS Code.
orchestrate tools import -k flow -f daily_quote_flow_min.pyThis command registers daily_quote_flow_min in the watsonx Orchestrate user interface (UI). The workflow can now be scheduled or used by agents.

A confirmation message is displayed after a successful import.
Run the following commands to import the email agent and the scheduler agent:
# Import the email agent orchestrate agents import -f email_test_agent.yaml # Import the daily quote scheduler agent orchestrate agents import -f schedule_daily_quote_agent.yaml
A confirmation message is displayed after both agents are successfully imported.
Step 6. Verify the agents in the watsonx Orchestrate UI
Open the watsonx Orchestrate UI and check Manage Agents to confirm that the imported agents are listed.


You can now run or schedule these agents directly from the watsonx Orchestrate UI.
Step 7. Schedule the agentic flow in the watsonx Orchestrate UI
Use the watsonx Orchestrate UI to schedule the automation.
- Open the watsonx Orchestrate UI.
- Search for the daily_quote_agent.
Enter a request such as:
“Schedule a motivational quote to be sent to @gmail.com at 10:00 AM IST every Monday.”
Wait for watsonx Orchestrate to confirm the schedule.



You can view and delete schedules directly from the watsonx Orchestrate UI.

Step 8. Test the agent execution and verify the email output
Open your inbox and look for an email with daily quote.

This confirms that the scheduled agent runs completed successfully.
Step 9. Review the schedule creation response
After you create a schedule in watsonx Orchestrate, the API returns a JSON response similar to the following example:
{
"data": [
{
"schedule_data": {},
"schedule_id": "314c68b7-9ca1-477f-9cc7-49290f3e6c49",
"schedule_limit": 100,
"schedule_name": "f020d70d-35da-429d-8782-2877959b3693_every_day_at_10am_Asia_Kolkata_100_times",
"schedule_pattern": "0 10 * * 1",
"schedule_time": "Mon Oct 27 2025",
"schedule_timezone": "Asia/Kolkata"
}
],
"total": 1
}
Response field summary
- schedule_id: Unique identifier for the schedule. Use this ID to list, update, or delete the schedule.
- schedule_name: Automatically generated name based on the workflow and schedule time.
- schedule_pattern: Cron expression defining when the workflow runs.
- Example:
0 10 * * 1runs every Monday at 10 AM.
- Example:
- schedule_timezone: Time zone that is applied to the schedule (for example, Asia/Kolkata).
- schedule_limit: Maximum number of times the scheduler runs before it stops.
- total: Number of schedules included in the response.
Tip for schedule management
Every schedule in watsonx Orchestrate includes a schedule_id. Use this ID to manage schedules through intrinsic tools:
- iget_schedule_intrinsic_tool: Lists all schedules.
- idelete_schedule_intrinsic_tool: Deletes a specific schedule.
Summary
In this tutorial, you explored the complete workflow for building and running an agent-driven automation. You completed the following tasks:
- Built and tested custom tools for quote generation and email delivery.
- Created an agentic workflow that connects these tools end to end.
- Defined dedicated agents for scheduling and notifications.
- Imported the workflow and agents into watsonx Orchestrate and configured a daily schedule.
You now have a functional automation in watsonx Orchestrate that sends daily inspirational messages.
Acknowledgments
This tutorial was produced as part of the IBM Open Innovation Community initiative: Agentic AI (AI for Developers and Ecosystem).
The authors deeply appreciate the support of Ramya Raghuveera and Bindu Umesh for reviewing and contributing to this tutorial.