Meechie
Meechie3mo ago

Google Cloud File into Node.js readFile

Can someone please let me know if there is any way I can access my file thats in my BuildShip storage and put it through Node.js’s readFile function via Buffer, path, etc. What im trying to do is use the output of readfile in an API call to upload a pdf to a remote notary company. From my knowledge, there’s no way to download the file locally via BuildShip’s nodes, then input that direct path into readFile. The solutions ive tried so far have resulted in infinite run times
Solution:
Hey @Meechie, you can try this out. Hopefully it gives you an idea of how you can do something like this. https://buildship.app/remix/238fcbd4-8c7c-4f7e-b83a-25cb64af221e
BuildShip - Visual backend workflow builder
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.
Jump to solution
10 Replies
AI Support
AI Support3mo ago
BuildShip AI Support - Crafting Solution, (Avg response time: ~2 minutes 🙂)
Meechie
Meechie3mo ago
@Gaurav Chadha any suggestions?
Gaurav Chadha
Gaurav Chadha3mo ago
You can use the File Upload Trigger to store the file as a buffer storage buffer you can get the object of the file by creating a node with AI on your required usecase. You can refer to this documentation on how to use and upload files using the post request with Rest API File Upload Trigger - https://docs.buildship.com/trigger-nodes/file-upload#usage. Yes, currently there local download is not available through node, cc @Luis any suggestion to acomplish this?
Rest API File Upload – BuildShip
The Rest API File Upload Trigger is designed to handle incoming HTTP requests with multipart/form-data content type, which is commonly used for file uploads.
Solution
Luis
Luis3mo ago
Hey @Meechie, you can try this out. Hopefully it gives you an idea of how you can do something like this. https://buildship.app/remix/238fcbd4-8c7c-4f7e-b83a-25cb64af221e
BuildShip - Visual backend workflow builder
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.
Meechie
Meechie3mo ago
Thank you for taking the time to work on this Luis! When I went through the workflow, it happened to stall and run infinitely on the Get File Buffer node. I had also previously tried the download command as well and had the same loop output. What parameters/output did you get? Do you have any other ideas for file processing into readFile()? Me and my business partner would really like to transition over from out other automation softwares if this can work. Would you guys also be open to a video call where we can go through our use case in more detail? CC: @Gaurav Chadha
Luis
Luis3mo ago
Hey, for the Get File Buffer node the only input is the path of the file to download from your BuildShip storage. Would you mind submitting an app-support so we can further investigate the issues you are facing in your workflow? We can also schedule meeting https://cal.com/rodge-buildship/30min
Meechie
Meechie3mo ago
Thanks Luis. What time works best for you to meet? I had originally scheduled for 2pm EST, but it seems as though you are unavailable. Would later work?
Luis
Luis3mo ago
Hi sorry I missed your message we can do anytime tomorrow.
Meechie
Meechie3mo ago
No worries! Ive scheduled for 5:30pm est tomorrow. Let me know if that works for you!
Luis
Luis3mo ago
Ok that’s perfect