Attach metadata from multiple files to e-mail

Post Reply
LasseThid
Member
Posts: 182
Joined: Tue Mar 03, 2015 2:30 pm
Location: Molndal, Sweden

Attach metadata from multiple files to e-mail

Post by LasseThid » Sat Apr 14, 2018 1:51 pm

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 2017, Enfocus PitStop Server 17, Enfocus PDF Review, HP SmartStream 12 & Kodak Prinergy 7.5 with RBA
MAN Roland R705 & R708, KBA Rapida 205, HP Indigo 7600, 7800 & 10000, Inca OnsetX2, Durst P10 among other things

jan_suhr
Member
Posts: 136
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 » Sat Apr 14, 2018 5:19 pm

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
Member
Posts: 89
Joined: Mon Jun 12, 2017 8:48 pm

Re: Attach metadata from multiple files to e-mail

Post by Padawan » Mon Apr 16, 2018 10:55 am

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
Member
Posts: 182
Joined: Tue Mar 03, 2015 2:30 pm
Location: Molndal, Sweden

Re: Attach metadata from multiple files to e-mail

Post by LasseThid » Mon Apr 16, 2018 12:13 pm

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 2017, Enfocus PitStop Server 17, Enfocus PDF Review, HP SmartStream 12 & Kodak Prinergy 7.5 with RBA
MAN Roland R705 & R708, KBA Rapida 205, HP Indigo 7600, 7800 & 10000, Inca OnsetX2, Durst P10 among other things

Padawan
Member
Posts: 89
Joined: Mon Jun 12, 2017 8:48 pm

Re: Attach metadata from multiple files to e-mail

Post by Padawan » Tue Apr 17, 2018 12:01 pm

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