--- title: "Action Reference" slug: "action-reference" description: "This is a list of actions that can be used in RapidIdentity Connect to interact with the Google Classroom Adapter." tags: ["RapidIdentity ", "Connect", "Actions", "Adapter", "Google", "Classroom", "Reference"] updated: 2022-06-03T17:51:56Z published: 2022-06-03T17:51:56Z canonical: "help.rapididentity.com/action-reference" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt > Use this file to discover all available pages before exploring further. # Action Reference ### **addGoogleClassroomCourseAlias** Add an Alias to a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | alias* | text, expression, variable | the Alias to add | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # add a domain scoped alias to the course newAlias = addGoogleClassroomCourseAlias(conn, courseId, "d:English101Section2") ``` ### **addGoogleClassroomCourseStudent** Add a Google Apps User to a Google Classroom Course as a Student. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userId* | text, expression, variable | the id of the Student to add to the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # add a student to course newStudent = addGoogleClassroomCourseStudent(conn, "d:English101Section2", "john.doe@example.com") ``` ### **addGoogleClassroomCourseStudents** Add a batch of Google Apps Users to a Google Classroom Course as Students. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userIds* | text, expression, variable | array of ids to add to the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # add students to course newStudents = addGoogleClassroomCourseStudents(conn, "d:English101Section2", ["john.doe@example.com", "jane.doe@example.com"]) ``` ### **addGoogleClassroomCourseTeacher** Add a Google Apps User to a Google Classroom Course as a Teacher. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userId* | text, expression, variable | the id of the Teacher to add to the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # add a teacher to course newTeacher = addGoogleClassroomCourseTeacher(conn, "d:English101Section2", "juan.fulano@example.com") ``` ### **addGoogleClassroomCourseTeachers** Add a batch of Google Apps Users to a Google Classroom Course as Teachers. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userIds* | text, expression, variable | array of ids to add to the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # add a teachers to course newStudents = addGoogleClassroomCourseTeachers(conn, "d:English101Section2", ["juan.fulano@example.com", "maria.fulano@example.com"]) ``` ### **deleteGoogleClassroomCourse** Delete a Google Classroom Course record by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | id* | text, expression, variable | the id of the Course to delete | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # delete a course deleted = deleteGoogleClassroomCourse(conn, "d:English101Section2") ``` ### **deleteGoogleClassroomCourseAlias** Delete an Alias from a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | alias* | text, expression, variable | the Alias to delete | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # delete the alias from the course deleted = deleteGoogleClassroomCourse(conn, courseId, "d:English101Section2") ``` ### **deleteGoogleClassroomCourseInvitation** Delete an Invitation to a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | id* | text, expression, variable | the id of the Invitation | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get the invitation so we can find its id invitation = getGoogleClassroomCourseInvitations(conn, {courseId: courseId, userId: "juan.fulano@example.com"}) # delete the invitation deleted = deleteGoogleClassroomCourseInvitation(conn, invitation.id) ``` ### **deleteGoogleClassroomCourseInvitations** Delete a batch of Invitations to Google Classroom Courses. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | ids* | text, expression, variable | array of ids to delete | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get all invitations to a course invitations = getGoogleClassroomCourseInvitations(conn, {courseId: courseId}) # extract the ids invitationIds = createArray() forEach(invitation, invitations) { appendArrayElement(invitationIds, invitation.id) } deleted = deleteGoogleClassroomCourseInvitations(conn, invitationIds) ``` ### **deleteGoogleClassroomCourses** Delete a batch of Google Classroom Course record by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | ids* | text, expression, variable | array of the Google Classroom User ids to delete | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # delete courses deleted = deleteGoogleClassroomCourses(conn, [course1Id, course2Id]) ``` ### **deleteGoogleClassroomCourseStudent** Delete a Student from a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userId* | text, expression, variable | the id of the Student to delete from the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # remove a student from course deleted = deleteGoogleClassroomCourseStudent(conn, courseId, "john.doe@example.com") ``` ### **deleteGoogleClassroomCourseStudents** Delete a batch of Students from a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userIds* | text, expression, variable | array of ids to remove from the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # remove students from course deleted = deleteGoogleClassroomCourseStudents(conn, courseId, ["john.doe@example.com", "jane.doe@example.com"]) ``` ### **deleteGoogleClassroomCourseTeacher** Delete a Teacher from a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userId* | text, expression, variable | the id of the Teacher to delete from the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # remove a teacher from course deleted = deleteGoogleClassroomCourseTeacher(conn, courseId, "juan.fulano@example.com") ``` ### **deleteGoogleClassroomCourseTeachers** Delete a batch of Teachers from a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userIds* | text, expression, variable | array of ids to remove from the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # remove teachers from course deleted = deleteGoogleClassroomCourseTeachers(conn, courseId, ["juan.fulano@example.com", "maria.fulano@example.com"]) ``` ### **getGoogleClassroomCourse** Get a Google Classroom Course record by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | id* | text, expression, variable | the id of the Course to get | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get a course course = getGoogleClassroomCourse(conn, courseId, English101Section2") ``` ### **getGoogleClassroomCourseAliases** Get the aliases for a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get the aliases for a course aliases = getGoogleClassroomCourseAliases(conn, courseId) ``` ### **getGoogleClassroomCourseInvitations** Get a list of outstanding Google Classroom Course Invitations. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | filter* | text, expression, variable | filter to limit the Invitations returned (default: none) | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get the outstanding invitations for a course invitations = getGoogleClassroomCourseInvitations(conn, {courseId: courseId}) ``` ### **getGoogleClassroomCourses** Get Google Classroom Course records. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | filter | text, expression, variable | filter to limit the Courses returned (default: none) | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get the courses that a student is enrolled in courses = getGoogleClassroomCourses(conn, {studentId: "john.doe@example.com"}) ``` ### **getGoogleClassroomCoursesById** Get batch of Google Classroom Course records by Id. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | ids* | text, expression, variable | array of the Google Classroom User ids to get | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get the courses by id courses = getGoogleClassroomCourses(conn, [course1Id, course2Id]) ``` ### **getGoogleClassroomCourseStudents** Get the list of Students from a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get the students from a course students = getGoogleClassroomCourseStudents(conn, courseId) ``` ### **getGoogleClassroomCourseTeachers** Get the list of Teachers from a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # get the students from a course teacher = getGoogleClassroomCourseTeachers(conn, courseId) ``` ### **inviteUsersToGoogleClassroomCourse** Invite a batch of Google Apps Users to a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userIds* | text, expression, variable | array of ids to invite to the Course | | role* | choice (STUDENT, TEACHER), text, expression, variable | the role of the invited Users | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # invite students to a course invitations = inviteUsersToGoogleClassroomCourse(conn, courseId, ["john.doe@example.com", "jane.doe@example.com"], "STUDENT") ``` ### **inviteUserToGoogleClassroomCourse** Invite a Google Apps User to a Google Classroom Course. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | courseId* | text, expression, variable | the id of the Course | | userId* | text, expression, variable | the id of the User to invite to the Course | | role* | choice (STUDENT, TEACHER), text, expression, variable | the role of the invited User | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # invite a teacher to a course invitations = inviteUserToGoogleClassroomCourse(conn, courseId, "maria.fulano.doe@example.com"], "TEACHER") ``` ### **openGoogleClassroomCourseIterator** Open Google Classroom Course Iterator. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | filter | text, expression, variable | filter to limit the Courses returned (default: none) | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # iterate all the courses in the domain courses = openGoogleClassroomCourseIterator(conn) forEach(course, courses) { # do something } ``` ### **saveGoogleClassroomCourse** Create/Update a Google Classroom Course record. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | record* | expression, variable | the record to save | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # create a new course courseTemplate = createRecord() setRecordFieldValue(courseTemplate, "name", "English 101"); setRecordFieldValue(courseTemplate, "section", "A"); setRecordFieldValue(courseTemplate, "descriptionHeading", "Welcome to English 101"); setRecordFieldValue(courseTemplate, "description", "Remedial English"); setRecordFieldValue(courseTemplate, "room", "222", false); setRecordFieldValue(courseTemplate, "ownerId", "admin@example.com"); setRecordFieldValue(courseTemplate, "courseState", "ACCEPTED"); setRecordFieldValue(courseTemplate, "alias", "English-101-Section-A"); newCourse = saveGoogleClassroomCourse(conn, courseTemplate); ``` ### **saveGoogleClassroomCourses** Create/Update a batch of Google Classroom Course records. | Property | Value | Description | | --- | --- | --- | | connection* | expression, variable | the Google Apps connection definition | | records* | expression, variable | array of records to save | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # create 3 sections of new course courseTemplates = createArray() forEach(section, ["A", "B", "C"]) { courseTemplate = createRecord() setRecordFieldValue(courseTemplate, "name", "English 101") setRecordFieldValue(courseTemplate, "section", section) setRecordFieldValue(courseTemplate, "descriptionHeading", "Welcome to English 101") setRecordFieldValue(courseTemplate, "description", "Remedial English") setRecordFieldValue(courseTemplate, "room", "222", false) setRecordFieldValue(courseTemplate, "ownerId", "admin@example.com") setRecordFieldValue(courseTemplate, "courseState", "ACCEPTED") setRecordFieldValue(courseTemplate, "alias", "English-101-Section-" + section) appendArrayElement(courseTemplates, courseTemplate) } newCourse = saveGoogleClassroomCourses(conn, courseTemplates) ```