Attach metadata from multiple files to e-mail

Post Reply
LasseThid
Advanced member
Posts: 353
Joined: Tue Mar 03, 2015 2:30 pm
Location: Molndal, Sweden

Attach metadata from multiple files to e-mail

Post by LasseThid »

I need to extract a metadata/private data key from one or more files and attach that info to an e-mail.

I was thinking I can use Condition with variables defined ([Job.IsFolder] = True) to check whether or not a folder or a single file was submitted to the flow. If it's a folder I can then set [Job.FileCount] as a Private Data key to track how many files were submitted.
I could then add a Hold job with the release condition [Job.FileCount] equals the private data key to make sure I have all files belonging to the job in the hold folder before I release them to the next folder, but how can I add the metadata/private data key I need to a text file that I can then use as the body text for an email?

Thanks in advance
Lasse
Enfocus Switch, Enfocus PitStop Server, Enfocus PDF Review, HP SmartStream& Kodak Prinergy with RBA
Offset 72x102, Offset Large Format, Digital Large Format and Digital print.
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Attach metadata from multiple files to e-mail

Post by jan_suhr »

Hi Lasse,


Try my app "Take Notes" it will let you use metadata as Datasets or XML files and store it. Then you add one more "Take Notes" who will pick up some other metadata and you can then add that to the metadata you picked up in the previous one. By building a chain of Take Notes you can add as much metadata you want. It can add to an existing dataset or create new ones for each pickup.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Attach metadata from multiple files to e-mail

Post by Padawan »

Starting from version 18 of Switch you can also add private data to jobs via the "Set Job Private Data" property which is added to intermediate folders.

If the issue is the retrieving of the Private Data, you can use Switch variables in mail templates. So adding the [Job.PrivateData:Key="MyPrivateDataKey"] variable to the mail template should do the trick.
LasseThid
Advanced member
Posts: 353
Joined: Tue Mar 03, 2015 2:30 pm
Location: Molndal, Sweden

Re: Attach metadata from multiple files to e-mail

Post by LasseThid »

I have x files coming into a flow and I need to pick up the same metadata from each file and send all of the metadata in one mail instead of sending x mails. (x ranging from 1 to infinity... :lol: )
Enfocus Switch, Enfocus PitStop Server, Enfocus PDF Review, HP SmartStream& Kodak Prinergy with RBA
Offset 72x102, Offset Large Format, Digital Large Format and Digital print.
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Attach metadata from multiple files to e-mail

Post by Padawan »

If you want metadata from all jobs and the metadata is on a different place, then you can assemble the files with Merge Metadata set to Yes and you will have everything.

You mention that it is the same metadata, so Merge Metadata will overwrite some and only keep the metadata of one input file. But is it possible to use different identifiers in the incoming meatadata so they won't overwrite when you merge metadata with Assemble Job?

If that is not possible, then I think you will need a custom script element. It will need to be able to Assemble Jobs, but before Assembling the job gather all the metadata which needs to be gathered from the incoming file and restructure it so the outgoing job folder has all the metadata.
Post Reply