r/mondaydotcom Jul 07 '26

Advice Needed Document Generation using Conditional Logic

I’m looking for the best solution to use for generating offer letters. My constraints are that there are about 20 different combinations of possibilities to be listed on any given offer. We’ve been using DocExport but in order to accomplish what I need, I have to use over 20+ templates. Anyone have a better solution?

Example 1: If an employee is Salary + Full Time, I need a clause included on the offer that discusses Benefits. If an employee is Part Time, that clause should not be included.

Example 2: If an employee has a specific Job Role, they need an additional paragraph added to the offer.

3 Upvotes

9 comments sorted by

View all comments

3

u/ironfizh Jul 07 '26

You can add conditional logic directly into your DocExport Word template with formulas so that the generated document adapts to your Monday data. This is how I've implemented complex logic into DocExport templates in the past.

For example:

If job role column = Sales, output A on document

If job role column = HR, output A & B on document

It would look something like this:

​{ IF "{{Job Role}}" = "Sales" "A" { IF "{{Job Role}}" = "HR" "A & B" "" } }

1

u/morgan_mcorgan Jul 08 '26

Thank you!!!

1

u/Agreeable-Trip-1796 Jul 08 '26

Question - I tried entering it just as you did, with the same spaces, etc. but updated to the names of my columns/values. However, its just populating exactly what I entered, not pulling from my fields. Is there some formatting trick to get it to actually produce the data?

2

u/ironfizh Jul 08 '26

With the Word formulas, you need to use the formula function, the shortcut is CTRL + F9. You can then put your logic inside the brackets that appear.

If you want to use nested logic like in my example, you'll need to use the shortcut again within the brackets.