How do I save a text file using a variable using the "New Text File" action in Automator?

I am new to Automator and writing with AppleScript. I wrote a program that collects URLs and stores them as a long, single string.

After the AppleScript portion of the workflow, I want to save the string as a text file, so I added the "New Text File" action from the library. However, I want the input of the "Save as:" field to be a variable.

Do any of you know if this is possible?

enter image description here


Solution 1:

I just found the answer! You just need to drag the variable from the bottom of the screen into the desired text box.