Export and import package on schedule

Recipe ToolsMarketingDeveloper ToolAPI IntegrationDocument/FileUtilities

What it does

When the first day of each month arrives at midnight, this automation exports a package, waits for processing, retrieves it by ID, and downloads the file. The package is then imported back into the system and the import status is checked to confirm success.

Who it's for

Operations teams who need to regularly export and reimport packages without manual intervention.

How teams use this

Automate monthly package refresh

Export and reimport the package every month without manual steps. The cycle runs at midnight on the first day, so the team starts each month with a fresh package state.

Route package status to monitoring

Send the import status result to a Slack or Teams channel so the team sees success or failure without checking the system. Only the notification step is added to the existing flow.

Run export on demand instead

Replace the monthly schedule trigger with a manual button or webhook so someone can export and import the package whenever needed. The rest of the steps stay the same.

Add error handling for failures

Include a condition to check if the import status indicates failure, then retry or alert the team. This ensures the package import is confirmed before the automation ends.

How it works

  1. Start on the first of each month. At midnight on day 1 of every month, this automation begins the export and import cycle for the package.
  2. Export the package. Call the export endpoint via Rest to generate the package, then wait for the system to complete the export before moving forward.
  3. Retrieve the package by ID. Query the system via Rest to get the package by its ID so the file location and status are known for the next step.
  4. Download the file. Fetch the exported package file from File using the provided link so it is ready to be imported back into the system.
  5. Import the package. Send the package back to the system via Rest import endpoint, then check the import status to confirm the operation succeeded.