New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceCore BlocksSecurity & Identity
Block

Clerk Block

Manage users, organizations, and sessions in Clerk

The Clerk block integrates Clerk authentication into your workflows, letting you list and manage users, organizations, and sessions programmatically. Reach for it when a workflow needs to read or mutate authentication data — provisioning users, syncing org membership, or revoking sessions.

Overview

PropertyValue
Typeclerk
Categorytools
Color#131316

When to Use

  • List or search your Clerk users to feed downstream automation or reporting.
  • Look up a single user's full profile by their Clerk user ID.
  • Programmatically create a new Clerk user from an email address captured earlier in the workflow.
  • Update or delete an existing user as part of an account-lifecycle flow.
  • List or fetch organizations, or create a new organization on demand.
  • Audit active sessions or revoke a specific session for security and sign-out scenarios.

Configuration

Operation

Required. Dropdown that selects the Clerk API action to perform. Every operation requires the Secret Key. Additional fields appear conditionally based on the selected operation.

LabelID
List Usersclerk_list_users
Get Userclerk_get_user
Create Userclerk_create_user
Update Userclerk_update_user
Delete Userclerk_delete_user
List Organizationsclerk_list_organizations
Get Organizationclerk_get_organization
Create Organizationclerk_create_organization
List Sessionsclerk_list_sessions
Revoke Sessionclerk_revoke_session

Operation-to-field mapping (which configuration fields appear per operation):

OperationVisible fields
clerk_list_usersSecret Key, Search Query
clerk_get_userSecret Key, User ID
clerk_create_userSecret Key, Email Address
clerk_update_userSecret Key, User ID
clerk_delete_userSecret Key, User ID
clerk_list_organizationsSecret Key
clerk_get_organizationSecret Key
clerk_create_organizationSecret Key
clerk_list_sessionsSecret Key
clerk_revoke_sessionSecret Key

Secret Key

Required. Your Clerk backend secret key (e.g. sk_live_...). Stored as a password field and passed as Authorization: Bearer <key> on every API call. Use {{CLERK_SECRET_KEY}} to reference an environment variable.

User ID

The target Clerk user ID (format: user_xxx). Shown for Get User, Update User, and Delete User operations.

Email Address

The primary email address for the new account (e.g. user@example.com). Shown for Create User.

Search Query

A free-text search term to filter results across email, phone, username, and name fields. Shown for List Users.

Inputs & Outputs

  • Inputs:

    • operation (string) — Operation to perform (one of the operation IDs above)
    • secretKey (string) — Secret key for Clerk API authentication
    • userId (string) — User ID; used by Get User, Update User, Delete User
    • emailAddress (string) — Email address; used by Create User
    • query (string) — Search query; used by List Users
  • Outputs:

    • users (json) — User list returned by List Users
    • user (json) — User details returned by Get User, Create User, Update User
    • organizations (json) — Organization list returned by List Organizations

Tools

Each operation maps to a dedicated Clerk tool. All tools authenticate with the Clerk REST API using the secretKey as a Bearer token.

List Users from Clerk (clerk_list_users) — Calls GET /v1/users. Returns a paginated array of user objects and a totalCount. Accepts optional params: limit, offset, orderBy, emailAddress, phoneNumber, externalId, username, userId, and query (free-text search).

Get User from Clerk (clerk_get_user) — Calls GET /v1/users/:userId. Returns the full user object including id, username, firstName, lastName, and emailAddresses.

Create User in Clerk (clerk_create_user) — Calls POST /v1/users. Accepts emailAddress, phoneNumber, username, password, firstName, lastName, externalId, publicMetadata, privateMetadata, unsafeMetadata, skipPasswordChecks, and skipPasswordRequirement. Returns the created user's id and emailAddresses.

Update User in Clerk (clerk_update_user) — Calls PATCH /v1/users/:userId. Accepts the same profile fields as Create User plus primaryEmailAddressId and primaryPhoneNumberId. Returns the updated user's id and emailAddresses.

Delete User from Clerk (clerk_delete_user) — Calls DELETE /v1/users/:userId. Returns the deleted user's id and a deleted boolean.

List Organizations from Clerk (clerk_list_organizations) — Calls GET /v1/organizations. Returns organizations (array) and totalCount. Accepts optional limit, offset, includeMembersCount, query, and orderBy.

Get Organization from Clerk (clerk_get_organization) — Calls GET /v1/organizations/:organizationId. Returns organization id and name.

Create Organization in Clerk (clerk_create_organization) — Calls POST /v1/organizations. Requires name and createdBy (user ID of the initial admin). Accepts optional slug, maxAllowedMemberships, publicMetadata, and privateMetadata. Returns organization id, name, and slug.

List Sessions from Clerk (clerk_list_sessions) — Calls GET /v1/sessions. Returns sessions (array) and totalCount. Accepts optional userId, clientId, status (abandoned, active, ended, expired, pending, removed, replaced, revoked), limit, and offset.

Revoke Session in Clerk (clerk_revoke_session) — Calls POST /v1/sessions/:sessionId/revoke. Immediately invalidates the session. Returns the session id and its new status (revoked).

YAML Example

clerk_1:
  type: clerk
  name: "Clerk"
  inputs:
    operation: "clerk_list_users"
    secretKey: "{{CLERK_SECRET_KEY}}"
    query: "{{search_trigger.query}}"
  connections:
    outgoing:
      - target: next-block-id