Send commands and configurations to devices via workflows

Prev Next

Use sendCommand and sendConfig to perform batch command and configuration operations across multiple inventory devices in your workflows.

Overview

Inventory Manager provides built-in gateway services designed specifically for workflow automation in Automation Studio. These services enable you to execute commands and apply configuration changes across multiple devices simultaneously with optimized inputs and outputs for workflow use.

Available services:

  • sendCommand: Sends commands to multiple inventory nodes
  • sendConfig: Sends configuration to multiple inventory nodes

These services appear in the GatewayManager task palette collection in Automation Studio.

Why use workflow gateway services

sendCommand and sendConfig are purpose-built for workflow automation and provide several advantages:

  • Batch operation support: Execute operations across multiple devices in a single workflow task
  • Workflow-optimized inputs and outputs: Simplified, user-friendly parameters designed for workflow use
  • Inventory Manager support: Automatically leverage inventory data and device attributes
  • Better performance: Optimized for workflow execution patterns

For IAG 4 users: If you previously used AutomationGateway adapter tasks (isAlive, runCommand, getConfig, setConfig) in your workflows, these services replace that functionality. The AutomationGateway adapter tasks were designed for internal Itential application use, while sendCommand and sendConfig are designed specifically for workflows. See Migrate from IAG 4 for migration guidance.

For Configuration Manager and command template operations, IAG uses built-in broker services through Device Broker support. SeeDevice Broker support for details.

Task mapping from IAG 4

If you're migrating workflows from IAG 4, use this mapping to update your workflow tasks:

IAG 4 Task Description Inventory Manager Task Notes
AutomationGateway.isAlive Verifies device is reachable GatewayManager.sendCommand Use sendCommand with an appropriate command (ex. show version) to verify device accessibility
AutomationGateway.runCommand Executes CLI command on device GatewayManager.sendCommand Direct replacement with updated input structure
AutomationGateway.getConfig Retrieves running or startup configuration GatewayManager.sendCommand Use sendCommand with an appropriate show command (ex. show running-config)
AutomationGateway.setConfig Applies configuration change to device GatewayManager.sendConfig Direct replacement with updated input structure

Before you begin

Ensure you have:

  • Inventory Manager installed and configured
  • Inventories created with devices/nodes configured
  • Inventory nodes with required connection attributes
  • Network connectivity from IAG to target devices
  • Valid device credentials configured

Inventory requirements

sendCommand and sendConfig services require inventory nodes with specific connection attributes to communicate with network devices.

Required attributes

  • itential_host: Device IP address or hostname
  • itential_user: SSH username
  • itential_password: SSH password
  • itential_platform: Device platform/OS type (e.g., cisco_ios, arista_eos)
  • itential_driver: Connection driver (netmiko or scrapli)

Optional attributes

  • itential_port: SSH port (default: 22)
  • itential_become: Enter privileged mode (default: false)
  • itential_become_password: Password for privilege escalation
  • itential_driver_options: Advanced driver configuration

For complete details on configuring inventory nodes with these attributes, see Create and populate inventories.

For advanced driver configuration and performance tuning, see Configure driver options.

Send commands to multiple devices (send-command)

Sends commands to inventory nodes through a gateway service. Use this service to execute the same commands across multiple devices in a single workflow operation.

To use this service as a task in your workflows, use the sendCommand task from the GatewayManager task palette collection in Automation Studio.

Input parameters

Cluster ID (string, required)

  • The ID of the gateway cluster that should connect to the inventory nodes
  • You can provide this as a static value or reference a job variable

Example: inv_cluster_runner_237

Commands (array, required)

  • Array of command strings to send to the inventory nodes
  • You can provide this as a static value or reference a job variable

Example:

["show run",  "show version"]

Inventory (array, required)

  • Array of objects specifying which inventory nodes to target
  • Each object contains:
    • inventory (string) - The name of the inventory containing the target nodes
    • nodeNames (array, optional) - Array of node names within the inventory to target. If not provided, the operation runs on all nodes in the inventory.
  • You can provide this as a static value or reference a job variable

Example:

[  {    "inventory": "production-routers",    "nodeNames": [      "core1",      "core2"    ]  }]

Outputs

Result (object)

  • Command results returned from the service
  • You can store the output as a job variable for use in subsequent workflow tasks

Error (any)

  • Error information if the operation fails
  • You can store the output as a job variable for error handling

Send configuration to multiple devices (send-config)

Sends configuration to inventory nodes through a gateway service. Use this service to apply the same configuration changes across multiple devices in a single workflow operation.

To use this service as a task in your workflows, use the sendConfig task from the GatewayManager task palette collection in Automation Studio.

Input parameters

Cluster ID (string, required)

  • The ID of the gateway cluster that should connect to the inventory nodes
  • You can provide this as a static value or reference a job variable

Example: inv_cluster_runner_237

Config (string, required)

  • The configuration text to send to the remote hosts using the devices' native syntax
  • You can provide this as a static value or reference a job variable
  • Supports multi-line configuration blocks

Example:

interface Loopback100 description Management Loopback ip address 10.255.0.1 255.255.255.255

Inventory (array, required)

  • Array of objects specifying which inventory nodes to target
  • Each object contains:
    • inventory (string) - The name of the inventory containing the target nodes
    • nodeNames (array, optional) - Array of node names within the inventory to target. If not provided, the operation runs on all nodes in the inventory.
  • You can provide this as a static value or reference a job variable

Example:

[  {    "inventory": "production-routers",    "nodeNames": [      "core1",      "core2"    ]  }]

Outputs

Result (object)

  • Configuration results returned from the service
  • You can store the output as a job variable for use in subsequent workflow tasks

Error (any)

  • Error information if the operation fails
  • You can store the output as a job variable for error handling

Related topics