Google Doc

Hello Community

An help will be appreciate.

Describe the issue/error/question

I have this workflow below, my goal is to add text on google doc based on the list of my notion table
I have three entries in my exemple and i want to have all of them on the google doc

What is the error message (if any)?

At this moment only the first item (Test 3) is shown on the google doc

Please share the workflow

Share the output expected by the last node

How to loop of each item to populate them like
Test 1
Test 2
Test 3

Thank you

Information on your n8n setup

  • n8n version: 0.182.0
  • Database you’re using (default: SQLite): Notion
  • **Running n8n with the execution process [own(default), main]: **
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: desktop app

Hi @terryble66,

This will most likely fail because you can only replace a value once. After it has been replaced it’s gone, so there is nothing else to update.

So, you would first need to merge your Notion data into a single item and then perform the replace option. For this you might want to look at the Aggregate Items operation of the Item Lists node.

Thanks @MutedJam I got it. and it works !
I have the list now with this format Test 3, Test 2, Test 1
In the expression on my google doc node input i have add a new line to get it like expected :

{{$node["Item Lists"].json["name"].join(',\n ')}}

Test 3,
Test 2,
Test 1

1 Like

Awesome, so glad to hear this works! Thanks so much for confirming and also for sharing the hint to get the new line :slight_smile:

1 Like