Can Bridge get data from Admin > Groups?
Is there a known or suggested method or Bridge workflow I may use to record data from Admin Center > Groups to a Smartsheet? I want a workflow to look up the groups in our plan's Admin Center and replace the rows of a sheet and column on a daily recurrence.
Answers
-
Hi Cory_OWA,
I could not find a Workflow element in Bridge to get a Group list. However, using Smartsheet API is a good method to get the Group list in your account.
Gia Thinh Technology - Smartsheet Solution Partner.
-
@Cory_OWA Gia is correct in that there's not a pre-built Bridge step for working with Groups. However, you can use the Call API module to leverage the Smartsheet API as she's indicated above.
For listing groups in a sheet, the Bridge workflow would look like:
- List the group by doing a Call API to https://api.smartsheet.com/2.0/groups . Note that you'll need to set this up in Call API with the https://api.smartsheet.com/2.0 piece of your URL in the Call API integration module as well as a Secret Header for Authentication: Bearer your token here. Then in the workflow the Make API Call step would have /groups as the endpoint
- Create a child workflow with a Search Sheet step. In Search Sheet, add a Row filter for ID = {{runtime.data.id}}. This will look in your sheet to see if the ID already exists.
- Now add a Is Empty conditional junction. For Value add the reference {{states.startstate.smartsheet.search_sheet.sheet.rows}}. Add states to both sides of the Junction where "success" means that no ID was found, and Failure means that the ID was found (the results aren't empty)
- Add a Add Rows step under the Success side of the junction. In Add Rows settings, define the columns that you want to add, for example ID and Group Name. Then, for the values for those columns use {{runtime.data.id}} and {{runtime.data.name}} as the references
- Go back to the first workflow and add a "Run Child Workflow" step. Point it at the workflow you created in step 2. In the Number of Runs option put the reference {{states.startstate.call_api.make_api_call.response.data}}
- Click Triggers in the first workflow and schedule it to run on the schedule that you want.
This setup will run, read the list of groups, search your sheet to see if you already captured that group, and if not will add the group name to the list.
Note that this doesn't sweep your sheet clean of groups that no longer exist. If you need that functionality you'll need a separate Bridge workflow to work this in reverse…read your sheet and then read the list of groups and then probably use a little Javascript to compare the two and produce a list of row IDs that don't match the group list, then finally Delete Row that list of row IDs.
-
Thanks, @Gia Thinh and @Brian_Richardson - I have made much progress in this area from this first question. Long overdue thanks to you for the first step.
I now have workflows that maintain a reference sheet of my workspaces, one of my groups, and one of my datasheets. I then reference between them with a resources tracker datasheet (staff, users, people). This will help my program understand status and dispositions of hundreds of datasheets and who has or needs what access to what datasheets. Ultimately, I'm hoping it will help us keep that number of datasheets much smaller when we maintain only the Smartsheets we are tracking as in-flight and priority.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives