Delete Files From Storage

Delete one or more files from your GoFormz account's storage.

Inputs

Note that while each individual input below is optional, at least one is required. You must have either fileName1 or dataSetUrl as an input. You can have both, but you cannot have neither.

Input

Value

fileName1, fileName2, etc.

Optional

Names of files to be deleted.

dataSetUrl

Optional

A DataSet JSON file containing a column called storageFileName. This column should list the names of files to be deleted.

Outputs

None

Usage

This action's primary purpose is as a cleanup step. It is good practice to delete temporary files after you are done with them. For instance, many actions generate DataSet JSON files and PDFs that are stored in your GoFormz account. These files are not deleted automatically, and therefore take up space in your account. So it is good practice to use the Delete Files From Storage action to delete these temporary files and save space in your account, especially if you have a lot of workflows that generate such files.

There are two common ways to perform this deletion:

  1. Delete after each use: Sometimes, you will want to delete files right after you use them. To do this, just use the action at the end of your workflow, and use the fileName# inputs to reference the files generated in previous workflow steps that you want to delete. See below for an example of this. In this example, we use the Delete action to clean up at the end of a Data Source update workflow, which generates a number of DataSet files across several steps.
  1. Store and delete later: Sometimes, you might want to store a list of files to be deleted later. For example, you might generate a number of different temporary files during various phases of filling out a form, but you may want to keep these files around for reference until the form is completed. In this scenario, you would store the names of the temporary files somewhere (e.g. a GoFormz Data Source), and when the form is completed delete all of them at once. In the example below, we do exactly this. First, we export the Data Source containing the files to be deleted to a DataSet file using Get Data Source, and then we use the Delete Files From Storage action with the dataSetUrl input to delete these files. Notice that there is a second Delete Files From Storage action after the one highlighted in the image — because you will want to delete the DataSet generated by the Get Data Source step!