Create Agent

freshservice.create_agent
ActionBusiness appsconnection required

Calls the Freshservice API with the connection's credentials.

Create a Freshservice agent and grant them their roles.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Freshservice
Secret shape
the API key, or {"api_key": "…"}
Config it needs
domain, workspace_id
Resolved by
config.connection_id, else node.connection_id

Configuration

17 fields, 3 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
first_name
First name of the agent.
stringYes———
last_name
Last name of the agent.
stringNo———
email
Email address of the agent; it is their sign-in identity.
stringYes—email format—
roles
Roles to grant, as a JSON array of objects with role_id and assignment_scope, plus groups when the scope is specified_groups.
arrayYes—array of object[{"assignment_scope":"member_groups","role_id":7}]
job_title
Job title of the agent.
stringNo———
occasional
Create the agent as an occasional agent rather than a full-time one.
booleanNo———
work_phone_number
Work phone number of the agent.
stringNo———
mobile_phone_number
Mobile phone number of the agent.
stringNo———
department_ids
Departments to associate the agent with, as a JSON array of ids.
arrayNo—array of integer—
reporting_manager_id
Numeric user id of the agent's reporting manager.
stringNo———
location_id
Numeric id of the location the agent is based at.
stringNo———
time_zone
Time zone name for the agent, as Freshservice spells it.
stringNo———
language
Language code for the agent, such as en or ja-JP.
stringNo———
member_of
Agent groups the agent joins as a member, as a JSON array of ids.
arrayNo—array of integer—
observer_of
Agent groups the agent observes, as a JSON array of ids.
arrayNo—array of integer—
custom_fields
Custom field values as a JSON object keyed by the field's Freshservice name.
objectNo———
attributes
Any other documented attribute for this record, as a JSON object merged into the request.
objectNo———

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "roles": [
    {
      "assignment_scope": "member_groups",
      "role_id": 7
    }
  ]
}

Output

One shape.

result

FieldTypeExample
id
Numeric user id of the agent.
number—
first_name
First name of the agent.
string—
last_name
Last name of the agent.
string—
email
Email address of the agent.
string—
active
True while the agent is active, false once deactivated.
boolean—
occasional
True for an occasional agent, false for a full-time one.
boolean—
job_title
Job title of the agent.
string—
roles
Roles granted to the agent, each with its assignment scope.
array—
department_ids
Departments the agent is associated with.
array—
member_of
Agent groups the agent is a member of.
array—
observer_of
Agent groups the agent observes.
array—
location_id
Location the agent is based at.
number—
last_login_at
When the agent last signed in.
string—
created_at
When the agent was created.
string—
updated_at
When the agent was last updated.
string—
{
  "active": false,
  "created_at": "",
  "department_ids": [],
  "email": "",
  "first_name": "",
  "id": 0,
  "job_title": "",
  "last_login_at": "",
  "last_name": "",
  "location_id": 0,
  "member_of": [],
  "observer_of": [],
  "occasional": false,
  "roles": [],
  "updated_at": ""
}

Notes

  • Creating an agent consumes an agent seat on the account.
  • groups is required on a role only when its assignment_scope is specified_groups.

See Create Agent run in a workflow.

In a technical demo we add the Freshservice connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.