Archive email attachments as described in the following sections:
Configuring the archive email attachment properties
When sending an email, configure the following archive email attachment properties. For complete details, see Sending an email from a bot.
Attachment Archive - Select whether to attach a file to an email without archiving, attach a file to an email and archive it, or archive a file without attaching it to an email (useful for large files).
Attachment Content Type - Select the content type of the email attachment file.
Attachment File Store - Specify the file system where attachments are stored.
Attachment Folder Path - Specify the relative folder where attachments are saved within the file system.
Attachment Name - Enter the name of the attachment.
Attachment Template - Use a template for more precise control of the email attachment. See Using templates in a bot.
Disable Timestamp - Indicate whether to append a timestamp to the attachment file.
If enabled, email attachments are archived before the email is sent.
How the archive attachment filename is formed
The archive attachment filename is formed by combining the Attachment Name value with spaces removed, the timestamp (if Disable Timestamp? is disabled) formatted as yyyyMMdd_HHmmss_fff, and the file extension for the Attachment Content Type.
For example, if the Attachment Name is set to MyAttachmentName and the Attachment Content Type is PDF:
If Disable Timestamp? is disabled, the archive attachment filename is:
If Disable Timestamp? is enabled, the archive attachment filename is:
How the archive attachment folder name is formed
The archive attachment folder name in which the archive attachment file is stored is formed using the default app folder and the Attachment Folder Path property.
To configure the default app folder, select Info > Properties, expand App Properties, and enter a value in the Default app folder property.
If if the default app folder is
/1track/data/MyApp-24403/MyDefnFolder1 and Attachment Folder Path is set to
MyFolderA/MyFolderZ, then the archive folder name is:
If the default app folder is
/1track/data/MyApp-24403 and Attachment Folder Path is not defined (defaults to
Attachments), then the archive folder name is:
How the complete archive attachment folder and file path are formed
If the archive folder name is
/1track/data/MyApp-24403/Attachments and the archive file name is
ChangeReport20190207_133355_804.pdf, then the archive file and folder name is:
If the archive folder name is
/1track/data/MyApp-24403/MyAttachments/PurchaseOrdersByMonth_2019_02 and the archive file name is
PurchaseOrder20190207_133355_804.pdf, then the archive file and folder name is:
How the archive attachment file URL is formed
The archive attachment file URL is formed as follows:
$YOUR_APP_NAMEspecifies the name of your app.
$YOUR_ATTACHMENT_FILENAMEspecifies the Attachment Folder Name followed by the Archive File Name. You can omit the Default app folder name as calls to
www.appsheet.com/template/getappfileurlautomatically prepend the default app folder name.
$YOUR_ATTACHMENT_FILENAME values must be URL encoded if they contain reserved or unsafe URL characters.
For example, if
MyAttachments/MyPdfReport.pdf, then the URL is:
In this example, the slash (
/) in the
$YOUR_ATTACHMENT_FILENAME is URL encoded as
Using archive attachment expression variables in templates
The following expression variables for archive attachment files are available and can be used in your Email Body or email attachment templates.
Archive attachment filename.
Archive attachment file URL.
Link to the archive attachment file. The Attachment Name is used as the link text.
Viewing the archive attachment in Audit History
View the archive attachment file and folder names by checking the audit history log.
Customize the dashboard settings and look for an audit record similar to the following:
"EmailAttachment": "Name: 'ScheduledReport.pdf' Archive: AttachAndArchive FileName: 'MyOrderApp-432567/Attachments/ScheduledReport20190201_184450_854.pdf'",
The FileName value indicates the file and folder where the attachment was archived.
Note: You may need to wait for up to five minutes for the audit record to appear. AppSheet groups audit records before writing them to the audit history log to reduce overhead. This can result in a delay before an audit record appears in the audit history. If you don't see an audit record, click Search periodically to refresh the audit history log.