Skip to main content
All CollectionsRecipes
Ensure Compliance: Archiving Profiles After a Set Duration
Ensure Compliance: Archiving Profiles After a Set Duration

Learn how to archive profiles stored in an HrFlow.ai source based on a specific duration.

A
Written by Abdellahi Mezid
Updated over 2 weeks ago

Overview

This guide explains how to archive profiles in an HrFlow.ai source based on how long they have been stored.

Basics

Follow these steps:

  1. Retrieve All Profiles
    Use the HrFlow.ai API to fetch all profiles in your source.

  2. Calculate Storage Duration
    Determine the time difference between the profile's creation date in the source and the current date.

  3. Filter Profiles by Storage Period
    Identify profiles stored longer than the specified duration (e.g., 2 years, 6 months, 1 day, etc.).

  4. Archive Non-Compliant Profiles
    Archive profiles that exceed the maximum storage period.

Advanced:

  1. Explore the Colab Notebook
    Use this Google Colab Notebook for step-by-step instructions on archiving profiles based on their storage duration.

  2. Translate the Code
    To adapt the notebook code to another programming language, such as PHP, refer to this ChatGPT Thread.

Useful Links:

Did this answer your question?