1.when a new email arrives(V3)--options details are Inbox folder selected;only with attachments-yes
2.HTML to text->Body
3.compose 2 blank space
4.compose 3-split(outputs('Html_to_text')?['body'],outputs('Compose_2'))
5.Initialize variable-subfolders array
6.Initialize variable-varcountry ,Type-string,value-last(split(outputs('Compose_3')[2],':'))
7.Initialize variable 2-varclient ,Type-string,value-last(split(outputs('Compose_3')[2],':'))
8.conditions
or --- operation
subject contains new
subject contains renewal
subject contains approval
subject contains completed
yes(branch)
Applytoeach
select an output-attachments
get attachments-
messageid:MessageID
AttachmentID-Attachment
Create sharepoint item for Year folder
Create sharepoint item for month folder
Create sharepoint item for country folder
create sharepoint item for customer folder
set variable
Name:subfolders
Value:["new",]
apply to each
select an output-subfolders
create new folder
case equals new
apply to each
select an output-attachments
get attachment v2
messageid- messageid
attachmentid-attachment
Apply to each
create file