Google Docs module using old doc contents instead of the new docs

:bullseye: What is your goal?

Correct the ‘Get Content of a Document’ module to stop using old information

:thinking: What is the problem & what have you tried?

My ‘Get Content of a Document’ modules are loading up old information instead of the current info, corrupting everything downstream and making it unusable. I have tried finding where this old information may be held since it is clearly stored somewhere but can’t figure it out.

My scenarios are generally ‘Get Content of a Document’ then run some OpenRouter processes and create a new doc. Then another Scenario uses the newly created doc and runs more processes. I replace the original doc with new content and run the scenario again. The docs are all standardized in name and location so I can just run the scenario without needed to rebuild it every time.
However, the modules are loading information from the old docs that don’t exist or have been replaced. The only way I have been able to fix this is by going into every get content module and manually remap it. This is exceptionally time consuming since about half or my modules are get content modules.

Any help here would be amazing

:clipboard: Error messages or input/output bundles

‘Get Content…’ modules are not actually getting the content and using old info

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

Hello,

Can you clarify what you mean by

?

Do you mean the scenario is using old data, or that the values you see here:


are old?

In the first case – please verify you’re using the correct file. Google identifies files by ID, not name.
You can have multiple files with the same name, so it’s easy to mix them up.

In the second case – this data is refreshed on every manual run.

Have a nice day,
Michal

Thanks for the reply. The scenario is using old data but I am pretty sure you identified the problem. I thought it was pulling the doc based on file path and name not a unique ID. The module was using the text content from a doc that no longer existed instead of grabbing the new one. This also explains why it worked when I manually remapped it using dropdown.

I’m not sure how it was getting and using content from a file that didn’t exist anymore. Clearly Make has it stored somewhere and the scenario was using that.

Is there another way to get this to work without having to manually remap it every time? I can’t erase the content of the existing doc and load in the new info since my scenarios are creating new docs that later scenarios use to run their module. Maybe a different module that will pull text content by file path and not ID?

Without knowing your exact workflow (input and expected output), it’s hard to say – but a Data Store might be what you’re looking for. Y
ou can store the new file ID there once the file is created and retrieve it on the next run.

Or you can create a new file from a template, which is the most common approach.

Have a nice day,
Michal

Thanks :slight_smile: I’m really new to automations and I’m still learning. I’ll check out the best way to set up data stores. Thanks for lending a hand, automations are WAY more complex and powerful than I am using them for so I legit appreciate the pointers and help

The general workflow I have is a single pipeline so every scenario run is the same every time. I have a number of nested folders in Drive. I plunk down a new doc in one of the folders that has a standardized name. The scenario then gets the contents of the doc (or sometimes a handful of docs) that then go into an Open Router chat completion. Those then read the text contents, and assimilate, combine, or create new text based on the previous documents. This output then runs into a create a document module. A later Scenario will take the contents of the newly created document then use that to run through a chat completion again and create a new doc. All of my scenarios are some variation of exactly this, docs in, chat completion, then doc out

It seems like the problem is the new files being created are read as different regardless of the name and file path. The weird thing I ran into is the get content module would load up content from previous runs from files that no longer exist since I clear out the folders each time. Not sure where it is storing this old text data but that’s not the root of my problem (thanks again for helping identify that one). Still weird tho

Your process seems a little bit chaotic.

This looks like an infinite loop – once the input file is processed and saved, it gets picked up and processed again?

Anyway. You can map the file ID directly from a variable:

There is also a dedicated module to watch for new files in a selected path:

It will assign id on its own as it watch for changes.

Have a nice day,
Michal

My mistake for the bad explanation. The next scenarios in line are all run manually as separate scenarios, just using the output of previous scenarios. I run every one of them myself.

Generally it’s a bunch of ideas I dump into docs, OpenRouter chat completions then takes the text contents of the file and organizes them and creates a presentation outline, this is then written to a new doc. Later scenarios will do different things with the newly created docs and create presentation materials and other things I need, all outputted as a doc create file module.

This is an example. It gathers the content of my initial created doc (I notate this with the ‘variables’ in the module name to remind myself that this is my original and may be different based on what I’m doing), then previously created docs from other scenarios, runs some chat completions to arrange and organize then self edit before creating a new doc I can use downstream.

I thought I could use the file path in Drive to get doc contents but I know now that docs doesn’t work like that. I’ll try out the Watch Documents module and see if that does the trick.

Thanks so much again for the convo. It’s nice to talk to someone who knows WAY more about this than I do

I just found a simple solution! Yay!

Instead of create a document modules I used replace text in a document modules. All I do now is not delete the docs created for a previous project. I download them for local use anyway and I was previously deleting them to make way for the next project to fill the space (which was the problem) but if I just leave the docs there, the doc itself doesn’t change, it just has its contents overwritten which ends up with the same results for my workflow purposes

I’m very glad a solution was found after being encouraged to dig deeper and see what could be done. My workflow was based on an N8N automation someone else made and I was assuming Drive used the same path identification as windows, which it does not. These two things ended up with successful projects (I run through a series of eight scenarios before moving the project local) but were a pain to remap everything every time

I will be back to saving time now :grin: