Ghat gpt doesn't see the inserted data

Hi there,
I am trying to test an option to create a long-form blog post (my own way, not following the tutorial completely as it doesn’t fully apply to me). However, setting up the insert of data from the spreadsheet doesn’t seem to be working and Ghat gpt’s output is always: thanks, I don’t see the data that you claimed to be providing in the prompt.

Any ideas on what’s wrong?

Hi @Anastasia_B and welcome to Activepieces.

Is this happening during testing the step or only after publishing and running the flow in real life?

If it happens during the test, can you please show me the output of the Google Sheets step in the testing panel?

Hi @Anastasia_B,

I might know the issue as I encountered this.

When you first run the sample data on the Google Sheets, if you have any ‘Header Rows/Title Rows’, it seems that these seem to be the selected default data. If you do not change this, then despite setting the correct values (e.g. New Row values A, etc.), you will receive the error you stated above where Chat GPT cannot find the content.

a.) When running the sample data, It is best to start with only data in 1 row. That way, it will return 2 results in the dropdown for the sample data; as mentioned above, by default, it will only show the JSON output for the header/title row in the values, so change the dropdown to the other result. You will see in the JSON output below that it now shows the actual values from the rows instead of the header/title values. From here, you are free to add more rows back into the sheet; it will be detected when you run the next actions sample data; just don’t run the sample data again for the Google Sheet.

b.) Make sure to tick the ‘has header rows’ in the relevant actions as well (not all have it).

c.) You should now be able to test your data in Chat GPT again, this time with success; it may be worth just re-entering the values (e.g., 1. New Row values A), etc., again, but you shouldn’t need to.

I hope this helps and solves your issue.

Kind Regards.

2 Likes

Hey there, @ashrafsam !!
Thank you for welcoming :slight_smile: To be honest, I rage quit the app and got Albato instead :slight_smile: But then I rage quit Albato and decided to give Activepieces another try :slight_smile:

On the second attempt, everything seems to be working, so I am not sure what was causing the issue before - I think it is probably due to something @GunnerJnr mentioned - my first added row in Excel was the first row and it was a header row (and I didn’t notice any option to identify that I have a header row during setting up the flow), therefore there was no content to use.

I got my first automation set up although it’s still not perfect for my needs :slight_smile: So I am going to attempt asking a few questions, maybe you can help me improve, so that it would be possible to use it.

Question #1. The data I am adding to the excel sheet is not immediate - it takes me about 15 mins to feel the row. And also since a few days past since I set up that list some of the data are not “added” but old and I still would like to run automation on that. Is it possible somehow to choose the row, ranges of rows that you want to run during automation? Or a have to create the whole new list for that? or just remove the data and add it again?? What would be the solution here?

Question#2. In my flow there are several rounds of open AI generating the text. And then I want to add it to the google doc. Is there a way to add every following generation to the same doc? I only see create document action :frowning:

Question#3. Also is there a way to add “check if the cell is empty” kind of trigger - if the cell is empty the flow is ending, if not flow continues. (or alternatively if the cell is empty - flow proceeds one way, if not - the other).

That about it for now. Excited to learn and hopefully master your wonderful app :slight_smile:

Thank you, @GunnerJnr for such a detailed response.
I wasn’t able to find “has the headers rows” tick anywhere, but I think your suggestion was correct :slight_smile:

1 Like

Hi @Anastasia_B,

You are welcome! I wasn’t 100% sure that any of your pieces would have the Are the First Rows Headers?. I just mentioned it in case it did appear.

With your questions above, I have a feeling my reply to someone else’s post might be of great help to you. You can read it here:

Hopefully, it will be useful for you. If not, feel free to follow up with further questions.

Kind regards.

Hi @Anastasia_B,

As for some parts of your questions, which aren’t covered in the reply I just mentioned, I’ll try to give my 2 cents on them below.

You have a few options available regarding the time it takes you to add the data. You could use a Delay piece to use a timer to delay an action for whatever time you set; this should allow you time to enter the data. You could also use a Schedule piece to set a specified schedule for your Task to run. Other options include unpublishing the Task and publishing it again after entering the data (although it seems against the point).

The approach I usually take is to have another tab in the spreadsheet (like in the image below) because, in my Task, I only target the Blog Posts tab in my Google Sheets connection, so it will ignore any other tabs unless I specify them. This allows me to leave the Task running on the blog posts tab, also allowing me the freedom to enter more data under the Data Entry tab. Then, simply between runs, I can paste it into the Blog Posts tab, and when it runs again, they will be picked up as New Rows and Trigger the Task again.

g-sheet-tabs

The link that I shared in the message directly above for my reply to someone else’s post should cover question 2. EDIT: Sorry, I misread question 2 initially and see you asked about multiple outputs to a Google Doc. As far as I am aware, there is only the Create Doc, as you say, which is pretty annoying. It is a bit lacking in features. But I know that you can enter multiple values in the action’s input, which should allow you to put all of Chat GPT’s responses in the content box. See the images below:

As for question 3, you can use a Branch piece. This will let you set conditions, with one part of the branch being true and the other being false. So you could do something like:

This will let you say, IF this condition is TRUE, do something, ELSE IF this condition is FALSE, do something else. (From another post I saw, I believe you can also add multiple conditions and use AND as well as OR conditions (e.g., IF this AND this is TRUE, do something, or IF this OR this is TRUE, do something, etc.).

What I would personally do is add a formula to the Google sheet, such as =ArrayFormula(IF(ISBLANK(A2:A),"TODO","Complete") This checks if the specified cell (in this case A2 (right down to the end of the sheet, by default A1000) is blank, if it is, it outputs a message to the cell that we put the formula into and fills it with the message TODO, but if the cell is not blank, then we instead fill it with the message Complete. This would be much easier to target in the Branch piece as you could then put something like IF CELL/ROW, Text Contains, TODO, then do some action, ELSE IF CELL/ROW, Text Contains, Complete, then do some other action.

Hopefully, that makes sense.

Note: You will likely want to utilise the Loop piece before the Branch if you want it to keep checking constantly, although it will run at least once every time a new row is triggered, but I cannot guarantee it will loop every item without it!

P.S. - It seems the Update Row action was the action that has the Are the First Rows Headers? toggle.

Sorry for the long message. I hope this helps you achieve your goal. Feel free to hit me up with any follow-up questions if you are unsure about anything I have mentioned here.

Kind Regards.

OMG thank you, David @GunnerJnr
That’s a lot to take in and I try to walk through all your tips and instructions. If I fail I probably have to hire you to help me in setting this up ahah.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.