Extract attachment paths in queue item

Hi Team ,

I have to store different component of emails(sender address , subject etc.) as queue items.Each queue item equals to each email.Now for attachments , i have to store the paths in queue item.

There can be multiple attachments for one email.So how can I store the attachment paths of each attachment as one component of a queue item (for each email , one queue item and for multiple attachments → each attachment path separated by a semicolon probably?)

Can you please help me on this

Regards,
Gokul

Hey @gokul1904

You need to iterate through each email and use Add Queue Item activity.

Or else you can get all emails and query it to form a datatable which can be added with Bulk Add Queue Items activity.

Hope that helps.

Thanks
#nK

Hi Nithin,

Thank you for the response.
But how should I get all the attachment paths for each email and store it as values separated by semi colon for each queue item

Regards,
Gokul

step 1 ; read the email

step 2 ; save the attachment with save attachment activity input is folder path

step 3 ; retrieve the latest file from the directory str_filepath = Directory.GetFiles(yourfolder_path,“.”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

create a dictionary with dictionary_var= new dictionary(of string,object)

dictionary(“path”)= file path

give your dictionary as input in add queue item

Hey Please check this, Inside ForEach

image

str_Attachments = string.Join(";",item.Attachments.Select(Function(att) att.Name))

Thanks
#nK

It worked thanks!

Cool, Thanks :slightly_smiling_face::+1:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.