I have an automation that makes a call to openai to scrape a school lunch menu PDF, format it into an HTML page, and send it back. I then have a pyscript action that feeds the info to a python script, which writes to a file in /local. I've been working on this for like a solid two days, and I cannot get anything to write properly. Right now, it's not writing anything to the file. I've been using GPT to help with the scripting, in particular because I don't know Python. What's going wrong, or is there a better way to do this?
I attached the GPT response that is being passed to the {{ middlebrook_menu }} variable, as well as the python script.
Here is my action:
action: pyscript.write_html_file
metadata: {}
data:
filename: middlebrook.html
directory: school_menus
data: |
"{{ middlebrook_menu }}"