I’m facing an issue in my Bubble workflow where I’m trying to pass a text value (TXT) from a Document to the OpenAI API. Here’s a quick breakdown of what I’m doing:
- The user uploads a PDF, and I create a
Thread.
- I create a
Document linked to this Thread that stores information about the uploaded PDF.
- I call an external API (
pdf to text) to convert the PDF into text and store this text in the TXT field of the Document.
- I then attempt to use this
TXT field in the initial call to the OpenAI API as part of the user’s message content.
The Problem
- When I try to fetch the
TXT using Do a Search for Documentos:last item to pass it to the OpenAI API, it doesn’t work—the TXT seems to be empty.
- However, if I use
Do a Search for Documentos:first item, it correctly passes the TXT value to the API and everything works as expected.
Question
- Why is
Do a Search for Documentos:last item not working to retrieve and pass the TXT value to the OpenAI API, while first item does work?
- Is there something about the order of operations or data synchronization that could be causing this issue?
Any insights on why this might be happening or how to fix it would be greatly appreciated.
eliot1
2
Hi, could come from the “do a search for” filtering that have several results. With the last one not holding anything in its txt field.
What are your conditions for the filter?