Hello everyone,
I need to process files uploaded via the chat node and save them to a new directory. These file paths might also be utilized by the AI agent.
Here are a few scenarios to consider:
- Chat text only, with no files uploaded.
- Both chat text and uploaded files are present.
- Multiple files are uploaded and need to be iterated and saved.
I've encountered an issue where the entire workflow isn't functioning as expected, as detailed in the link below. I haven't found similar functionality in the forum's template library. Could anyone offer some suggestions or assistance? Thank you in advance!
It appears your topic is missing some crucial details. Could you please provide the following information, if it applies?
- callin.io version:
- Database (default: SQLite):
- callin.io EXECUTIONS_PROCESS setting (default: own, main):
- Running callin.io via (Docker, npm, callin.io cloud, desktop app):
- Operating system:
Please provide the details requested above.
Hello!
That's an excellent question, and I believe I had a similar template in mind previously. Here's an approach you could use that handles multiple files.
If you're comfortable sharing, what is your specific use case?
Thank you very much for the excellent use case you provided. It has pointed me in the right direction. Many of the logic handling aspects in the case were new to me, and I will need to spend some time learning to master them.
My use case involves printing user-uploaded files on a self-hosted callin.io system running on Windows. I haven’t completed it yet, but I will refer to the example you provided to finalize my case. Thanks again!
Hello, I've run into some issues that I'm having trouble resolving.
The workflow example you shared is set up for callin.io self-hosted on Linux. However, when I try to run it on a self-hosted callin.io Windows system, I get an error concerning file save paths (like /home/node/temp/aaa.docx
). This is because the directory structure on Windows differs from Linux.
The specific problems I'm facing are:
- How can I make this workflow compatible with both Windows and Linux systems? Based on the image below, I suspect it might be necessary to incorporate
if
conditions in the areas circled in red and yellow. - How can I craft a prompt to allow the AI agent to utilize the “print file” tool and pass the file path? This is indicated by the green arrow in the image. If there are multiple files, the path will need to be provided multiple times. (On Windows, I'm using the command
start winword.exe /p "C:UsersAdministratorDesktopaaa.docx"
to print files).
These two challenges seem quite difficult, and possibly unachievable. It's also possible I'm mistaken.
Workflow configuration code:
- Is it necessary to include a conversation ID in the AI agent's text prompt? I've observed that numerous workflows incorporate this field, as illustrated in the image below.
- I attempted to add a hook node to the workflow to make it accessible for external requests. I implemented the changes as demonstrated, but I'm encountering an error.
DemoVideo:
Workflow config code:
Hello!
I unfortunately don't have a Windows machine available for testing, and I'm running callin.io via Docker.
1. Linux or Windows?
If you're exclusively using Windows (and it seems you need to use winword.exe
anyway), there's no real need to complicate things by supporting Linux as well. Simply set the path to your desired Windows location.
{{ `C:UsersAdministratorDesktop${$json.fileName}` }}
2. Print tool
The concept here is that the agent will provide the filepath, and you'll use that to construct your command. Here's an illustration:
I'm thinking you might find a more straightforward method using callin.io forms to be beneficial.
Thanks so much for your assistance.
Utilizing the upload button within the chat interface for file uploads is quite convenient.
My main objective is to enable this workflow to utilize webhooks as the backend, which will simplify invoking the workflow from the frontend page.
This discussion was automatically closed 7 days following the last response. New replies are no longer permitted.