work queue - with emails?

hi. i am new to this and wonder how i am proceeding this. this is my first "real" process that i am making.


the process is going to download an excel document, and download it to a folder.

i have done queues before, but only with excel documents. how do i queue up emails? i am thinking that i am identifying them and then queue them up one at a time just before the process is processing the specific email

but how do i queue them up correctly?
 

Pete_L

Active Member
Do you mean that you need to open emails that contain an Excel attachment and load the contents of the attachment to a work queue?
 
Do you mean that you need to open emails that contain an Excel attachment and load the contents of the attachment to a work queue?
yes, the email contains an Excel attachment.

i dont want to load the content of the attachment into a queue. i want to load the emails as items in a work queue.

i am not going to process anything in the attachment, only transfer the attachment into a sharepoint folder

edit: i am thinking that i can load the subject of the email into a queue, and then tag the queue item with the subject, and then proceed with moving the excel attachment to sharepoint. when the excel document is moved, i do the same thing with the next one.
 
Last edited:

Pete_L

Active Member
I suppose you could use the MS Outlook Email VBO's Get Received Items action to get the emails into a collection, then loop through the collection and use the Save Attachment or Save Attachments action in the same VBO to save the attachment directly to the Sharepoint folder. No need for a work queue with this method.
 
I suppose you could use the MS Outlook Email VBO's Get Received Items action to get the emails into a collection, then loop through the collection and use the Save Attachment or Save Attachments action in the same VBO to save the attachment directly to the Sharepoint folder. No need for a work queue with this method.

okay thanks i will take a look at Ms outlook email VBO. first time using it.
i still have some questionmarks i need to figure out. for example, the subject name is changing for each email. how can i come around this problem, when using get received items?
 
Last edited:

Pete_L

Active Member
Does the email address also receive emails with attachments that you don't want to save to SharePoint? If so, hopefully there is some text in the Subject line that you can use to indicate that the email contains an attachment that you do want to save. Then, it is simply a matter of specifying the Subject text (using the * wildcard if needed) for the emails that you do want to save and skipping that email if it doesn't match. If you only get emails that you want to save the attachments for, then as long as the Attachments output parameter is not null you would just save the attachment.
 
Does the email address also receive emails with attachments that you don't want to save to SharePoint? If so, hopefully there is some text in the Subject line that you can use to indicate that the email contains an attachment that you do want to save. Then, it is simply a matter of specifying the Subject text (using the * wildcard if needed) for the emails that you do want to save and skipping that email if it doesn't match. If you only get emails that you want to save the attachments for, then as long as the Attachments output parameter is not null you would just save the attachment.

i am not receiving mails with attachments that i dont want to save. and only 1 attachment per mail. the subject name always has the same name as the attachment.

but the problem i have right now is to use MS outlook VBO - get received items (basic). i am currently just testing with another email adress just to get it to work but i can't succeed.


this is what i have done: i used MS outlook VBO - get received item (basic). i filled in sender email, include read - true, include unread - true. also outputs to a collection and item count data item.
but when i test this, it shows 0 items even though i have 1 email from the sender email that i entered. why? i have been trying for hours now.
 
Last edited:

Pete_L

Active Member
That configuration looks like it should return ALL emails. Are your True values spelled correctly (with uppercase T)? BTW, if you leave them blank, they will default to True. The only thing I can think of is that the email address you're using to test with is not valid. Try putting "*" as the filter value for Subject.
 
That configuration looks like it should return ALL emails. Are your True values spelled correctly (with uppercase T)? BTW, if you leave them blank, they will default to True. The only thing I can think of is that the email address you're using to test with is not valid. Try putting "*" as the filter value for Subject.

i now have a clue what i am doing. i have now put the email into the work queue. next problem is that all the attachments has the same identical name. how can i change the name in a correct way? i want the name to be v1.0, v2.0, v3.0 etc. the default name in the email is v1.0, in every mail i get.
 
Last edited:

Pete_L

Active Member
As you're saving each attachment to the SharePoint folder, keep track of the version number (v2.0, v3.0, etc) that you assign. You can replace the "v1.0" on the incoming filename with the next version number when you assign the filename on the Save..
 
As you're saving each attachment to the SharePoint folder, keep track of the version number (v2.0, v3.0, etc) that you assign. You can replace the "v1.0" on the incoming filename with the next version number when you assign the filename on the Save..
thanks, i now got this part right

next problem is changing the name of the attachment.
it arrives as a format of "v1.0" every time. i want to change this to v2.0, v3.0 etc. how do i change the name of the file? i can now keep track of what the file name should be
 
Last edited:

Pete_L

Active Member
When you save the attachment using the Save Attachment action of the MS Outlook Email VBO, you need to provide the filename. In a calc stage, use Replace([Filename], "v1.0", [Next Version Number]) to replace "V1.0" with the next version number "V2.0" found in the Next Version Number data item. In the File Name input parameter, use the data item name where you are storing the updated name after the replacement in the calc state.
 
When you save the attachment using the Save Attachment action of the MS Outlook Email VBO, you need to provide the filename. In a calc stage, use Replace([Filename], "v1.0", [Next Version Number]) to replace "V1.0" with the next version number "V2.0" found in the Next Version Number data item. In the File Name input parameter, use the data item name where you are storing the updated name after the replacement in the calc state.
thanks. i tried this but ms outlook save attachment ignores my new file name which i store in a data item after the calc stage. it takes the old file name from the entry ID and ignores my file name input
 
View attachment 1594188334413.png
i am not getting any error messages, but the save attachment object is ignoring my file name input. i have also tried to put the renamed file name in the collection (where i get the entry ID) it changes the name in the collection but ms save attachment will still get the old name
 

Pete_L

Active Member
The File Name input must include the extension (.xlsx, .pdf, etc.). It looks like that might be the problem here, as the data item shows there is no extension on the filename.
 

DALAMA

New Member
Hi i'm doing something similar. But I need to save the information in a queue. I dunno what can I use for my Item Key because all the subjects are not unique. Also I don't know if my email will have 1 or more attachments. I will only save the ones that have attachments in my queue. Any example or advice for the item key?
 
Top