Add Item
Adds an item to the specified queue with the provided data and reference.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Icon - The custom icon of the node.
- Inputs - The number of input ports of the node.
- Outputs - The number of output ports of the node.
Input
- Item - The data you want to add to the queue.
- Reference - An optional reference associated with the item being added.
Options
- Queue Name - Specifies the name of the queue where the item will be added.
- AES Key / RSA Key Pair - Encryption keys for securing the data added to the queue.storage.
- ID Key - An optional identification key associated with the item. (e.g.
idoritem_id) - Priority - Set the priority of the item. Options include:
1 - Low2 - Normal3 - High
- Maximum Try Count - Determines how many times the item will be retried if it fails.
How It Works
The Add Item node adds work items to a Robomotion Queue with encryption and deduplication:
- Validates that the input data is an object (not primitive types)
- Checks that the data size doesn't exceed 256KB limit
- Retrieves encryption credentials from the vault (AES or RSA key pair)
- If an ID Key is specified and present in the data:
- Creates a SHA-256 hash of the ID value for deduplication
- Stores the hashed ID to prevent duplicate items
- Encrypts the data:
- AES: Encrypts directly with the provided key
- RSA: Generates a random AES key, encrypts data with AES, then encrypts the AES key with RSA
- Sends encrypted data to the Robomotion Orchestrator queue
- The item becomes available for processing by Get Next Item or Wait Item nodes
Requirements
- Item must be an object type (not string, number, array, etc.)
- Item size must not exceed 256KB (262,144 bytes)
- Queue Name must be specified
- Valid encryption key (AES or RSA key pair) must be configured in vault
- The queue must exist in Robomotion Orchestrator
Error Handling
| Error Code | Description | Solution |
|---|---|---|
| Core.Queue.Insert.ErrOnCreate | Failed to parse node configuration | Verify node configuration is valid JSON |
| Core.Queue.Insert.OnMessage | Message parsing failed | Check input message format is valid |
| Core.Queue.Insert.ErrCredentials | Invalid or missing credentials | Verify encryption key exists in vault with correct VaultId and ItemId |
| Core.Queue.Insert.OnMessage | "Invalid data type. Current type is 'X', expected type is object" | Ensure Item input is an object, not a string, number, or array |
| Core.Queue.Insert.OnMessage | "The item you want to insert is too large. The limit is 256kb" | Reduce item data size or split into multiple items |
| Core.Queue.Insert.OnMessage | "AES key decode error" | Verify AES key is valid hexadecimal string |
| Core.Queue.Insert.OnMessage | "Unsupported vault item type" | Use either AES Key or RSA Key Pair vault item |
| Core.Queue.Insert.OnMessage | HTTP request error | Check network connectivity to Robomotion Orchestrator |
| Core.Queue.Insert.OutputMarshal | Failed to serialize output | Check message structure is valid |
Usage Examples
Example 1: Adding Customer Orders to Queue
Process customer orders asynchronously using a queue:
Input Item: {
"orderId": "ORD-12345",
"customerName": "John Doe",
"items": [...],
"totalAmount": 1250.50
}
Queue Name: "OrderProcessing"
ID Key: "orderId"
Priority: 2 - Normal
Maximum Try Count: 3
Result: Order added to queue, will retry up to 3 times if processing fails
Example 2: High-Priority Invoice Processing
Add urgent invoices with high priority:
Input Item: {
"invoiceId": "INV-2024-001",
"customerId": "CUST-5678",
"amount": 50000,
"dueDate": "2024-01-15"
}
Queue Name: "InvoiceProcessing"
ID Key: "invoiceId"
Priority: 3 - High
Maximum Try Count: 5
Reference: "Q1 2024 Priority Invoices"
Result: Invoice added with high priority, processed before normal priority items
Example 3: Bulk Data Addition
Add multiple items to queue from an array:
Input Item: [
{"customerId": "C001", "email": "user1@example.com"},
{"customerId": "C002", "email": "user2@example.com"},
{"customerId": "C003", "email": "user3@example.com"}
]
Queue Name: "EmailNotifications"
ID Key: "customerId"
Priority: 1 - Low
Maximum Try Count: 2
Result: All three items added to queue individually with deduplication by customerId
Usage Notes
- Item data must be a JavaScript object; primitive types (strings, numbers, booleans) are not allowed
- Arrays of objects are automatically split into individual queue items
- The ID Key enables deduplication - items with the same hashed ID won't be duplicated
- Data is encrypted before storage for security
- Maximum item size is 256KB - consider splitting large data into smaller chunks
- Priority determines processing order: High (3) > Normal (2) > Low (1)
- Maximum Try Count controls retry behavior for failed items
- Reference field is optional but useful for tracking batches or categories
- RSA encryption generates a unique AES key per item for added security
- Credentials must be stored in Robomotion vault before use
Tips
- Use ID Key to prevent duplicate work items (e.g., "orderId", "transactionId")
- Set appropriate priority levels - reserve High priority for truly urgent items
- Configure Maximum Try Count based on the operation's importance and flakiness
- Keep item sizes small for better performance - reference large files by URL instead of embedding
- Use meaningful Queue Names that indicate the purpose (e.g., "EmailQueue", "DataProcessing")
- Store credentials securely in vault - never hardcode encryption keys
- Add Reference values to categorize or batch related items
- Monitor queue depth to avoid overwhelming downstream processors
- Consider using separate queues for different priority levels instead of mixing priorities
- Test with small batches before adding thousands of items
- Use AES encryption for faster performance, RSA for higher security requirements
Related Nodes
- Get Next Item - Retrieve and process items from queue
- Wait Item - Wait for new items to arrive in queue
- Update Item State - Update item status after processing
- Delete Item - Remove items from queue
- Get Items - Retrieve multiple items with filters