If you are using Google Workspace for your organization, then you will often require two things - (a) the list of active users and (b) the list of suspended users. This data is always required by Managers of multiple departments. Google Admin has the feature to export both active and suspended users.

In this case, we are only concerned with one issue, how to export active users in Google Workspace, so we will focus on that. But there is one drawback, the Google Admin doesn’t give us the choice of mailing this list of exported active users to the manager. So, we will look into a solution that enables us to do that and facilitates the whole process.

How does Foresight help to export active users in Google Workspace?

Foresight not only helps us to export the list of active users, but it also helps us to mail the list to the managers. But that’s not it; Foresight comes to our rescue further by helping us implement automation that streamlines this process. Whenever there is a change in the list of users, we can mail the list to the manager by manual trigger (that we'll see in this blog post), or we can also set a recurring rule trigger, that will execute our Foresight rule every 15 days or one month. We'll discuss this case in some other blog post. It saves a lot of time and increases productivity.

Video demo

This video demo shows you a simple case as an example so you can understand the procedure of using Foresight to export active users in Google Workspace.


Rule Setup 

Follow these steps to set up your own rule in Foresight for exporting the active users’ list and mailing the list to the managers.

  1. Sign in to your Foresight account using your Google Admin account.
  2. Go to the Rules page and click on the New Rule  button.
  3. Select the Manual Trigger. This trigger starts by manually clicking on the Rules card.
  4. Select List User action from all the available actions.
  5. In this step, we will be changing multiple settings. 
    1. First of all, you need to give Foresight permission if you see Request Access or Access Expired.
    2. The next field is Columns. Given below is the image of the columns you want to export. Have a look at it clearly. You can add or delete as many columns as you like. You can add columns like Email, First Name, and Last name.
    3. The next two fields are related to sorting. In this, you can export the users by using the email field. You can also order them in ascending or descending order. Here, in this case, we will be using Ascending order.
    4. In the next field, you have to select the list of deleted users. We will set it to false. Remember there is a question mark icon at the right side of every field. This helps you to understand what the purpose of that field is if you have any confusion about it.
    5. The next field is Organizational Unit. We will leave it empty.
    6. After that, we have the field of the direct manager’s email. The purpose of this field is to export the users related to a particular manager. We will leave that empty too.
    7. Then we have a field called user suspended. This is one of the most important fields because it will help us choose active or suspended users. Select false to export active users.
    8. The last two fields are related to security checks for 2-factor authentication. This field helps to select users that have 2-factor authentication. We will leave this empty.
  6. Click on the add next action.
  7. Click on the email action.
  8. Select the email where you want to send the data. Fill in the subject. Fill in the email body. To enter the active user CSV download link in the email body type double curly brackets and select the {{users CSV download links}}.
  9. Click Review.
  10. Give the name of the rule and click create.
  11. As you can see the rule is created, click on the play button to trigger the rule manually.

Rule Test

  1. You can see in the log that the rule has been executed successfully.
  2. Go to the log and you will find a link where you can download the exported user CSV file from here.
  3. Login to your manager’s inbox and you will see that you have received the email with a CSV attached link.
  4. In this downloaded excel sheet, you will be able to see a list of active users.


There are many benefits of using Foresight to export active users in Google Workspace

  1. You can automatically share the user list with the team. 
  2. You can also perform recurring actions like exporting the organization data periodically, e.g. monthly or annually, or even weekly.
  3. Google Workspace is compatible with Foresight’s Data uploaded trigger to subsequently run bulk operations for the exported users.
  4. The filters are also flexible.