Templates / Salesforce to S3 file migration & cleanup

Salesforce to S3 file migration & cleanup

Ready for 3.0

by Le Nguyen ✓ · 180 views · created 2025-07-23 · File Management

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 11 nodes and runs on a schedule (every day). Along the way it connects AWS S3, Salesforce and Slack.

How it runs

Trigger: On a schedule (every day).

  1. Get All ContentDocuments older than 365 days ago (Salesforce): uses Salesforce
  2. Loop Over Each File Record (Loop Over Items (Split in Batches)): loops over the items in batches
  3. Send Slack Notification (Slack): uses Slack
  4. Download File Content (HTTP Request): calls an HTTP API
  5. Upload to S (AWS S3): uses AWS S3
  6. Get LinkedEntityId from ContentDocumentLink (Salesforce): uses Salesforce
  7. Filter Out User Attachments (Code): runs custom JavaScript code
  8. Create S3_File__c Record (Salesforce): uses Salesforce
  9. Prepare ContentDocumentId for Deletion (Code): runs custom JavaScript code
  10. Delete Original File in Salesforce (HTTP Request): calls an HTTP API

Services it uses

AWS S3SalesforceSlack

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (7)

From the author

Salesforce to S3 File Migration & Cleanup Automate archiving old Salesforce files to Amazon S3, log them back in Salesforce, and free up org storage — all from a scheduled n8n workflow. --- 🔧 How It Works (High-Level) 1. Schedule Trigger kicks off (e.g.,…

Excerpt from Le Nguyen's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.