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.
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:
If your HTTP Content Type is "PDF", your Attachment Name is "MyFileName", and Disable Timestamp? is enabled, then your File Name would be:
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:
If the Default app folder is "/1track/data/MyApp-24403/MyDefnFolder1", and the File Folder Path is "MyFolderA/MyFolderZ", then the folder name is:
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:
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:
File and Folder Name in Audit History
The file and folder name is displayed in Audit History. You can view it by:
- Opening the Audit History as described in this article
- Locating the workflow entry in Audit History.
- 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.
- 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:
where “ID” is the name of the key column of the table.
- Add a column to your table to store the PDF file name. For example, call the column “FileName” and set its type to “File”
- 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:
And file name is:
Then the formula should be:
CONCATENATE(“MyFolderA/”, “PurchaseOrder_”, [ID], “.pdf”)
- 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:
- 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.