简体   繁体   中英

How to move files attached to mail to a VM on Azure

so I'm new to Azure and I need to create a service that when given an office365 email (subscriber) will Automatically move files attached to new mails of the subscriber to VM on azure and then run some tests on them there (inside the VM). The only way I found to implement it so far is creating a logic-app for each subscriber which is done manualy.

Any help would be appreciated!

Few things if you want to get started.

  1. Create the logic app that stores attachments to the database when a new email is received for a specific user
  2. Add some parameters to your logic app so user email/credentials/tenant are not hard coded. https://blog.mexia.com.au/preparing-azure-logic-apps-for-cicd
  3. Create an ARM Template to deploy this logic app.
  4. Create another logic app that will deploy the previous logic app.
  5. Whenever a new user is created, call the second logic.

Also do you really need to store your files in a database ? As an alternative you can use Azure Blob Storage to store all these files.

EDIT If you need to move the files to a VM, I would suggest you to do this:

  • When you receive an email
    1. Store the attachments in Blob storage.
    2. Generate a SAS Token (with Read permission)
    3. Put the URL + Sas Token of your file into aan Azure Servicebus Queue.
    4. On the VM, Have a service that reads messages from the queue and download files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM