Skip to main content

Step 5: Automate Workflows

Your team probably has recurring tasks — checking service health every morning, reviewing overnight alerts, verifying certificate expirations, or posting weekly capacity reports. Connect your tools, build a workflow, and let the agent run it on a schedule.

What you'll accomplish

  • Connect a notification tool so the agent can send messages
  • Create a custom agent that uses that tool
  • Schedule a recurring health check that runs automatically
  • See the complete workflow on the visual canvas

Prerequisites

RequirementDetails
Completed Steps 1–2Create and set up and Team onboarding
Azure context for this exampleAccess to the Azure resources the task checks. A logging provider is needed only if the task requests logs. The connector identity needs suitable RBAC for the requested data.
RecipientAn email address that can receive the test report
tip

Steps 3 and 4 (First investigation and Automate incidents) are not required for this step, but completing them first gives you a better understanding of what workflows can automate.


How it works

Automation connects three building blocks — each one set up through the portal:

Building blockWhat it doesExample
ConnectorGives the agent access to an external serviceTeams, Outlook, Jira, Grafana
Custom agentA specialized worker with access to specific toolshealth-check-reporter with permission to send messages
Scheduled taskTriggers a custom agent on a recurring schedule"Every morning at 8 AM, check resource health and send a summary"

Add a connector

Connectors let the agent interact with external services. Start with a notification tool so your agent can report findings. This guide walks through setting up an Outlook connector. For Teams, see Set up a Teams connector.

  1. Go to Builder → Connectors in the left navigation.
  2. Click Add connector.
  3. Select the Notification tab, then select the preview Office 365 Outlook connector with service Microsoft Outlook.
  4. Sign in and authorize access.
  5. In Configure tools, select the email-send operation.
  6. Set its Policy to Ask.
  7. Turn on Parameter policy for the email-send operation.
  8. In its recipient or To parameter, enter the fixed address from the prerequisites.
  9. Review the configuration, then click Create.

Checkpoint: The connector appears in the connectors list. Verify that its status becomes Connected. A connector can instead show Connecting, Failed, or Error if setup is incomplete or unhealthy.

More connectors

You can also add MCP-based connectors for Datadog, Splunk, Elasticsearch, Dynatrace, New Relic, and custom MCP servers. See MCP Connectors for the full list.


Create a custom agent

Custom agents are specialized workers with access to specific tools. This section assumes the workspace-enabled Agent Canvas experience.

  1. Go to Builder → Agent Canvas in the left navigation.
  2. Click the Create dropdown in the toolbar and select Custom Agent. The creation dialog opens with two tabs: Form and YAML.
  3. Fill in the required fields:
    • Custom agent name — e.g. health-check-reporter
    • Instructions — describe what this custom agent does and include the report recipient, e.g. "You are a health check reporter. Check Azure resource health for my container apps and email the summary to ops@example.com."
  4. Click Choose tools and select the notification tool from your connector.
  5. Click Create.

The custom agent appears as a node on the visual canvas. Its selected Outlook operation appears in a toolbox node, typically with an MCP badge.

Checkpoint: The canvas shows the custom-agent node and a toolbox node containing the selected Outlook tool.

More options

The custom agent form also lets you configure skills, hooks, and other advanced settings. See Create a Custom Agent for the full walkthrough.


Schedule a recurring task

Link a scheduled task to the custom agent so it can run automatically.

  1. Click the + button on the left side of your custom-agent node.

  2. Select Add scheduled task. The dialog opens with Response subagent populated with that agent.

  3. Fill in the required fields:

    • Task name — e.g. daily-health-report

    • Response subagent — verify that your custom agent is selected

    • Task details — describe what the agent should do:

      Check the health of the container apps in my resource group. Verify all apps are running, check CPU and memory metrics over the last hour, review any recent warning logs. Summarize findings and send the report.

  4. Set Frequency, which defaults to Daily, and set Time of day. The label includes your local timezone, such as Time of day (PST).

  5. Click Create task.

The canvas now shows the complete workflow chain visually.

Checkpoint: The canvas shows a scheduled-task node connected to the custom-agent node. The custom agent connects to a toolbox node that contains the Outlook tool.


Test it

Run the task immediately to verify everything works:

  1. Go to Automation in the left sidebar.
  2. Select your task (check the checkbox).
  3. Click Run now in the toolbar.
  4. To watch execution, click the task name to open the executions view, then click the thread name link — or find the thread under Chats in the sidebar.

Run now submits the execution request and refreshes the automation list. The requested health checks, metrics, logs, report, and email depend on the available tools, resource access, telemetry, connector health, and successful execution.

Checkpoint: An execution appears for the task. If the execution resolves a thread, the executions view shows a Thread name link; otherwise it shows No thread found. If the execution succeeds and invokes the Outlook tool, verify that the recipient receives the report.

After testing, use Turn off or Delete for a scheduled task you don't plan to keep. Use Remove or Disconnect for the connector. Revoke the Outlook OAuth grant when it's no longer needed.


You've completed the getting-started journey

Your agent is now configured for four workflows:

  • Incident response — investigate alerts that match a response plan
  • Root cause analysis — use connected code, telemetry, and Azure context during investigations
  • Workflow automation — run scheduled tasks through custom agents and connectors
  • Team context — use the knowledge sources connected during setup

CapabilityWhat it adds
Scheduled TasksAdvanced scheduling options and task management
ConnectorsHow connectors provide tools to your agent
Custom AgentsHow custom agents delegate and specialize work

Keep going

Now that you're set up, explore Concepts to understand how the agent thinks, or dive into Tutorials for hands-on guides on advanced features.

Where to goWhat you'll find
ConceptsHow roles, permissions, memory, connectors, and agent reasoning work
CapabilitiesDetailed pages on every feature the agent offers
Was this page helpful?