Get the values of the row from Watch rows google sheets

Hi everybody,

Basically, I would like to watch when a new row is added into a google sheets, then get the content of the row (each cell for each columns with content), input this content in GPT-3.5 to write a message out of it, then send this message by gmail, write on the new row from the google sheet “done” in the column “message sent?”, then create a Zoho invoice.

I don’t understand really how works the Google sheets integration.

To understand better :

On of the Issue is : The operation failed with an error. 400: INVALID_ARGUMENT - Unable to parse range: ‘Feuille 1’!17/09/23Ondes mécaniques et modèle ondulatoire de la lumièreConversionLien longueur d’onde fréquence Ordre de grandeur Spectre électromagnétique

thank you in advance for your help,

Best regards,

Arthur

Hi @Arthur_Pasquet,

Unfortunately, Google Sheets is very difficult to work with via API, even in Make.
Also, I believe you’re getting that error due to some special characters in the Range Parameter of Get Range Values.

So, does the Watch New Rows module not give you all the data from the row and that’s why you’re following it with a Get Range Values?

2 Likes

Hi Donald,

I have deleted the get range, the watch row is enough you are right.

But two problems :

  • when I do run once, even if I add a new row to the google sheet, it still considers the first row as a new row.

  • The module update a cell doesn’t find the cell even if I indicate the column name :

  • when I send the email with gmail with the message made by GPT, there is no paragraph or space, the whole email is one block…

Do you have any idea about how to solve these?

Thank you

For problem 1, are you adding a row to the bottom of the sheet or inserting somewhere in the middle of the rows? If you right-click

For problem 2, the Cell needs to be letter of column, follow by number of row. For example, E3.

For problem 3, this depends on the context, but you can try modifying your prompt to ask for output in a specific form. Or, feed the output to another OpenAI module and ask to reformat it a specific way.

2 Likes
  1. I am adding it below the former row:

  2. But this way it will always write with in the same cell of the sheet, I want it to write it for the new watched row.

  3. I tried in GPT to show a structure with paragraphs, I am sure the problem comes from gmail.

Hi @Arthur_Pasquet and welcome to the Make forum!

As @Donald_Mitchell mentioned, make sure any reference to cells contains a letter and a number, not a content, as it is the case now.
So your range value should look something like this (letter + the row number you get from the “Watch new rows” output)

Same for Cell in Update a Cell (letter + the same row mapping)

About the email content, have you tried asking ChatGPT to format it with HTML tags? As they can be used in the content of the Send Gmail module.

Hope that helps :slight_smile:

4 Likes

Hi @Lauren_Moineau ,

Very useful thank you, yes it works!!

Have a nice day,