> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-platform/6/inventory-manager/sendcommand-sendconfig-workflows/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # Send commands and configurations to devices via workflows > Use sendCommand and sendConfig gateway services to execute batch command and configuration operations across multiple inventory devices in workflows. 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 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 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 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 inventory from Gateway 4](./migrate-inventory-from-iag4) for migration guidance. For Configuration Manager and command template operations, Gateway uses built-in broker services through Device Broker support. See [Device Broker support](./device-broker-support) for details. ## Task mapping from Gateway 4 If you're migrating workflows from Gateway 4, use this mapping to update your workflow tasks: | Gateway 4 task | Description | Inventory Manager task | Notes | | ------------------------------ | ------------------------------------------ | ---------------------------- | ------------------------------------------------------------------------------------------------- | | `AutomationGateway.isAlive` | Verifies device is reachable | `GatewayManager.sendCommand` | Use sendCommand with an appropriate command (e.g., `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 (e.g., `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 Gateway 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](./create-and-populate-inventories). For advanced driver configuration and performance tuning, see [Configure driver options](./configure-driver-options). ## Send commands to multiple devices (sendCommand) 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 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: ```json ["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: ```json [ { "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 (sendConfig) 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 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: ```json [ { "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 ## Learn more * [Device Broker support](./device-broker-support) - Learn how built-in broker services support Configuration Manager and command templates * [Migrate inventory from Gateway 4](./migrate-inventory-from-iag4) - Guidance for refactoring workflows from Gateway 4 to Inventory Manager * [Create and populate inventories](./create-and-populate-inventories) - Configure inventory nodes with required connection attributes * [Configure driver options](./configure-driver-options) - Advanced driver configuration and performance tuning > Use sendCommand and sendConfig gateway services to execute batch command and configuration operations across multiple inventory devices in workflows.