Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Dec 02, 2022 08:29 AM - edited Dec 02, 2022 08:30 AM
Hey there,
non-coder here...
I added extension "Create records for multiple templates". I hooked it up to run when a button is pressed. It is working correctly.
But I would prefer for it to run auto once conditions are met. I know this can be done in automations with a scripting block. My question is - can I just copy and paste code from the extension into a scripting block for automation?
I tried, but I am seeing a lot of red. I assume I am misunderstanding the foundation of the code, or I am missing a step? Would adding something in the input variables to make this work?
Dec 02, 2022 09:24 AM
Generally speaking, moving a script from a Scripting Extension to a Run a Script action within an automation is rarely a simple copy and paste.
The Scripting Extension has several input and output commands designed to ask a user a question or show a user something. Since the Run a Script action is autonomous, there is no need for the vast majority of those inputs/outputs and therefore none of them will work.
Rules of thumb when moving from the Scripting Extension to the Run a Script action step:
If you have specific questions about a specific script, its best to give a link to that script since very few of us here in the forums have every published script memorized or bookmarked.
Dec 02, 2022 09:51 AM
thanks very much for this, I appreciate the background. As suspected, I think it might be over my head and a bigger learning curve than I had hoped. Thank you for the feedback