Hi @NateDhaliwal ,
Many thanks for your reply.
Yes, I have followed that guide… I will comment the guide with some suggestions afterwards.
I made the custom automation work btw.
The problem with the 500 internal server error was that I was tagging the wrong “context”, I found it out looking at the logs and tagging the correct one.
Once the content of the right context was added to a variable, the 500 internal server error was solved.
Further logic in the code was also modified.
Edit: To make the custom automation work in my local deployed instance I had to modify also the following files:
Create your custom automation script
Update: server.en.yml
add custom automation name; title; and description on the scriptables section of the yml file.
Update: client.en.yml
add custom automation name on scriptables; add the ‘field’ keyword; inside field keyword add ‘field_name’ followed by ‘label’ and ‘description’
Update: scripts.rb
add the custom automation name in the list of scripts. Sample: FILE_NAME = “file_name”
Update: plugin.rb
inside ‘after_initialize do’, add the path to the custom automation script. Sample: ‘lib/discourse_automation/scripts/file_name’