Help with grading automation

I am trying to create my first workflow:

Google Drive watches a folder that contains a grading rubric for new assignments. Then sends to ChatGPT and gives feedback on the assignment according to the rubric file in the folder, puts that feedback into a Google Doc and then uploads that back into the folder.

I have got the workflow working for the most part but the feedback file that is uploaded from the Google Docs node is empty. For some reason the response from the OpenAI node is not being sent to the Google Docs node successfully.

I have also tried adding an Extract From Text node between the OpenAI and Google Docs node but the feedback doc is still blank.

I have also uploaded a screenshot of the OpenAI node output

Anyone got any ideas of where I am going wrong?

Thanks

Hi ,

From what I understand, you want to use the variable "content" from the OpenAI response in your Google Doc, right?

Could you share a bit more about how you’ve set up the Google Docs node? Did you set any placeholder variables in the Google Doc itself?

If possible, it would be super helpful to see a screenshot of both your Google Docs node settings and the Google Doc template you’re working with.

Also, you might find it easier to use a Google Doc as a template.
The idea is to:

  1. Create a Google Doc that contains placeholder variables (like {{grading_content}}).
  2. In your workflow, make a copy of that template.
  3. Replace the placeholders with the actual values using the appropriate node or expression.

Hi,

Thanks so much for your reply!

Here is a screenshot of my Google Docs node. I’m assuming I need some sort of variable to pull the content from the Input to the Output of the Google Docs node?

I will try and implement those today and see if I can get any further. It is annoying because I am so close!

Many thanks

To give you more context, here’s how it works with screenshots:

In your Google Doc, you can insert variables using double curly brackets, like {{content}}:

Then, in the Google Docs node, configure the following settings:

  • Operation = Update;
  • Action = Find and Replace Text;
  • Old Text = {{content}}
  • New Text = $json.message.content

This setup will replace the {{content}} placeholder in your doc with dynamic content from your workflow.

I hope this will help!