App script integration with PDF.co

Using an app-script to merge PDF files although the script originally used a Google sheet to pass parameters. However using a Bot to pass parameters to the app-script there is a problem receiving the resulting merged file URL back.

Q: How to you specify a URL path for 3rd party apps like PDF co to store a file, which is relative to where where AppSheet app stores files?

Q: Has anyone had any success using something like PDF.co with AppSheet?

Thank you for any assistance. 

Screenshot 2022-11-14 at 10.54.54.png

0 2 209
2 REPLIES 2


@Harriswe wrote:

How to you specify a URL path for 3rd party apps like PDF co to store a file, which is relative to where where AppSheet app stores files?


I'm sorry, can you explain this better? You need a place to save a URL that's part of the response or you need to pass the file as a URL for them?

Parameters sent to the 3rd party routine are:

  1. ListPDFURLS: List or URLS (represents the list of PDF files to merge)
  2. MergedURL: Return is the URL to the merged File

To save the merged file somewhere where you can retrieve it, you need to save the file to a specified location. My question was how do you specify a location that is relative to Google Drive where the AppSheet app is running?


@SkrOYC wrote:

@Harriswe wrote:

How to you specify a URL path for 3rd party apps like PDF co to store a file, which is relative to where where AppSheet app stores files?


I'm sorry, can you explain this better? You need a place to save a URL that's part of the response or you need to pass the file as a URL for them?







Something along the lines of the following:
 
**
* Save file URL to specific location
*/
function uploadFile(fileUrl) {
var fileContent = UrlFetchApp.fetch(fileUrl).getBlob();
var folder= DriveApp.getFolderByIdAndResourceKey("********);
folder.createFile(fileContent);
}
 
Thank you for assisting.
Top Labels in this Space