View as Markdown
Peerdom icon

Peerdom ACTION

Create Role

Create a new role within a specified circle. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Peerdom account once, then configure and run Create Role from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "peerdom-create-role",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    peerdom: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    mapId: "Map ID",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Role inputs
Property Type Description
name Name string
The name of the role to be created
Required
mapId Map ID string
The ID of the map
Required Dynamic
parentId Parent ID string
The ID should be a valid group ID.
Required Dynamic
electable Electable boolean
Whether the role is electable or not
Optional
external External boolean
Set to true if node is outside of the organization
Optional
color Color string
The choice of color for the node in hexadecimal string format, e.g. #f3a935
Optional
shape Shape string
Specifies the shape of the node that determines the visual representation of the node within the interface
Optional
customFields Custom Fields object
The custom fields for a group/role. You can add the properties from the predefined custom fields. See the documentation for further details.
Optional
groupEmail Group Email string
Email for node (group/role) communication
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
peerdom-create-role
Version
0.0.2
App
Peerdom
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes