Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards

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

Avatar

Level 1

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!

4 Replies

Avatar

Community Advisor

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

Avatar

Level 1

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

jknowdto_0-1753352005194.png

 

Data loading activity:

jknowdto_1-1753352103984.png

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)

jknowdto_2-1753352139744.png

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:

jknowdto_3-1753352299212.png


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

Avatar

Community Advisor

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

Avatar

Level 1

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?