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 ![]()