Hi everyone
Iโm trying to build the following automated workflow in n8n and would love your help on how to best structure it:
Goal:
I have two Google Docs:
- Original Document (DE) โ written in German
- Translated Document (FR) โ should receive the French translations
Whenever I add new bullet-point-style lines (e.g. marketing headlines) to the original document, I want n8n to:
- Detect only the new lines (not already processed)
- Translate each new line to French using ChatGPT (OpenAI)
- Append the translated version to the bottom of the translated document
Current Setup:
- Iโm using Google Docs โ Get to read the German document
- Iโm using a Static Data node to store the last known content (body field)
- In a Function node, I compare the current vs. previous content (split by line)
- I plan to pass each new line to OpenAI and then use Append Text for the French doc
Problem(s):
- The Function node keeps throwing:Referenced node doesnโt existโฆeven though both nodes (Google Docs & Static Data) are connected
- Iโm unsure how to correctly pass two inputs into a Function node
- I also want to update the Static Data after each successful run to store the new DE content
My question:
How would you structure this workflow cleanly in n8n?
Especially:
- Best practices for comparing two text inputs line-by-line
- How to pass two different inputs into a Function node
- How to reliably store and update previous values between runs (via Static Data or better approach?)
Iโm happy to share my JSON export if needed. Thank you in advance