Variable Subject Line

Post Reply
bpletka
Newbie
Posts: 10
Joined: Tue Sep 21, 2021 12:00 am

Variable Subject Line

Post by bpletka »

Newbie needs some assistance, please

I am in need of creating a variable subject line for an email based on the file extension, [Job.Extension].

There are 2 types of files, text (.txt) and pdf (.pdf). It would be a basic subject line would be, "A new text file is available" or "A new pdf file is available" based on that extension type.

Thanks for any help or direction you can provide.
bsbertolani
Newbie
Posts: 4
Joined: Thu May 19, 2022 10:08 am
Location: Germany
Contact:

Re: Variable Subject Line

Post by bsbertolani »

I don't know precisely how you gonna use it but it seems that you can fix or build a solution without coding.
User avatar
billy.olvestad
Member
Posts: 54
Joined: Mon Nov 19, 2018 10:08 pm
Location: Sweden
Contact:

Re: Variable Subject Line

Post by billy.olvestad »

You can do that without scripting.

I have attached a sample flow that does this.

First it separates the files on three branches. One for PDF-files, one for text files and one for all other types of files.
Click the individual arrows and look at the property window. Under "include these jobs" it has "file types defined" and each file type chosen, and for the middle one "all other jobs".

It then sets a private data variable named "subject" for each type, with the corresponding subject text line (coloured the folders blue to illustrate which ones I am talking about). Click the folders and look at the property window, and you will see that under "set job private data" it has "multi-line text with variables" chosen, and if you hover over that for a while you will see the variable written. You can of course change that text.

In the last step I just inserted a dummy "mail send" configurator to show the private data variable chosen in the properties. Under "subject" it has "single-line text with variables defined". The code there is [Job.PrivateData:Key="subject"] to make Switch insert the private data variable into the subject.
Attachments
subject_line.png
subject_line.png (30.65 KiB) Viewed 1887 times
subject_line.zip
(8.52 KiB) Downloaded 148 times
bpletka
Newbie
Posts: 10
Joined: Tue Sep 21, 2021 12:00 am

Re: Variable Subject Line

Post by bpletka »

Thank you. I was able to create a variable subject line based on the extension. No scripting needed!
Post Reply