SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Sponsor:

Would you like to sponsor this site?
Or buy me a beer?:


Recently Changed Pages:

View All Pages
View All Q Pages


View All Tags


Sign up for Q to post comments.





WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Terms And Conditions for Q users


Pages with comments

PageDateDiscussionTags
2019/06/22 10:36 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments

flow

Use Microsoft Flow for handling Email

On this page you'll see the flows I created for automatic email handling. The following functionality is used:

  • Detect a new mail in a shared Office 365 email box
  • Check for advanced options in the email like sender address, subject and if the email has an attchment
  • Get the attachment and save it in Sharepoint Online
  • If the folder dows not exist, create it with a name like year-month format
  • Use a condition on the body part of the email
  • Save an email on SharePoint Online with the current date in the filename
  • Mark the email as red

I used two flows for this.

Trigger

The trigger is a new mail in a shared mailbox with some advanced checks:
flow-01.jpg

Action 1 - Save Attachment

The first flow saves the attachment on a location in sharepoint online:

flow-02.jpg

When creating a file on sharepoint, if the folder does not exist, follow these steps to have SharePoint automatically create the folder for you:

  • At the site address, Choose to enter a custom value like: https://getshifting.sharepoint.com/teams/ICT/
    • Be sure to add a / at the end of the address
  • Then in the folder path, enter the folder structure as it should be, including the new folder and be sure to remove any trailing /
Currently, adding and removing / does not seem required anymore. It just works now.

It is possible to have a custom name depending on the date, use the expression option for that and use an expression like: formatDateTime(utcNow(), 'yyyy-MM-dd').

Action 2 - Save Email

Depending if a specific line in the subject of the mail is found, the mail gets saved to sharepoint and marked as read, or is only marked as read:

flow-03.jpg

Action - Do not save .png Attachments

When handling html email sometimes signatures (or included html objects) are also handled. Based on your specific files you can skip these files so they do not get saved. See below the start of a flow that skips attachments with the “Attachment Name” that contains: .png:

flow-04.jpg

Resources

You could leave a comment if you were logged in.
flow.txt · Last modified: 2019/02/19 16:06 by sjoerd