Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
During a workshop, the most tedious part is to assign a QlikCloud user into the workshop space. With Qlik Application Automation , this process can be automated from the creation of the space to the assignment of the user into the specific space.
First, I created a google sheet that contains the list of users email, and 1 sheet correspond to 1 workshop.
I used the List Sheets Of Spreadsheet block to list out all the sheets within this workbook
Then I used the Condition block to check whether the sheet is prefix with *. This provide a mechanism to skip any sheet by renaming the sheet.
If it is not prefix with *, the Create Space block will create a space for each sheet using the name of the sheet. You will need to set the type of share and most importantly, set on error to ignore and continue automation and ignore errors. This will ignore this block when the space has already been created.
Once the space is created, the Search Spaces block is used to retrieve the ID of the space as the space assignment is by the ID
Next, the Get Data From Sheet With Headers block is used to retrieve the list of users email from the google sheet
For each user email, the Search Users block is used to retrieve the ID based on the email address.
With both the Space ID and User ID, the Add Member To Space block is used to assign the user into the space. Note the type of roles to assign to the user and the type of member. Also set the on error to ignore and continue automation and ignore errors in case the user has not signed up yet. This will ignore this user and move to the next user.
The following is the entire flow of the Qlik Application Automation
This can then be scheduled to run everyday and possibly more frequently just before the start of the workshop.
Would you know why the Add member to space fails in my case? I inputted a correct userid.
The error message doesn't tell much.
under the add member to space block the information required are:
Space Id - make sure you reference the space ID, I used Search Spaces to search the space name to return the Item>Id
Assignee Id - make sure you reference the user ID, I used Search Users block to search the user email address to return the Item>Id
Roles - the roles can be from managed spaces or shared spaces, for e.g. for shared spaces I used, ["producer","consumer","dataconsumer"]
Another possibility is the user might already been assigned to the space, either check before assigning or under settings set on error to ignore and continue automation
Thanks, will check the last 🙂
Thank you so much Edy!
Thanks, @Edy_Tan ! How would I go about checking to see if a user is already assigned to a space?
@jackm75 what I did is when I add the user to the space, under settings set on error to ignore and continue automation.
Great job @Edy_Tan 🙂
Did you invite new users from the Qlik Application Automation? Is there such a possibility?
@mar1opl I am not able to locate the invite new user block or equivalent API. If there is then we can create another automation to loop through the list to invite, and once they joined then assign them to the correct spaces
@marcos_herrera the search syntax I used is email co "john.doe@mail.com". Co means contain. There are others examples here. For more syntax you can refer to page 17 here.