Actions100
- Accounts Actions
- Account Users Actions
- Agent Bots Actions
- Users Actions
- Inbox API Actions
- Contacts API Actions
- Conversations API Actions
- Messages API Actions
- CSAT Survey Page Actions
- Account Agent Bots Actions
- Agents Actions
- Canned Responses Actions
- Canned Response Actions
- Custom Attributes Actions
- Contacts Actions
- Contact Actions
- Automation Rule Actions
- Help Center Actions
- Conversations Actions
- Conversation Assignment Actions
- Conversation Labels Actions
- Inboxes Actions
- Messages Actions
- Integrations Actions
- Teams Actions
Overview
The Update Agent In Account operation for the Agents resource allows you to update an existing agent's details within a specific account in ChatWoot. This node is useful when you need to programmatically change an agent's role, availability status, or auto-offline settings—such as automating user management workflows, synchronizing agent states with external systems, or bulk-updating agent configurations.
Example scenarios:
- Automatically set agents to "busy" during scheduled maintenance.
- Promote an agent to administrator based on performance metrics.
- Ensure agents are set to go offline automatically after working hours.
Properties
| Display Name | Type | Description |
|---|---|---|
| Account Id | Number | The numeric ID of the account where the agent resides. (Required) |
| Id | Number | The ID of the agent to be updated. (Required) |
| Role | Options | Whether the agent should be an "Agent" or "Administrator". (Required) |
| Availability | Options | The availability setting of the agent: "Available", "Busy", or "Offline". |
| Auto Offline | Boolean | Whether the agent's availability status is set to go offline automatically when away. |
Output
The node outputs a json object containing the updated agent's information as returned by the ChatWoot API. The structure typically includes fields such as:
{
"id": 123,
"account_id": 456,
"role": "agent",
"availability": "available",
"auto_offline": true,
// ...other agent properties as provided by ChatWoot
}
Note: The exact output fields depend on the ChatWoot API response.
Dependencies
- External Service: Requires access to a ChatWoot instance.
- API Credentials: Needs a valid
chatwootApicredential configured in n8n, including the base URL and authentication token. - n8n Configuration: No special environment variables required beyond standard credential setup.
Troubleshooting
Common Issues:
- Invalid Account or Agent ID: If the provided Account Id or Id does not exist, the API will return an error.
- Insufficient Permissions: The credentials used must have permission to update agents in the specified account.
- Incorrect Role or Availability Value: Only allowed values ("agent"/"administrator" for Role; "available"/"busy"/"offline" for Availability) are accepted.
Typical Error Messages:
"404 Not Found": The agent or account was not found. Double-check the IDs."401 Unauthorized": Invalid or missing API credentials. Ensure yourchatwootApicredential is correct."400 Bad Request": One or more input properties are invalid. Verify that all required fields are filled and use only supported option values.