Route webhook events to conditional Amazon S3 file operations

Developer ToolAPI IntegrationMarketingRecipe ToolsData ParserUtilitiesDocument/File

What it does

When a new event arrives via HTTP webhook, this automation evaluates the request type and conditionally uploads, downloads, or deletes files in Amazon S3. The operation performed depends on which scenario the webhook specifies.

Who it's for

Engineering teams who manage Amazon S3 files based on real-time webhook events without manual intervention.

How teams use this

Upload files with validation checks

When a webhook arrives with upload_file_empty_required_fields, validate the payload and upload the file to Amazon S3 only if required fields are present. This prevents incomplete records from being stored.

Route uploads to accelerated endpoints

When a webhook specifies upload_file_accelerated_endpoint, upload the file using Amazon S3 accelerated transfer for faster delivery. The same automation handles both standard and accelerated uploads.

Clean up files after processing

Add a condition to download file contents from Amazon S3 and then delete the file or folder once processing is complete. This keeps the bucket organized and reduces storage costs.

Parse CSV files before upload

Include CSV parsing to validate file format before uploading to Amazon S3, ensuring only properly formatted files are stored. This requires adding a parse step after the webhook receives the event.

How it works

  1. Receive the webhook event. A new HTTP webhook event arrives with a request type that determines which Amazon S3 operation to perform next in this automation.
  2. Upload file when validation passes. If the webhook specifies upload_file or upload_file_empty_required_fields, upload the file contents into the Amazon S3 bucket using File.
  3. Download or delete based on request. If the webhook specifies upload_file_accelerated_endpoint, download file contents from Amazon S3 using File or delete the file or folder as needed.