Before
An administrator had to retrieve directory users page by page, export or copy the results, and assemble the lists into one complete backup. The assembled directory then had to be written to the backup store manually.
How it works
- Start the backup, record the backup time and destination, and retrieve the first directory page.
- Follow each returned continuation cursor and append every page of users to the accumulated directory list.
- Write the complete directory to a Firestore backup document and return its timestamp and document reference.
Workflow details
- Trigger: The flow starts when an on-demand webhook request initiates a directory backup. The configured description notes that the original process ran daily at 12:15 Europe/Paris, while this demo is started on demand.
- Initial collection: The workflow retrieves the first page of users from the directory and initializes an empty collection for the backup, while recording the backup time and destination collection.
- Pagination: It reads the continuation link returned with each page, extracts the next-page cursor, requests the following directory page, and appends those users to the accumulated collection. This continues while another page is available, with the loop configured for up to 100 iterations.
- Backup creation: Once all available pages have been collected, the workflow assembles the user list into a directory backup record and writes it to Firestore in the identified backup collection.
- Completion: The final result returns the recorded backup time and the created document reference, giving IT a repeatable directory snapshot for each invocation. The configured demo simulates the service calls.
What changed
A single invocation now handles pagination, accumulation, and backup creation in sequence. IT receives one assembled directory document and its reference after the available pages have been processed, without manually consolidating the pages.
Work removed
Paging through the directory, retrieving or exporting each page, combining user lists, and manually writing the assembled directory backup.
Expected outcome
One repeatable directory backup is produced per invocation, removing approximately four recurring manual actions: page retrieval, list export or copying, list consolidation, and backup writing.
