The problem that I face is the first loop will always correct, but the following loop, it will keep replacing those unnecessary to change.
Share the output returned by the last node
Information on your n8n setup
- n8n version: 0.198.2
- Database you’re using (default: SQLite):
- Running n8n with the execution process [own(default), main]:own
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker
Hi @Edwin_Wong, I am not sure I fully understand the question.
Would you like to simply like to insert new text into your sheet multiple times, for each loop? If so, you could replace the text with the text you like to insert along with the text you are replacing.
So, if you’re replacing %%MYPATTERN%%
with a text of foo
, simply replace it with foo %%MYPATTERN%%
instead. That way, you can perform additional replace operations on the same document.
So, running the below workflow on a document like this:
Would result in a document like this:
So, all three strings are inserted as expected.
You could also perform a final replacement after the loop to get rid of %%MYPATTERN%%
if desired.
1 Like
@MutedJam
Thanks for reply.
By the way, I think I solved the solution that given by you. But my question is not this. I am sorry that I can’t provide the details at forum here and my english may confuse you.
Hence, could I private message you or something for this question?
Hi @MutedJam
Sorry for the reply again. Just for your info, I managed to get the result that I want.
Thanks a lot for help.
1 Like
Glad to hear you found a solution @Edwin_Wong
Feel free to dm me if you want to share anything you’d rather not post in public, though it might take me a while to respond.