This n8n template shows how to upload a file in your Google Drive desired folder, compress it with the iLovePDF tool and move the compressed file to another folder.
This is just an example of using it for you to know how the flow should start to work without issues. After the "combine" step, you can change it according your needs but always maintaining the four main steps of ILoveAPI's request workflow: start, upload, process and download (e.g., an step for sending an email with the compressed file instead of moving it to another folder)
Use cases are many: With this template you can monitor a 'to-process' folder for large documents, automatically compress them for better storage efficiency, and move them to an archive folder, all without manual intervention. Then you can explore adapting it to have the functionalities that go best with you!
1. Google Drive Trigger: The workflow starts when a new file is added to a specific Google Drive folder (the source folder).
2. Authentication: The Public Key is sent to the iLoveAPI authentication server to get a time-sensitive Bearer Token.
3. Start Task: A new compress task is initiated with the iLoveAPI server, returning a Task ID and Server Address.
4. Download/Upload: The file is downloaded from Google Drive and then immediately uploaded to the dedicated iLoveAPI Server using the Task ID.
5. Process: The main compression is executed by sending the Task ID, the server_filename, and the original file name to the iLoveAPI /process endpoint.
6. Download Compressed File: Download the compressed file's binary data from the iLoveAPI /download endpoint.
7. Save Compressed File: The compressed PDF is uploaded to the designated Google Drive folder (the destination folder).
8. Move Original File: The original file in the source folder is moved to a separate location (e.g., an 'Archived' folder) to prevent the workflow from processing it again
Need Help?
See the iLoveAPI documentation