There is the automate plugin that can be of use here.
First I would advise to rename the local library to can see which Library is which (won’t affect any links the document or its contents to the library)
Here are a few steps:
And then
Let me know if this helps!