# Create a google sheet file add the content line by line and column by column

**URL:** <https://community.make.com/t/create-a-google-sheet-file-add-the-content-line-by-line-and-column-by-column/24760>\
**Category:** Questions\
**Tags:** open-ai, google-sheets\
**Created:** [January 19, 2024, 2:07pm UTC](https://community.make.com/t/create-a-google-sheet-file-add-the-content-line-by-line-and-column-by-column/24760 "2024-01-19T14:07:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rejoo](https://avatars.discourse-cdn.com/v4/letter/r/e36b37/32.png) [@rejoo](https://community.make.com/u/rejoo)\
**Post date:** [January 19, 2024, 2:07pm UTC](https://community.make.com/t/create-a-google-sheet-file-add-the-content-line-by-line-and-column-by-column/24760/1 "2024-01-19T14:07:46Z")

</div>

Good morning,

I already opened a topic here,

but I prefer to open a new topic to better focus on the problem.

My goal is to create a scenario, for summary →

1. Create a Google Sheet file
2. Make a request with Open AI
3. Fill out the Google sheet
4. Send by email

This whole process works well.

I managed to add the values line by line with the help of @samliew

with this code →

![Capture d’écran 2024-01-19 à 14.45.45](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/7/27854e047e2ff608be7397bd200322cd1903d9d4.png)

in the iterator module.

I can now have my data line by line.

What I want now is to add their value column by column.

In my prompt I ask this

 ![Capture d’écran 2024-01-19 à 14.53.40](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/1/218a50d387c06c7c128a32421d24d63945491734.png)

I receive the Google sheet by email with this result →

![Capture d’écran 2024-01-19 à 14.54.20](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/c/5c9b62605502faafeaf9dc57cd9c6fd239515222.png)

I have the information line by line  
but I also want to replace the - adding the second column

![Capture d’écran 2024-01-19 à 14.57.17](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/a/8a9a8ba1af87f6ce4823463e9a9e0b50f127c542.png)  
Note: manual action on my part on the googlesheet

My question is, is it possible with the Iterator module to create values row by row and column by column?

Here are my outputs:

**Open AI module**

```auto
[
    {
        "id": "msg_MyXXXXXXMduDoNXXX",
        "object": "thread.message",
        "created_at": "2024-01-19T13:52:47.000Z",
        "thread_id": "thread_XXXXxyyXX",
        "role": "assistant",
        "content": [
            {
                "type": "text",
                "text": {
                    "value": "NOM-COULEUR-PAYS\nRenaurd-Brun-Belgium\nMouse-Gris-France\nLion-Brun-Kenya\nTigre-Orange-Inde\nGirafe-Jaune-Tanzanie",
                    "annotations": []
                }
            }
        ],
        "file_ids": [],
        "assistant_id": "asst_GH4KXXXXXPrGlUM8",
        "run_id": "run_YemXXXXXX8XXX1ha",
        "metadata": {}
    }
]

```

**Iterator module**

```auto
    {
        "value": "NOM-COULEUR-PAYS",
        " __IMTINDEX__": 1,
        " __IMTLENGTH__": 6
    },
    {
        "value": "Renaurd-Brun-Belgium",
        " __IMTINDEX__": 2,
        " __IMTLENGTH__": 6
    },
    {
        "value": "Mouse-Gris-France",
        " __IMTINDEX__": 3,
        " __IMTLENGTH__": 6
    },
    {
        "value": "Lion-Brun-Kenya",
        " __IMTINDEX__": 4,
        " __IMTLENGTH__": 6
    },
    {
        "value": "Tigre-Orange-Inde",
        " __IMTINDEX__": 5,
        " __IMTLENGTH__": 6
    },
    {
        "value": "Girafe-Jaune-Tanzanie",
        " __IMTINDEX__": 6,
        " __IMTLENGTH__": 6
    }
]

```

**Google sheet add module**

```auto
[
    {
        "spreadsheetId": "1Nq7DDVx714hfA5fqzDE0v8ZMRb7l2hjNYBVEUtsTZLE",
        "updates": {
            "spreadsheetId": "1Nq7DDVx714hfA5fqzDE0v8ZMRb7l2hjNYBVEUtsTZLE",
            "updatedRange": "'Feuille 1'!A1",
            "updatedRows": 1,
            "updatedColumns": 1,
            "updatedCells": 1
        },
        "sheetName": "Feuille 1",
        "rowNumber": 1
    }
]

```

I tried to document as much as possible 🙂  
hoping to have an answer, if you need other information I remain available

Thanks

---

<div class="post-metadata">

**Author:** ![IOA\_Brett](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/ioa_brett/32/16853_2.png) [@IOA\_Brett](https://community.make.com/u/IOA_Brett)\
**Post date:** [January 19, 2024, 5:13pm UTC](https://community.make.com/t/create-a-google-sheet-file-add-the-content-line-by-line-and-column-by-column/24760/2 "2024-01-19T17:13:18Z")

</div>

Hello Rejoo,

I created a simple string “one-two-three” in a parse JSON module for demonstration.

![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/b/dbf6e7c6bf52d0cd532b28b97e8ae3d7b5c2b452.png)

Then, I set a variable named “Array” to the value {{split(20.data; “-”)}}.

This takes the string “one-two-three”, and returns an the array [“one”,“two”,“three”].

![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/1/d137fbbc02d1b2ca0d32a29c6bcb9de168e85d84.png)

You can use this array to fill out your google sheet rows without needing to make any manual adjustments.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![rejoo](https://avatars.discourse-cdn.com/v4/letter/r/e36b37/32.png) [@rejoo](https://community.make.com/u/rejoo)\
**Post date:** [January 19, 2024, 9:29pm UTC](https://community.make.com/t/create-a-google-sheet-file-add-the-content-line-by-line-and-column-by-column/24760/3 "2024-01-19T21:29:58Z")

</div>

Thank you so much @IOA_Brett  
your solution helped me a lot and it works.

I’ll share with you a picture of what it looks like 🙂

![Capture d’écran 2024-01-19 à 22.28.52](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/a/0a39c675bee490a813674d99e5610793c3d89bab.png)

![Capture d’écran 2024-01-19 à 22.29.00](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/a/6a2c89cd37e008e0f99a97cba9826b0a697d03a5.png)

 ![Capture d’écran 2024-01-19 à 22.29.12](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/a/ba5fbc9f3cec8f2b23e4041dd9cfdf71ca41a3ab.png)

thanks 🙂

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [February 2, 2024, 9:43pm UTC](https://community.make.com/t/create-a-google-sheet-file-add-the-content-line-by-line-and-column-by-column/24760/4 "2024-02-02T21:43:06Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


