Save File Archiving

The Save File workflow action always archives each file that it creates. 

Save File Archiving for Smartsheet

If Smartsheet is your authentication provider, we archive the file to Google drive. We do this because Smartsheet does not have a file system. If you use Smartsheet and wish to save files, you must include Google as a data provider. If Google is not already a data provider, you must go to Account>Data Sources and add Google as a data provider.

File Name

The File Name is formed by combining the File Name Prefix specified in the workflow action, with the optional Timestamp, and the file extension appropriate for the HTTP Content Type specified in the workflow action.

If your HTTP Content Type is "PDF", your Attachment Name is "MyFileName", and Disable Timestamp? is disabled, then your File Name would be something like:

MyFileName20190207_133355_804.pdf

If your HTTP Content Type is "PDF", your Attachment Name is "MyFileName", and Disable Timestamp? is enabled, then your File Name would be:

MyFileName.pdf

Folder Name

You can control the Folder Name in which the file is written using the Default app folder property and the File Folder Path specified in the workflow action.  The folder name is formed by combining the Default app folder property in the Info > Property pane with the File Folder Path specified in the workflow action. 

You can modify the Default app folder property using the Info > Property pane of the Editor.

If no File Folder Path is specified in the workflow action, then the default File Folder Path value "Files" is used. If the Default app folder is "/1track/data/MyApp-24403", and the File Folder Path is not specified, then the archive folder name is:

/1track/data/MyApp-24403/Files

If the Default app folder is "/1track/data/MyApp-24403/MyDefnFolder1", and the File  Folder Path is "MyFolderA/MyFolderZ", then the folder name is:

/1track/data/MyApp-24403/MyDefnFolder1/MyFolderA/MyFolderZ

File and Folder Name

The complete file and folder name is formed by combining the Folder Name with the File Name.

For example, if the Folder Name is "/1track/data/MyApp-24403/Files" and the  file name is "PurchaseOrder20190207_133355_804.pdf", then the file and folder name is: 

/1track/data/MyApp-24403/Files/PurchaseOrder20190207_133355_804.pdf

If the Folder Name is "/1track/data/MyApp-24403/MyFiles/PurchaseOrdersByMonth_2019_02" and the file name is "PurchaseOrder20190207_133355_804.pdf", then the archive file and folder name is: 

/1track/data/MyApp-24403/MyFiles/PurchaseOrdersByMonth_2019_02/PurchaseOrder20190207_133355_804.pdf

File and Folder Name in Audit History

The file and folder name is displayed in Audit History. You can view it by:

  1. Opening the Audit History as described in this article 
  2. Locating the workflow entry in Audit History.
  3. The "FileName" value indicates the file and folder name where the file was archived.

Create an Action to Open a Saved File

You can create an action which opens the file created by Save File.

  1. Follow the steps above to create a workflow that saves a file and sets the file name and folder path. To create a button that opens the file, the file name needs to be repeatable and unique. Do this by disabling the timestamp and setting the file name using a formula based on the key column. For example:
    CONCATENATE(“PurchaseOrder_”, [ID])

    where “ID” is the name of the key column of the table.
  2. Add a column to your table to store the PDF file name. For example, call the column “FileName” and set its type to “File”
  3. Create an action to set the file “FileName” column. The action must be of type: “Data: set the values of some columns in this row”. Use a formula to set the value to the relative file path of the file.

    For example, if the relative file path is:
    /MyFolderA

    And file name is:
    CONCATENATE(“PurchaseOrder_”, [ID])

    Then the formula should be:
    CONCATENATE(“MyFolderA/”, “PurchaseOrder_”, [ID], “.pdf”)
  4. Create an Open File action. The action must be of type: “External: open a file”. Set “File” to point to the column that you created to store the file name. For this example, the formula would be:
    [FileName]
  5. Return to the workflow that saves the file and add an action to the workflow. The “Reaction” should be set to “Change Data” and select the action you created in step 3.

When the workflow is triggered, it will archive the file with the relative file path and file name you specified. It will save the file path and file name in the column you created. When you click the Open File action, it will retrieve the relative file path from that column and open that file.

Did this answer your question?