You can include one or more files as attachments to your email.

You can attach a wide variety to file types. For example, it is common to attach photographs, drawings, PDF files, or Microsoft Office files. We support:

  1. Images
  2. Thumbnails
  3. Signatures
  4. Drawings
  5. PDF files
  6. Microsoft Word files
  7. Microsoft Excel files
  8. CSV files
  9. JSON files
  10. XML files
  11. Files created by a preceding "Save File" action.
  12. Other types of files

You can attach a file created by a preceding "Save File" workflow action. The "SaveFile" workflow action can be invoked by a prior action in the same workflow rule or by a prior workflow rule.

We simply attach the files you specify to the email. We do not replace variables in these attachments like we do for an Email Attachment template.

Specifying Other Attachment File Names

Each other attachment file name must be entered on a separate line. You can enter file names or expressions that yield file names. 

You can specify:

  • A file name such as MyPhoto.jpeg or MyWordFile.docx.
  • A simple column expression like [ImageColumn] or [FileColumn] where the file name is stored in the column.
  • A more complex expression, like the de-reference expression [ProductRef].[ProductPhoto]. Here the file name is stored in the [ProductPhoto] column.
  • It is common to store the images for a parent table in a child table. This allows each parent record to have zero, one, or more child images. Each child record contains an image field and a Ref field to the parent record. The parent record contains a Reverse Ref field containing the key values of the child image records. If the Reverse Ref field in the parent record is called "Related Images" and the image field in the child record is called "Image", then you can include the child images as attachments by specifying [Related Images][Images] 

Specifying Other Attachment in Your Application

Your application can control which other attachment files to include.

You can do this by:

  1. Creating an EnumList field containing the names of the attachments your application user can choose from. For example, I called my EnumList  field "Attachments" and entered  the EnumList values "PDF1", "PDF2", and "PDF3".
  2. In your workflow rule, specify the following expression in the "OtherAttachments" property:
LIST(IF(CONTAINS([Attachments], "PDF1"),"PDF1.pdf","")) + LIST(IF(CONTAINS([Attachments], "PDF2"),"PDF2.pdf","")) + LIST(IF(CONTAINS([Attachments], "PDF3"),"PDF3.pdf",""))

Locating Other Attachment Files

Your other attachment files must reside in the right place for us to find them.

For Providers that Can Store Files

For Google, Microsoft, Dropbox, Box, and other providers that can store files, we locate Other Attachment files as follows.

  1. We first look in the folder containing your worksheet. If your Other Attachment file name specifies a file name without a folder name, we look for this file under the folder containing your worksheet. If your Other Attachment file name specifies both folder names and a file name, we start from the folder containing your worksheet and follow the folder and file path you specify.
  2. We next look in the folder you specify in the "Default folder path" of the My Account > Settings pane. If your Other Attachment file name specifies a file name without a folder name, we look for this file under the "Default folder path". If your Other Attachment file name specifies both folder names and a file name, we start from the "Default folder path" and follow the folder and file path you specify.

Files you create using a "Save File" action will be located under the "Default folder path". For such files, make certain you specify the proper folder path. If the "Save File" action specified a "File Folder Path" include that folder path value. If the "Save File" action did not specify a "File Folder Path", include the default folder path value "Files". For example:

"Files/MyFileName.pdf"

For Providers that Cannot Store Files

For SQL Server. MySQL, Smart Sheet and other providers that cannot store files, we locate Other Attachment files as follows.

  1. We look in the main cloud file system associated with the app creator's primary AppSheet account, be it Google Drive, Dropbox, Office 365, or Box. We start from the folder you specify in the "Default folder path" of the My Account > Settings pane. If your Other Attachment file name specifies a file name without a folder name, we look for this file under the "Default folder path". If your Other Attachment file name specifies both folder names and a file name, we start from the "Default folder path" and follow the folder and file path you specify.

Securing Other Attachment Files

Your other attachment files must be secured properly for us to retrieve them. Normally, you must secure your other attachment files so that the app owner can read them. This is necessary because, the app is running under the identity of the app owner.

In the rare case when your app is using a private table, you must secure your other attachment files so that the current app user can read them. This is necessary because, when private tables are used, the app is running under the identity of the app user rather than the app creator. When using private files, we look for the other attachment files relative to the private user's worksheet. As a result, the attachment files from each private file user are unique to that user.

Did this answer your question?