The Loop through Attachments action allows you to pull information about file attachments attached to a record. The loop will return every attachment in sequence, and further actions can be applied to each attachment.
Attachments are not stored in a table, but are associated with a record. In order to look through attachments, you will need the record it is associated with.
- Select a table: the table which has the record with the attachments.
- Specify record ID: the record ID of the record with the attachments.
Actions are embedded within the Loop Through Attachments action.
As the loop returns each file attachment in sequence, one or more actions are applied to the attachment.
This is represented by indented actions beneath the loop. Below, you can see the Add Attachment to Record ID is indented beneath the loop action, and the blue bracket line on the left shows it is connected to the Loop.
When you hover over the loop action, the plus sign will add an action indented underneath.
You can also drag and drop other actions within the Loop Through Attachments action.
Once an action is embedded in the loop, it has access to details of the attachment.
An action within the loop has access to the following details of the attachment:
- Attachment Extension
- Attachment Name
- Attachment Size
- Attachment URL
- Created By
- Created Date
- Include on Send: this flag is used on pages which allow for a Send Email option. When set, the email will include the attachment.
- Tenant ID: this is for multi-tenancy accounts, which isn't implemented at the moment
In the below example, an Assign Value to Action Result has been embedded within the Loop Through Attachments action.
As you can see, you can pull any of the above details from the attachment.