Hello,
I am trying to work with the template workflow provided by Retool, which populates my vector with content from my Slack channel.
I seem to be getting this error - and I'm not quite sure what to do.....
*Error evaluating populateVectorWithSlackData: (line 3) TypeError: fetchSlackData.data.messages is not iterable
*--- Failed running query: populateVectorWithSlackData ---
*--- Hit failure ---
The problematic code is this:
const result = []
for (const entry of fetchSlackData.data.messages) {
if (entry.subtype || !entry.thread_ts) {
continue
}
const thread = await getThread(entry.thread_ts, startTrigger.data.channelId)
const messages = thread.data.messages
const first = messages.shift()
const link = await getLink(first.ts, startTrigger.data.channelId)
const title = link.data.permalink
const document = [`Q: ${first.text}`, ...messages.map(m => `Reply: ${m.text}`)].join("\n")
await addDocumentToVector(title, document)
}
return result
The three steps before this one seem to be successful. So I am authenticating ok.
Any help that you can give would be appreciated,
thanks,
Neil