Lookup Excel or csv in workflow to find email addresses and email

My requirement is to look up for (up to) five email addresses based on certain fields like “customer_id, country, invoice_id” and send email to them from workflow. The email addresses per combination ‘customer_id, country, invoice_id’ is to be maintained externally but locally (in the same server as Planet Press Connect application/server is installed). What is the simplest way (least expensive) to maintain such hard-coded file (fields : customer_id, country, invoice_id, email1, email2, email3, email4, email5) and then how to extract it from workflow in variables to send email.
The email is to contain the attachment as created by using a design template (pdf) in workflow and to be sent to the selected email addresses.
Note - We don’t have MSOffice, MSAccess or any SQL or similar database installed in the server where PlanetPress Connect is.

How many different email addresses do you expect that external database to contain?

1 Like

Hello Phil,
Thanks for responding. I don’t know yet the exact number, but I would hope it would be somewhere near 5000.

Well you have a couple of options.

You could use Workflow’s repository to store all your emails and use the built-in LOOKUP() method.
Note that the repository was never meant to be used as a replacement for a database, but it still can be used as one.

A better alternative would be to create an new Schema in your existing Connect database (which, by default, is an instance of MySQL). This would give you better performance over the Repository option.

That new schema would be separate from the Connect’s own schema, therefore neither schema couldn’t impact the other. You can use MySQL Workbench to perform maintenance on the new schema. And you can use Workflow’s DBQuery task in one of your processes to retrieve data from the table.

Thanks Phil. Are you suggesting that I create a data mapping configuration in Designer using a CSV file (which will hold data)? and then using DBQuery task (plugin) in the workflow to extract values out of it? - as part of option 2 that you’ve suggested.

No that’s not what I was suggesting. I don’t believe a CSV is a proper way to maintain a database with 5000 entries. But if you still want to use a CSV as your database, then you don’t need the datamapper to access it, you simply need the DBQuery task in Workflow, you set it to use ODBC’s Microsoft Access Text Driver and you specify a dynamic query.

1 Like