SOLVED
Home

Flow to extract attachments from Inbox

%3CLINGO-SUB%20id%3D%22lingo-sub-401876%22%20slang%3D%22en-US%22%3EFlow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-401876%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20Outlook%20Inbox%20that%20has%20a%20subfolder%20in%20this%20that%20contains%20lots%20of%20emails%20with%20attachments%20on%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20want%20to%20be%20able%20to%20extract%20the%20attachment%20from%20these%20emails%20and%20save%20them%20into%20a%20folder.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20believe%20we%20can%20do%20this%20for%20new%20emails%20coming%20into%20the%20inbox%20using%20flow%20but%20anyone%20know%20if%20its%20possible%20to%20run%20flow%20or%20something%20else%20to%20extract%20the%20attachments%20that%20are%20already%20sitting%20in%20the%20email%20folder%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-401876%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-402228%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-402228%22%20slang%3D%22en-US%22%3EA%20couple%20of%20quick%20ideas%20%2F%20options%3A%3CBR%20%2F%3E%3CBR%20%2F%3E1%20-%20Create%20another%20new%20folder%20under%20Inbox%2C%20configure%20the%20Flow%20to%20run%20against%20that%20new%20folder%2C%20then%20move%20all%20the%20existing%20emails%20to%20the%20new%20folder%20-%20so%20the%20Flow%20triggers%20on%20them.%3CBR%20%2F%3E%3CBR%20%2F%3E2%20-%20Create%20a%20Flow%20that%20is%20triggered%20manually%20(or%20on%20a%20schedule)%2C%20and%20points%20at%20the%20folder%20-%20this%20Flow%20would%20need%20to%20have%20steps%20something%20like%20this%3A%3CBR%20%2F%3E%3CBR%20%2F%3E-%20Get%20items%20in%20folder%20that%20have%20attachments%3CBR%20%2F%3E-%20For%20each%2C%20get%20the%20attachment%20and%20save%20it%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-443042%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-443042%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F506%22%20target%3D%22_blank%22%3E%40Rob%20Ellis%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20setting%20up%20your%20ideas%2C%20however%20it%20doesn't%20seam%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20seams%20to%20happen%20is%20that%20if%20I%20manually%20copy%201%20email%20into%20the%20subfolder%20and%20then%20MANUALLY%20run%20the%20flow%20it%20will%20copy%20the%20attachment%20to%20a%20sharepoint%20or%20onedrive%20site%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%20if%20I%20copy%202%20or%203%20email%20it%20and%20then%20manually%20run%20it%20will%20only%20copy%20the%20attachment%20from%20the%20%22newest%22%20email%2C%20it%20will%20ignore%20the%20other%20emails.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20NEVER%20run%20automatically.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAttached%20are%20screen%20shots%20of%20what%20I%20have%20done%20-%20any%20ideas%20on%20how%20to%20get%20this%20working%20would%20be%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20902px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F108390iA036C694B3703637%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22tempsnip.png%22%20title%3D%22tempsnip.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20944px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F108391iEEC4E95BC443A157%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22tempsnip2.PNG%22%20title%3D%22tempsnip2.PNG%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-443206%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-443206%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F272339%22%20target%3D%22_blank%22%3E%40Pn1995%3C%2FA%3E%26nbsp%3BIt%20is%20likely%20that%20the%20trigger%20does%20not%20occur%20when%20you%20move%20an%20existing%20email%20into%20the%20folder%20-%20try%20configuring%20an%20Outlook%20rule%20to%20move%20messages%20into%20that%20folder%20when%20received%2C%20then%20send%20a%20test%20email.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20dealing%20with%20existing%20emails%20in%20the%20folder%2C%20my%202nd%20option%20would%20be%20the%20one%20to%20go%20for%2C%20I%20think.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20would%20need%20to%20be%20triggered%20manually%20or%20on%20a%20schedule%2C%20and%20use%20the%20action%20'get%20emails'%20(not%20'get%20email'%20-%20because%20you%20want%20more%20than%201)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-444196%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-444196%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F506%22%20target%3D%22_blank%22%3E%40Rob%20Ellis%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20Rob%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20to%20get%20emails%20but%20it%20still%20seams%20to%20do%20the%20same%20thing.%20When%20I%20manually%20trigger%20(I%20guess%20you%20mean%20just%20press%20Test)%20it%20only%20ever%20seams%20to%20look%20at%201%20email%20in%20the%20folder%20not%20all%20of%20the%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20my%20setup...any%20other%20suggestions%20would%20be%20appreciated%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20745px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F108419i130F052798EDDBC1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.PNG%22%20title%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20740px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F108420i7879308A46C4BAE2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22tempsnip2.png%22%20title%3D%22tempsnip2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-444388%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-444388%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F272339%22%20target%3D%22_blank%22%3E%40Pn1995%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20using%20a%20shared%20mailbox%2C%20I'm%20testing%20with%20my%20user%20mailbox%2C%20so%20the%20trigger%20I%20have%20is%20'when%20an%20email%20is%20received'%20-%20but%20using%20the%20action%20as%20per%20below%2C%20if%20I%20move%20an%20unread%20email%20or%20a%20read%20email%20from%20another%20folder%20into%20the%20'Processed'%20folder%20-%20the%20flow%20triggers%20and%20saves%20out%20the%20attachment%20every%20time%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20498px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F108422iB54DDD4456A256FE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-04-12_13-02-04.png%22%20title%3D%222019-04-12_13-02-04.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20in%20theory%20that%20would%20work%20if%20you%20created%20a%20new%20folder%20and%20had%20that%20flow%20trigger%20on%20the%20new%20folder%2C%20then%20moved%20emails%20from%20another%20folder%20into%20the%20new%20folder.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'll%20give%20it%20a%20go%20using%20a%20shared%20mailbox%20-%20BRB.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-444536%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-444536%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F506%22%20target%3D%22_blank%22%3E%40Rob%20Ellis%3C%2FA%3E%2C%26nbsp%3BI%20guess%20the%20main%20issue%20we%20are%20having%20is%20that%20it%20doesn't%20seam%20to%20trigger%20if%20more%20than%201%20email%20is%20moved%20-%20ie%20if%20we%20move%20or%20copy%203%2C%204%20or%205%20emails%20it%20only%20every%20processes%20the%20%22newest%22%20one%20of%20those%20mails.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20we%20can't%20seam%20to%20get%20it%20to%20look%20at%20a%20existing%20mailbox%20that%20has%20the%202000%20attachments%20in%20there%20and%20process%20more%20than%201%20of%20those%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-444557%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-444557%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F506%22%20target%3D%22_blank%22%3E%40Rob%20Ellis%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20guess%20the%20main%20issue%20is%20that%20it%20needs%20to%20trigger%20if%20we%20copy%20or%20move%20more%20than%201%20email%20at%20a%20time%20in%20there%20and%20it%20doesn't%20seam%20to%20do%20that.%20It%20only%20every%20saves%20the%20attachment%20of%20the%20latest%20email%2C%20So%20if%20you%20copy%20day%205%20mails%20into%20the%20folder%20only%20mail%201%20will%20have%20its%20attachment%20saved%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20folder%20we%20want%20to%20process%20the%20attachment%20in%20has%202000%20emails%2C%20and%20we%20can't%20seam%20to%20get%20it%20to%20analyse%20this%20folder%20and%20extract%20from%20there%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-444738%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-444738%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F272339%22%20target%3D%22_blank%22%3E%40Pn1995%3C%2FA%3E%26nbsp%3BI%20can%20see%20that%20issue%2C%20agreed%20-%20it%20only%20triggers%20on%20the%20most%20recent%20email%20-%20including%20if%20using%20an%20Outlook%20rule%20to%20move%20the%20emails%20into%20the%20folder.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%20a%20manually%20triggered%20flow%20like%20this%20will%20do%20what%20you%20need%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(Note%20I%20have%20mine%20set%20to%20only%20get%20unread%20emails%2C%20and%20limit%20to%2010%20-%20so%20you%20will%20need%20to%20increase%20that)%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20452px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F108428iDDD88A9F3547313B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-04-12_14-04-45.png%22%20title%3D%222019-04-12_14-04-45.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-444909%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-444909%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20again%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F506%22%20target%3D%22_blank%22%3E%40Rob%20Ellis%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20just%20to%20confirm%20in%20order%20for%20it%20to%20%22process%22%20more%20than%201%20email%20you%20are%20suggesting%20that%20I%20need%20to%20created%20a%20%22Apply%20to%20each%22%20action%20-%20so%20if%20I%20want%20to%20process%2010%20emails%20create%2010%20%22Apply%20to%20each%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20in%20the%20%22Get%20Email%22%20%22Top%22%20field%20were%20you%20have%2010%2C%20isn't%20there%20a%20limit%20of%2025%20to%20that%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-444986%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-444986%22%20slang%3D%22en-US%22%3ENo%20-%20the%20'apply%20to%20each'%20required%20are%20automatically%20added%20by%20Flow%20when%20it%20detects%20that%20you%20are%20using%20an%20output%20that%20is%20an%20array%20-%20e.g.%20if%20you%20use%20an%20output%20from%20'get%20emails'%20(rather%20than%20get%20email)%20-%20the%20action%20is%20automatically%20put%20inside%20a%20'apply%20to%20each'.%3CBR%20%2F%3E%3CBR%20%2F%3EBasically%2C%20you%20Flow%20would%20need%20to%20look%20almost%20identical%20to%20mine%2C%20in%20terms%20of%20blocks%2C%20at%20least.%3CBR%20%2F%3E%3CBR%20%2F%3ERegarding%20the%20limit%20on%20number%20of%20emails%20it%20will%20get%20-%20I'm%20not%20sure%2C%20but%20it%20would%20be%20easy%20to%20test.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20do%20find%20there%20is%20a%20limit%2C%20you%20may%20need%20to%20move%20batches%20of%20emails%20into%20a%20folder%2C%20and%20run%20the%20Flow%20multiple%20times.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-445511%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-445511%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F506%22%20target%3D%22_blank%22%3E%40Rob%20Ellis%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20a%2025%20checking%20limit%20-%20which%20is%20very%20annoying%20but%20the%20flow%20does%20work%20-%20cheers%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1158700%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20to%20extract%20attachments%20from%20Inbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1158700%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F272339%22%20target%3D%22_blank%22%3E%40Pn1995%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20can%20use%26nbsp%3B%20Instant%20Flow%20--%26gt%3B%26nbsp%3B%3CSPAN%3EWhen%20an%20email%20is%20flagged%20--%26gt%3B%20Save%20attachment%26nbsp%3B%20to%20One%20Drive%20folder.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAfter%20creating%20flow%20select%20all%20mails%20and%20add%20flag%20then%20the%20flow%20will%20run%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fhtml%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20Did%20this%20one%20for%201500%20mails%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Lakshman_Kanth_0-1581088812931.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F169691i517285703824EE44%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Lakshman_Kanth_0-1581088812931.png%22%20alt%3D%22Lakshman_Kanth_0-1581088812931.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20%2C%3C%2FP%3E%3CP%3ELK%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Pn1995
Contributor

Hi

 

We have a Outlook Inbox that has a subfolder in this that contains lots of emails with attachments on them.

 

We want to be able to extract the attachment from these emails and save them into a folder.

 

We believe we can do this for new emails coming into the inbox using flow but anyone know if its possible to run flow or something else to extract the attachments that are already sitting in the email folder?

 

Thanks

12 Replies
Highlighted
A couple of quick ideas / options:

1 - Create another new folder under Inbox, configure the Flow to run against that new folder, then move all the existing emails to the new folder - so the Flow triggers on them.

2 - Create a Flow that is triggered manually (or on a schedule), and points at the folder - this Flow would need to have steps something like this:

- Get items in folder that have attachments
- For each, get the attachment and save it
Highlighted

Thanks @Rob Ellis

 

I have been setting up your ideas, however it doesn't seam work.

 

What seams to happen is that if I manually copy 1 email into the subfolder and then MANUALLY run the flow it will copy the attachment to a sharepoint or onedrive site

 

However if I copy 2 or 3 email it and then manually run it will only copy the attachment from the "newest" email, it will ignore the other emails.

 

It NEVER run automatically. 

 

Attached are screen shots of what I have done - any ideas on how to get this working would be appreciated.

 

tempsnip.pngtempsnip2.PNG 

Highlighted

@Pn1995 It is likely that the trigger does not occur when you move an existing email into the folder - try configuring an Outlook rule to move messages into that folder when received, then send a test email.

 

For dealing with existing emails in the folder, my 2nd option would be the one to go for, I think.

 

That would need to be triggered manually or on a schedule, and use the action 'get emails' (not 'get email' - because you want more than 1)

Highlighted

@Rob Ellis 

 

Thanks again Rob

 

I tried to get emails but it still seams to do the same thing. When I manually trigger (I guess you mean just press Test) it only ever seams to look at 1 email in the folder not all of the,

 

This is my setup...any other suggestions would be appreciated

 

Capture.PNGtempsnip2.png

Highlighted

@Pn1995 

I'm not using a shared mailbox, I'm testing with my user mailbox, so the trigger I have is 'when an email is received' - but using the action as per below, if I move an unread email or a read email from another folder into the 'Processed' folder - the flow triggers and saves out the attachment every time:

 

2019-04-12_13-02-04.png

 

so in theory that would work if you created a new folder and had that flow trigger on the new folder, then moved emails from another folder into the new folder.

 

I'll give it a go using a shared mailbox - BRB.

Highlighted

Thanks @Rob Ellis, I guess the main issue we are having is that it doesn't seam to trigger if more than 1 email is moved - ie if we move or copy 3, 4 or 5 emails it only every processes the "newest" one of those mails.

 

and we can't seam to get it to look at a existing mailbox that has the 2000 attachments in there and process more than 1 of those

Highlighted

Thanks @Rob Ellis 

 

I guess the main issue is that it needs to trigger if we copy or move more than 1 email at a time in there and it doesn't seam to do that. It only every saves the attachment of the latest email, So if you copy day 5 mails into the folder only mail 1 will have its attachment saved

 

The folder we want to process the attachment in has 2000 emails, and we can't seam to get it to analyse this folder and extract from there

Highlighted

@Pn1995 I can see that issue, agreed - it only triggers on the most recent email - including if using an Outlook rule to move the emails into the folder.

 

Using a manually triggered flow like this will do what you need

 

(Note I have mine set to only get unread emails, and limit to 10 - so you will need to increase that):

2019-04-12_14-04-45.png

Highlighted

Thanks again @Rob Ellis 

 

So just to confirm in order for it to "process" more than 1 email you are suggesting that I need to created a "Apply to each" action - so if I want to process 10 emails create 10 "Apply to each"

 

Also in the "Get Email" "Top" field were you have 10, isn't there a limit of 25 to that?

Highlighted
Solution
No - the 'apply to each' required are automatically added by Flow when it detects that you are using an output that is an array - e.g. if you use an output from 'get emails' (rather than get email) - the action is automatically put inside a 'apply to each'.

Basically, you Flow would need to look almost identical to mine, in terms of blocks, at least.

Regarding the limit on number of emails it will get - I'm not sure, but it would be easy to test.

If you do find there is a limit, you may need to move batches of emails into a folder, and run the Flow multiple times.
Highlighted

Thanks @Rob Ellis

 

There is a 25 checking limit - which is very annoying but the flow does work - cheers 

Highlighted

@Pn1995 

 

We can use  Instant Flow --> When an email is flagged --> Save attachment  to One Drive folder.

 

After creating flow select all mails and add flag then the flow will run:smile:

 

I Did this one for 1500 mails 

 

Lakshman_Kanth_0-1581088812931.png

 

Thanks ,

LK

Related Conversations
Flow approvals
chrisjones2020 in Office 365 on
0 Replies
Form -> Flow -> Manager ->Response
Anatoly123 in Microsoft Forms on
1 Replies
Teams adaptive card scaling is off on IOS
FinnHat in Teams Developer on
2 Replies
Assign E3 plan to user for unattended use?
baouss in Office 365 on
2 Replies