I want to create a simple macro which prompts me to type in a bunch of values and then outputs a block of text using those values. Just like a TextExpander macro.
While it is possible to create if→then actions that can be told not to include empty variables, in this case, I think the simpler solution would be to search and replace your text after inputting your values to get rid of all the empty lines. Feel free to copy the search-and-replace action used in this sample macro if you find it works for you, and please note that you will need to set your assembled variable values to a new variable or the clipboard (and use the appropriate search-and-replace action depending on which one you go with) before pasting them to make use of this solution. Sample "Empty Variables" Macro.kmmacros (2.5 KB)
Glad it worked for you! If you're satisfied with my solution, would you mind checking the "Solved" button on my reply? It's easily overlooked if you don't know about it, but it can be found here, after clicking on the "…" button under a post: