PDF generator bot is running before all rows are update.

We have a simple listing app. 

A listing contains text and photos. 

We have a bot that creates / over writes, a pdf for the listing. 

It seems the bot is trying to run before all of the updates to the table are complete, such as a photo being uploaded and breaks the process. Where as a photo will upload but the link back to the table will break. (the trigger is "all changes" to table)

The table can be watched. the proper file name appears, then will switch to no file, and if multiple photos are being uploaded it could be random to which link gets broken. 

The when i disable to bot the issue doesn't happen. 


Any ideas?

0 6 202
6 REPLIES 6

I run a bot to de several things, then at the end I need to generate a pdf file.

I separate the pdf generation from the bot, and make it as an action button to be manually launched by the user.

In the main bots I add two steps, a step at the very beginning to set a certain flag to false, then another step at the very end of the bot, that is after all other steps have been completed, to set the same flag to true.

I show the action button (to generate the pdf) to the user only when the flag value is true, indicating the completion of all steps in the bot. 

i think i understand , im not sure i would know how to set this up, also would it work with updates to a listing? 


@Beta7 wrote:

updates to a listing? 


What do you mean please?

Would your solution, 
"then another step at the very end of the bot, that is after all other steps have been completed, to set the same flag to true." 

does this only work with new records? or will it work with update? 


If i understand correctly. you are suggesting to: 

Add a column to my "Listing" table. 
- make a counter
Set action button / action to look at that the new counter column for updates, adds


in the BOT, Set bot trigger to look at the counter column for updates, adds

i understand this part, but don't understand how to make the more advanced sequance like waiting until all ither items are done to process. that actually is my issue, as each update is made to the record during sync the bot tries to create a pdf each time and they stack over each other, if there is 12 updates to one record it tries to make a pdf for each update. 

 

 

Here are the screen grabs. i was able to create a Manual action button that looks to a true false and its bot returns it to false. 

now im trying with the automation and have it wait 7 mins after an update counter change is made (the update counter is via appsheet listing, so it changes the counter by 1 no matter how many items are added) 


Screenshot 2023-07-11 091554.pngScreenshot 2023-07-11 091616.pngScreenshot 2023-07-11 091632.pngScreenshot 2023-07-11 091649.pngScreenshot 2023-07-11 091709.png


@Beta7 wrote:

does this only work with new records? or will it work with update? 


It will work regardless of what your bot is doing. 

I'm not suggesting a counter. I'm suggesting a Yes/No field. Your bot will set the field as false then execute all the original steps you need, then set it as true. No other bots will be monitoring this field. Rather the field will be used to hide/display the separate manual pdf generation action (yes this action can increment a counter that is monitored by another bot).

Top Labels in this Space