Skip to end of banner
Go to start of banner

Add a list of users to groups from a CSV file

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

This script will add a list of users to user groups in Confluence.

//create struct to store csv data
struct row {
    string userID;
    string userGroup;
}

//get list from CSV
row [] rows = readFromCSVFile("users.csv", true); //adjust csv file name and path

//loop through users in list
for(row user in rows) {

    //sample syntax - addUserToGroup(userNameOrKey, groupName)
	addUserToGroup(user.userID, user.userGroup);
}

return "done";


Sample CSV file


user,group
johnDoe,conflunce-users
janeDoe,confluence-users
jSmith,confluence-administrators


See Other Recipes

See More Documentation

  • No labels