Skip to main content
Glama

get-user

Retrieve user information from n8n workflows using ID or email address to access account details for workflow management and automation tasks.

Instructions

Get user by ID or email address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idOrEmailYes

Implementation Reference

  • Handler for the 'get-user' tool: retrieves the specified user from the n8n instance using the N8nClient and returns the user data as formatted JSON.
    case "get-user": { const { clientId, idOrEmail } = args as { clientId: string; idOrEmail: string }; const client = clients.get(clientId); if (!client) { return { content: [{ type: "text", text: "Client not initialized. Please run init-n8n first.", }], isError: true }; } try { const user = await client.getUser(idOrEmail); return { content: [{ type: "text", text: JSON.stringify(user, null, 2), }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
  • src/index.ts:591-602 (registration)
    Tool registration in the listTools response, including name, description, and input schema.
    { name: "get-user", description: "Get user by ID or email address.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, idOrEmail: { type: "string" } }, required: ["clientId", "idOrEmail"] } },
  • N8nClient.getUser method: makes the API request to retrieve user data by ID or email.
    async getUser(idOrEmail: string): Promise<N8nUser> { return this.makeRequest<N8nUser>(`/users/${idOrEmail}`); }
  • TypeScript interface defining the structure of an N8n user object.
    interface N8nUser { id: string; email: string; firstName?: string; lastName?: string; isPending: boolean; role?: string; createdAt: string; updatedAt: string; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/illuminaresolutions/n8n-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server