Skip to main content

Node - Get Single Data from User/Department/O-Roles


Function: A piece of data about a user, department, or organizational role can be obtained from a field in a record or from the organization backend, and the data is structurally equivalent to a row of records.

In a worksheet, members, departments, and organizational roles are an attribute field of the worksheet, while members, departments, and roles in an organization are also a kind of independent data objects that themselves contain a lot of attribute information and can be considered as system worksheets.

  • Information for a member in the organization:

    Name, Mobile, Email, Department, Main Department, Position, Job Number, Workplace, Organizational Role, Member ID, Direct supervisor, Direct subordinate, All subordinates, Creation Time, etc.

  • Information for a department in the organization:

    Department name, Department head, Parent department, Directly subordinate department, All subordinate departments, Members in the department, Members in the department and sub-departments, Department ID, Creation time, etc.

  • Information for a role in the organization:

    Role name, Notes, Members in the role (members array), O-Role ID, Current Role, Creation Time, etc.

Example

When creating an OKR task for a department, members of the department are automatically added to the task's [Some Members] field, based on the task owner.

The task worksheet is designed as follows:

Workflow: Get the department information based on the task owner so that you can directly use the information of the members in this department.

Workflow Configuration

Method 1

1). Create a workflow that will be triggered when a new task is added

2). Add the [Get Single Data from User/Department/O-Roles] node to get the creator's information.

Select [Get from member field], that is, get the member object information of the task owner in the newly created record, here you will know the department he belongs to.

3). Continue to obtain information on the department object

Select [Find from all organizations], where the department name is equal to the department of the member object obtained in the previous step.

4). Once the department information is obtained, the members in the department are known and then add them to the members field.

5). In the previous step, the members in the department contained the task owner, which you can remove if you don't need to add the owner to the members field.

Method 2

The overall principle is similar to that of method 1, but steps 2 and 3 of method 1 can be merged. That is, to get the department object data directly from departments in the organization, and the filter is that the department head is one of the task owners. Other configurations are the same.

Get reporting relationship

Check it if you need information about the member's supervisor, subordinate, etc. If you don't need it, it is recommended to uncheck for better query efficiency.

TIPS

  1. The information obtained at this node is all one piece of data in a single structure and cannot be passed directly to the subflow. In this example, after getting the department information, and there will be many members in the department, which means that it can only be updated into one members field and cannot be passed to the subflow.

  2. If you want to create multiple new records for members in a department, you need to add the [Get Single Data from User/Department/O-Roles] node, and then add them to the worksheet through the subflow or batch update record node.

  3. Similar to obtaining records, you can next add a branch flow based on the finding results (data exist/no data).

  4. When obtaining a member from the members field, if the member is an external collaborator, all related fields (job number, supervisor, etc.) return null.

  5. If personal information is set to be private, or if certain contacts are hidden, these will not affect the information returned by the node.


Have questions about this article? Send us feedback