Alert on incorrect CSV file in SFTP
File TransferRecipe ToolsMarketing
What it does
When a new or updated file appears in an SFTP directory, this automation checks if the filename ends with .csv. If not, it waits two hours, checks again, and sends an email notification so someone knows the file needs to be corrected.
Who it's for
Operations teams who monitor SFTP uploads and need to catch malformed CSV files before processing.
How teams use this
Catch and flag malformed CSV uploads
Detect files without the .csv extension as soon as they land in SFTP, wait for a correction window, and notify the team if the file is still wrong after two hours.
Route incorrect files to quarantine
Move invalid CSV files to a separate quarantine directory instead of leaving them in the main upload folder. Set the quarantine path in the rename step so the team can review and fix them separately.
Escalate repeated failures to manager
Send the email notification to a manager or team lead when the same file fails validation twice. Add a failure count condition so urgent attention is triggered for persistent upload issues.
How it works
- Monitor SFTP directory for new files. Watch an SFTP server directory for any new or updated file so the automation can validate its format.
- Check if filename ends with .csv. Test the filename to see if it has the .csv extension. If yes, the file is valid. If no, move to the next step.
- Wait two hours before rechecking. Pause for two hours to give someone time to correct the file before this automation checks the SFTP directory again.
- List files and verify corrected file. Search the SFTP directory for a file matching the original name to see if it was fixed and uploaded with the correct extension.
- Move incorrect file and send alert. Rename or move the malformed file to a separate location, then send an email alert so someone knows the CSV file was invalid.