Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


nrustad
2022-08-26T15:05:06Z
VisualCron 9.9.5

I am trying to setup a task to download email attachments and then rename the file based on the email subject.
Downloading the attachments works fine but I'm unsure what the best way to capture the email subject is and then rename the attachment using that info.

Is there a preset variable\method for doing this?
Sponsor
Forum information
Jon Tofte-Hansen
2022-08-31T15:20:26Z
Hi

I am not aware of any possibility to directly manipulate the attachment file names at download.

But you could set up a job with:
1: an "Email - Get headers" task, that fetch subject names of the relevant mails for download.
2: a loop on the output of 1 with:
a: an "Email - Get messages" task (that downloads the attachments)
b: a file rename task where you could add the subject to the file names.

In the loop settings you use """ as text qualifier. Choosing column 2 you then get the subject in the variable {LOOP(CurrentValueX)}. This might be relative to the output of the specific mail server.

Hope that helps.
Michael Fjellström
2022-11-11T14:28:23Z
Originally Posted by: Jon Tofte-Hansen 

Hi

I am not aware of any possibility to directly manipulate the attachment file names at download.

But you could set up a job with:
1: an "Email - Get headers" task, that fetch subject names of the relevant mails for download.
2: a loop on the output of 1 with:
a: an "Email - Get messages" task (that downloads the attachments)
b: a file rename task where you could add the subject to the file names.

In the loop settings you use """ as text qualifier. Choosing column 2 you then get the subject in the variable {LOOP(CurrentValueX)}. This might be relative to the output of the specific mail server.

Hope that helps.



Thanks for the help and contribution, Jon Tofte-Hansen.
Scroll to Top