Search code examples
amazon-s3outlook

Send Email attachment to S3 bucket


I need to upload the attachment which is received outlook email to amazon s3 bucket.

  • The email with attachment is received once per day
  • Is there any process which can automate this process of uploading it to specific s3 bucket?

I have tried to search for any available add-ins in outlook.


Solution

  • If you're working in a corporate setting, it is possible to achieve this with Microsoft PowerAutomate + AWS CLI:

    1. First, you need to automatically save the attachment to onedrive or sharepoint. To do this, create a Power automate flow with an outlook email trigger and an outlook/sharepoint create file action.

    2. Have your onedrive/sharepoint folder synced locally and use AWS CLI with Windows Task Scheduler to schedule commands to send local files to the cloud, such as aws s3 cp <origin> <target>.

    Note: This is not the best nor the most efficient solution. But its the one that worked for me with limited usage of third party apps and limited VBA skills.