Include Google Drive URL of generated PDF with Webhook Payload

Hello, I am a pretty new user to Appsheet and I am in need of some assistance.

I currently have a form that I have post results to a webhook on a Discord server as an embed. That part works perfectly, but I am struggling with creating a Bot / action process in a way that will include that Google Drive URL data in the Webhook payload.

Form / Table: Closing Sheets

Table: Closing Sheets File Store (Google Drive folder which contains the generated PDFs)

What I have so far:

  • On Form Submission (new add to the form table), set a custom filename using a formula to a column on Closing Sheets
  • Create PDF which uses value of that column as the name prefix (auto timestamps ARE disabled,  my own time stamp is added via formula for the sake of predictable file names)
  • Formula to set "File Path" column on form table to the Google Drive URL via the ID from the Closing Sheets File Store table. This is meant to look at Closing Sheets File Store and return the ID from a row with a match to the previously generated file name. It tacks this ID on to the end of the Google file URL.

 

 

"https://drive.google.com/file/d/" & SELECT(Closing Sheets File Store[_ID],CONTAINS([File],[_THISROW].[File Name]))

 

 

Here is where I am lost. I can not for the life of me figure out how to get this File Path to fill correctly, as it relies on data from the File Store table which I'm guessing it's not privy to yet since it doesn't "Sync" live, so it just fills with the prefix of the URL but no ID (since it found no match?)

My current attempt has been to create a "wait" function after creating the PDF, to wait for a match between the generated File Name match to appear in the File Store. This isn't working, the bot just hangs on this step and I am guessing it's because it is working with data from the File Store table that is not up to date, and thus doesn't include the new file that was just added in the previous step.

Is there a way I can trigger an update of this table data in between these steps of my workflow? What I ideally want to happen is as follows:

  • Form Submitted
  • Set Filename to column (working)
  • Create PDF using generated filename (working)
  • Generate GDrive file URL for generated file using doc ID, write that data to File Path column 
  • Send webhook payload which includes the File Path column, and thus the generated working URL.

Any guidance to make this work would be much appreciated. I have literally 0 experience making apps prior to this, so please bear with me and forgive any stupid questions or missing relevant info. I'm happy to provide any additional info necessary. I have tried searching for a few days now for a solution, and I have gotten much closer thanks to this forum but I am stuck here. Any help is appreciated! Attached is a visualization of my current (not working) iteration of the work flow.

rstechdesk_0-1672687793569.png

 

0 5 422
5 REPLIES 5


@rstechdesk wrote:

will include that Google Drive URL


I don't think this will be possible without AppScript.
Do you need this to be a Google Drive URL or any URL is enough? Because you can add an AppSheet URL for sure

Thank you for your response. Since the post, I was able to make it work with an appsheet URL which is fine for my purpose. I can follow up with my resolution later if it can help anyone. 

how did you generate the appsheet URL.? pls share your expression as i am not able to get the proper file url.

thanks

@rstechdesk I'm interested in your solution. I'm struggling with this as well..

How do your steps look like in the automation?

Just reference to a file/image column

Top Labels in this Space