Populating content (as variable fields) from a csv file into an email delivery | Community
Skip to main content
July 22, 2025
Solved

Populating content (as variable fields) from a csv file into an email delivery

  • July 22, 2025
  • 1 reply
  • 573 views

Hello,

Using a workflow I need a step by step guide for how I can populate content/values from a csv file as variable fields into an email delivery.

My csv file is fairly simple with two rows. First row with column headers which will be used for the field name and the second row will have the values to populate for those fields in the email. E.g. First column is an image url, second column is a title, and then the row underneath is the values for them. There is no recipient data like email etc.

How can I upload this file into Adobe, use javascript to create these fields as temporary(?) variable fields and then use those variable fields which are then recognised within the delivery template and populate the content (all the content is the same it is not personalised).

Any help is appreciated!

Best answer by ccg1706

Hi @jknowd-to:

 

I share with you a few steps on how I will try to do it. 

 

1. Use a data loading file activity, a JS activity, a delivery activity and a end activity to complete the workflow.

2. Inside the data loading file activity, upload the csv file and this will create you a temporary table.

3. When the JS activity, you will need to query the rows from the temporary table and assign the field values to the workflow variables.

4. Finally, inside the delivery you should reference the variables and the process would be completed by using and end activity.

 

If you need more help just let me know.

 

Best ,
Celia

1 reply

ccg1706
Community Advisor
ccg1706Community AdvisorAccepted solution
Community Advisor
July 24, 2025

Hi @jknowd-to:

 

I share with you a few steps on how I will try to do it. 

 

1. Use a data loading file activity, a JS activity, a delivery activity and a end activity to complete the workflow.

2. Inside the data loading file activity, upload the csv file and this will create you a temporary table.

3. When the JS activity, you will need to query the rows from the temporary table and assign the field values to the workflow variables.

4. Finally, inside the delivery you should reference the variables and the process would be completed by using and end activity.

 

If you need more help just let me know.

 

Best ,
Celia

jknowd-toAuthor
July 24, 2025

Hey Celia,

Thanks for your suggestion. I have tried doing those steps and had difficulty with the field/values populating in the delivery. I think it's the javascript which may be incorrect? See below some screenshots where you might be able to help figure out the issue.


Workflow

 

Data loading activity:



My data file only will have two rows (1st row contains the field names/column header) and then the second row is just the content/values I want to populate for those fields).

Javascript code:
(with the help of ChatGPT)



And then in the delivery activity I'm putting this in the script tab:
delivery.variables._var[0].stringValue = instance.vars.offerOneImage;
delivery.variables._var[1].stringValue = instance.vars.offerOneTitle;

and then within the delivery itself in the Variables tab, putting this:


And using these fields in the email delivery to try and generate the content:

<%= variables.offerOneTitle %>

<%= variables.offerOneImage %>

Any suggestions or alternative ways to make it work are appreciated. Please do flag if the script or anything else needs changing such as JS, or the field names etc.

Thanks,
Jack

jknowd-toAuthor
July 29, 2025

Hi @jknowd-to

 

After reviewing your screenshots my recommendation is that you try changing temp for tmp, that it should normally stand for temporary schema. 

 

Once you make this change your script should have the correct functioning, if not please let me know. 

 

Best, 

Celia


Hey Celia,

I done as you said and tried using 'tmp' in the script instead of 'temp', but that flagged errors. When I used 'temp' it works okay. Any ideas?