4.2. Scenario 2: Send email to all students with tailored text

Suppose you have a course with 500 students and they take the course as part of four programs named FASS, FEIT, FSCI, SMED in different disciplines. They are all related, but at the same time different. You would like to send all your students an initial email explaining a few aspects of the course. One paragraph is about the structure of the course and is common to all students. A second one explains the connection between the material and their program. This second paragraph has to change depending on the program in which each student is enrolled. The task consists on drafting one email with a personalised greeting (using the student’s name) a common paragraph, and a second paragraph that changes depending on the program.

Suppose now that you do have the class listing in an excel sheet. The table has the names of the students (one student per row), and the column named Program contains for each student one of four possible values “FASS”, “FSCI”, “FEIT” or “SMED”.


  1. Create a new workflow (click on the New Workflow button in the home page of the tool). Introduce a name and a description (optional) for this workflow.

  2. Open the newly created workflow by clicking its name. A page titled Workflow Details will be shown.

  3. The page says that there is no data uploaded yet, and to upload it you need to click on the Dataops link either at the bottom of the text or at the context menu at the top.

  4. A new page titled Upload/Merge appears. Select the option CSV Upload/Merge and follow the instructions to upload the CSV file (select all the columns to upload)

  5. Click the Details page to see a summary of the elements in the workflow: 500 rows, 10 columns, 1 action and 0 attributes. All the steps up to here can be done by importing the given workflow file.

  6. Click the Table link at the top of the page and browse through the data included in the workflow. Locate the column called Program and verify that it has the correct values.

  7. Click the Actions link at the top of the page. The new page shows a list of actions available for this workflow. Click on the button to create a New Action Out to send a welcome email to all students. Choose an name and description (optional) for the action, for example Welcome email.

  8. The next page is the action out editor. In the second area from the top you will see a button to create a new condition (Conditions + New). Click the button and a new window opens to specify a condition. Enter the following data:


The formula states that the condition will be satisfied when the column Program has the value FASS. Click the button to save the condition.

  1. Create three additional conditions that are analogous to this one but are true when the Program column is equal to FEIT, FSCI and SMED respectively.

  2. Write the text of the email starting with a greeting. Immediately after the greeting select from the pull down menu titled Insert column value the column GivenName. You will see how the string {{ GivenName }} is inserted in the text. This is the way OnTask has to mark that the string with the double curly braces should be replaced by the value of the column GivenName.

  3. Next, write the four paragraphs that you would write to the students in each of the programs (FEIT, FSCI, FASS and SMED). Separate them with an empty line.

  4. Now, and this is the crucial step, we are going to mark these paragraphs with one of the previously defined conditions. Select and highlight the paragraph to the students in the FASS program. Then click on the arrow next to the condition named Student in FASS and select the option Insert in text. The text should now be surrounded by the strings {% if Student in FASS %} and {% endif %}.

  5. Repeat the same procedure now with the three remaining paragraphs. Select the text and then click on the appropriate condition. The final result should be similar to the one shown in the following figure.

  6. Add the signature at the end of the text. Use the button named Preview at the bottom and use the arrows in the emerging window to browse through the different messages created for each user.

  7. Save and close the Action Out. You now are back to the screen showing the actions in the workflow (you can see the one we just created). If you click on the Email button, you will be asked for some extra data such as the email subject, the column to use as email address and some options to track email reading or even obtain a snapshot (duplicate) of the workflow as it is right now for future reference.

  1. That’s it! Each student will receive a message with the content of the second paragraph different depending on the program.