Export Salesforce attachments to encrypted S3

CRMMarketingDeveloper Tool

What it does

When a new or updated Salesforce record with an OT statement PDF is marked for S3 export, this automation downloads each attachment and uploads it to Amazon S3. Files are sent only when the Location field is empty.

Who it's for

Finance teams who need to archive Salesforce attachments to S3 without manual downloads.

How teams use this

Archive OT statements to S3 automatically

When an OT statement PDF is added to Salesforce and marked for export, this automation downloads and uploads it to S3 in one step. The team no longer needs to manually export and store files.

Route exports only to new records

Retarget this automation to run only on newly created Salesforce records instead of updates. The same S3 upload process runs, but duplicate exports are avoided.

Add metadata tags to S3 files

Extend the S3 upload step to include custom metadata tags from the Salesforce record, such as department or cost center. This requires adding a tag mapping before the upload runs.

How it works

  1. Monitor for new or updated OT statement. A new or updated Salesforce record with an OT statement PDF attachment and Send to S3 set to true triggers this automation when the Location field is empty.
  2. Search Salesforce for attachments. Query Salesforce to find all attachments on the record so each file can be processed individually in the next steps.
  3. Download each attachment from Salesforce. Loop through the attachment list and download each file from Salesforce so it is ready to be sent to Amazon S3.
  4. Upload file to encrypted S3 bucket. Upload each downloaded attachment to Amazon S3 using file contents so the archive is complete and encrypted for long-term storage.