Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
-
Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
-
Permissions: Ensure your token has the necessary permissions.
-
Organization ID: Identify the Organization where the card will be created.
Step 1: Find Your Organization ID
1. Via Pipefy UI
- Open the Organization in your browser.
- The URL will include the Organization ID: https://app.pipefy.com/organizations/123456789.
- Organization ID = 123456789 (the number after /organizations/).
2. Via GraphQL Query
- Check on our Get resource IDs page.
Step 2: Retrieve the data about the organization's members
In this step, we use a GraphQL query to retrieve information about the members of a specific organization. By providing the organization's ID, we can fetch details about each member, including whether they are billable, their role within the organization, their name and email, and their last sign-in date.
The query we use is:
{
organization(id: 456) {
members {
billable
role_name
user {
name
email
lastSignInAt
}
}
}
}
This query returns a JSON response similar to the following:
{
"data": {
"organization": {
"members": [
{
"billable": true,
"role_name": "admin",
"user": {
"name": "Ethan Caldwell",
"email": "[email protected]",
"lastSignInAt": "2025-02-19T12:15:30-04:00"
}
},
{
"billable": true,
"role_name": "normal",
"user": {
"name": "Ava Kensington",
"email": "[email protected]",
"lastSignInAt": "2025-02-14T09:32:10-04:00"
}
},
{
"billable": false,
"role_name": "guest",
"user": {
"name": "Nathaniel Whitmore",
"email": "[email protected]",
"lastSignInAt": "2025-01-28T18:47:05-04:00"
}
},
{
"billable": true,
"role_name": "normal",
"user": {
"name": "Sophia Lambert",
"email": "[email protected]",
"lastSignInAt": "2025-02-16T14:21:45-04:00"
}
},
{
"billable": true,
"role_name": "normal",
"user": {
"name": "Benjamin Holloway",
"email": "[email protected]",
"lastSignInAt": "2025-02-10T07:55:20-04:00"
}
}
]
}
}
}
This response provides key insights into the organization’s members. The billable
field indicates whether a user occupies a paid seat in the organization's plan. This is crucial for managing costs and ensuring that only necessary users are utilizing paid resources.
The role_name
field specifies whether a user is an admin, a normal member, a guest, and so on, defining their level of access and permissions within the organization. Additionally, the query retrieves each user’s name and email for identification, along with the lastSignInAt
field, which records their last login.
Since our goal is to identify active users, lastSignInAt
is especially useful. Recent logins suggest active engagement, while older timestamps may indicate inactive members. By analyzing this data, organizations can optimize seat usage, adjust user roles, and make informed decisions about efficiently managing their members.