JoshuaZ
February 16, 2024, 8:17am
1
How do I include table header when inserting filtered data from google sheets into openai as a text chunk?
I have this table on google sheets. I want to filter the rows based on dates and pass them to openai for prompting.
The data i want to send in needs to contain table header followed by the filtered rows but somehow, am only able to pass only the filtered rows without header or the entire table.
How do I include table header when inserting filtered data from google sheets into openai as a text chunk?
samliew
February 16, 2024, 8:43am
2
Hi Josh, nice to see another fellow Singaporean using Make. Welcome to the Make community!
You can use another Sheets module “Get range values” to get the header values in row 1.
Example:
Output:
Then, you can join them like this
3 Likes
JoshuaZ
February 16, 2024, 8:50am
3
Hey Sam,
How did you deduce that?
Thanks for the replies.
How do I string it up with the rest of the filtered rows?
samliew
February 16, 2024, 8:52am
4
JoshuaZ:
How did you deduce that?
I don’t know. Perhaps you can learn more about Make?
Links
Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —
General
Help Center Basics
Articles & Videos
Simply insert something like this before the rest of your data, expanding it to more columns as necessary.
2 Likes
JoshuaZ
February 16, 2024, 9:06am
5
Thanks. I now have 2 seperate flows.
1 to get header, 1 to get the filtered rows.
Whats the best way to loop through them and combine the data to be passed into openai api?
samliew
February 16, 2024, 12:37pm
6
You can do it linearly.
If you want multiple routes, see “Router Magic Formula” link in my previous post.
3 Likes