Rediger

Step 5: Automate actions in Azure SRE Agent

Build an automated health check that runs on schedule and sends results via email. You connect a tool (Outlook), create a custom agent to use it, and attach a scheduled task to trigger it.

What you accomplish

By the end of this step, your agent:

  • Has an Outlook connector that provides email tools
  • Has a custom agent configured with the SendOutlookEmail tool
  • Runs a scheduled task that executes the custom agent daily

Prerequisites

Requirement Details
Agent created Complete the agent setup in the Azure portal first

Tip

Enrich your automated tasks While not required, completing the knowledge setup and connecting source code makes your scheduled tasks more effective. Health checks can reference your runbooks and correlate findings to recent code changes, turning generic reports into actionable insights.


Step 1: Add the Outlook connector

First, connect an external tool. You need the connector before you can give its tools to a custom agent.

  1. Select Builder in the left sidebar.
  2. Select Connectors.
  3. Select Add connector.
  4. Select the Notification tab, then select Send email (Office 365 Outlook).
  5. Sign in with your Microsoft account.
  6. Select Add connector.

The connector creates tools your custom agents can use: SendOutlookEmail, GetOutlookEmail, ListOutlookEmails, and others.


Step 2: Create a custom agent with the email tool

Next, create a custom agent that can send emails. Custom agents are specialized workers that the agent can invoke for specific tasks.

  1. Select Builder → Custom agent builder.
  2. Select Create custom agent (or the plus icon on the canvas).
  3. Name it email-notifications.
  4. Set Autonomy to "Autonomous" (runs without user confirmation).
  5. Add the tool: Select the tools dropdown and select SendOutlookEmail.
  6. Select Save.

Your custom agent now appears on the canvas with its connected tool.


Step 3: Add a scheduled task to the custom agent

Now link a scheduled task to the custom agent. You do this step directly from the custom agent node.

  1. Select the plus sign (+) on the left side of the email-notifications custom agent node.

  2. Select Add scheduled task.

  3. Fill in the task details:

    Field Value
    Task name daily-resource-health-report
    Schedule Every 24 hours (or use cron: 0 8 * * * for 8 AM daily)
    Notification channel (Optional) Teams webhook URL
  4. Enter the task prompt:

    Check the health of our Azure resources:
    1. Verify all container apps are running
    2. Check CPU and memory metrics over the last hour
    3. Review any recent warning logs
    4. Summarize findings and send a report via email using SendOutlookEmail
    
  5. Select Save.

The canvas now shows the complete workflow: scheduled task → custom agent → tool.

Tip

The scheduled task triggers the custom agent, which has access to the SendOutlookEmail tool from the Outlook connector. Without the connector, the custom agent has no email tool. Without the custom agent, the scheduled task has no way to send notifications.


Verify it works

Test your scheduled task:

  1. Select Scheduled tasks in the left sidebar.
  2. Select your task in the list (check the checkbox).
  3. Select Run task now in the toolbar.
  4. Select the chat thread that opens to see execution details.

The agent shows:

  • Active status and execution time
  • Planning and reasoning steps
  • Tool invocations (SendOutlookEmail)
  • Completion confirmation

What you unlocked

Your agent now:

  • Connects to external tools (Outlook)
  • Runs custom agents with specific tool access
  • Executes scheduled tasks automatically
  • Sends proactive notifications without manual triggers

You completed the getting started journey!


Your agent is fully operational. Here's where to go deeper:

Understand the concepts

  • Custom agents: How custom agents work, when to use them, autonomy levels
  • Connectors: All available connectors and how they extend your agent
  • Tools: Built-in tools and how to add custom ones
  • Skills: Modular capabilities your agent loads on demand

Explore more capabilities

Add more connectors

Advanced automation