Blocklet Server icon

Blocklet Server

Consume Blocklet Server API

Overview

This node interacts with the Blocklet Server API to retrieve user information within a specified team (blocklet app). Specifically, the "Get Users" operation fetches a list of users filtered and sorted according to various criteria such as roles, tags, search keywords, and pagination settings. It can also optionally include related data like user tags, connected accounts, and passports.

Typical use cases include:

  • Retrieving all users belonging to a particular blocklet app for administrative or reporting purposes.
  • Filtering users by role or tags to manage permissions or segment user groups.
  • Searching users by name, email, or DID to quickly locate specific individuals.
  • Paginating through large user lists efficiently.
  • Including additional user metadata such as connected accounts or passports for enriched user profiles.

Properties

Name Meaning
App DID DID of the blocklet app (team) to specify which team's users to query.
Enabled Connected Account Whether to search the connected account of the user (boolean).
User Role Filter users by their assigned role within the team.
Search Keyword (by Name, Email, Did) Filter users by a keyword matching their name, email, or DID.
User DIDs Filter users by one or more specific user DIDs (multiple values allowed).
Tags Filter users by one or more tags associated with them (multiple values allowed).
Include Tags Whether to include the tags of each user in the response (boolean).
Include Connected Accounts Whether to include connected accounts of each user in the response (boolean).
Include Passports Whether to include passports of each user in the response (boolean).
Sort Sorting options for the user list. Can sort by Updated At, Created At, or Last Login At, each ascending (1), descending (-1), or no sorting (0).
Paging Pagination options including Page number and Page Size (number of items per page).

Output

The output is a JSON array where each item represents a user object retrieved from the Blocklet Server API. Each user object may contain:

  • Basic user details such as DID, name, email, role, etc.
  • Optionally included arrays or objects for:
    • Tags associated with the user (if Include Tags is true).
    • Connected accounts linked to the user (if Include Connected Accounts is true).
    • Passports held by the user (if Include Passports is true).

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests to the Blocklet Server API.
  • The node depends on the Blocklet Server API being accessible and properly configured for the target team DID.
  • Uses lodash utility functions internally for request parameter processing.

Troubleshooting

  • Common issues:

    • Invalid or missing team DID will cause the API request to fail.
    • Providing invalid filter values (e.g., non-existent roles or malformed DIDs) may result in empty results or errors.
    • Pagination parameters out of range might lead to no data returned.
    • If the API key credential is not set up correctly, authentication errors will occur.
  • Error messages:

    • "Not implemented user action: getUsers" — This would indicate a misconfiguration or unsupported operation; ensure the operation is spelled correctly.
    • API errors related to authorization or resource not found should be resolved by verifying credentials and team DID correctness.

Links and References

Discussion