How to "catch" data from new rows in the child Table, which was not there before the start of the Bot?

Hello everyone!
I have not asked questions for a long time, but the following task has appeared and I ask for help from the community.

Input data:

  1. There is a TABLE 1 (with a parent entry);
  2. There is TABLE 2 (with child records);
  3. There is BOT 1, which starts from the state (EVENT) of the parent record in TABLE 1. This BOT 1 creates several records in the child TABLE 2 using the Webhook call (Add row);
  4. There is BOT 2, which is triggered by a manual action, changing the state (EVENT) of the parent record in TABLE 1, but only after creating records in the child TABLE 2. BOT 2 creates an email with PDF attachment based on the data in TABLE 1 and TABLE 2.

A task:
How to put all this sequence of actions inside BOT 1?
How to configure the PROCESS in BOT 1 so that it waits for the creation of child records, and then generates an email with an attachment?

Results of my attempts:
All my attempts led either to letters with PDF attachments, inside which there was not enough data from the child records TABLE 2, or using the โ€œWait for a Conditionโ€ step, letters with the necessary data from TABLE 2 were received, but this is again an action from the user side.

0 14 697
14 REPLIES 14

Why is Bot 1 using a webhook to create the child records on Table 2? Why not create then with one or more Data Actions ?

Is the Webhook Synchronous ? If so when it returns it the rows should have been added to Table2 and if you have another step to create the PDF after the webhook it should have all the data.

The suggested sequence would be to have a bot that

  1. Creates several records in Table 2 with a data action event
  2. Has an email task with the PDF attachment.

This is done to iterate over all the selected items in the EnumList (Ref type) column. As far as I understand, you cannot do this with actions (except for creating a group of identical actions with a limited number to create new posts or an action on the user side that creates new posts with recalculating the remainder to start / stop creating a new (next) post).
Or I donโ€™t know something new)?

I tried with both sychronous and asynchronous, got the same result - PDF without child records.

Now I tried again to add the creation of an e-mail with PDF attachment to the process.
Here is the PDF result:


Is the following situation possible with the response after the Webhook call?
In the โ€œPresetโ€ field, you can select only one โ€œCustomโ€ value.
Previously, it was possible to explicitly specify โ€œAdd Rowโ€.
Perhaps the process does not expect any data in response to a call, except for โ€œeverything is fine, the call is acceptedโ€)?
Therefore, it does not return the id of new records.

If you are iterating over an Enum list can you use the โ€œRun Action On Rowsโ€ action to create a loop and then reference an action that adds the built row to Table2.

If you cannot see this data action, it has not rolled out to your user yet. PM your UserId and I will have you added early.

My ID: 1152015

Thanks @Dan_Bahir !

That is strange you should be able to select add.

Added you to the list, unfortunately it will only take affect this coming Wednesday. I am trying to understand why you only have the custom preset showing up.

Found the issue that caused the other presets not to show up, the fix will be deployed on Wednesday as well.

@Dan_Bahir, thank you! Glad to hear that the issue will be resolved.

Fix has been deployed, in addition you should now see the new data actions.

Screenshot 2024-07-21 at 12.34.53.png

 

I'm experiencing problems with an empty PDF. The PDF webhook doesn't display any rows unless I update pdf once. The rows added through the first webhook appear correctly in the app. Once a row is added, updating that same row in the app causes the PDF to update with all the rows in pdf

Webhook Task - "Add Create Invoice Items":

A webhook is triggered to add new items to the "Create Invoice Items" table.
This task involves sending data to child table part of the app to insert new records.
PDF Generation Task - "Create Invoice":

Following the webhook, there's a task to create an invoice, generating a PDF document that should include the details of the invoice items just added.
Problem Description:

The issue arises when the "Create Invoice" task starts the PDF generation before the new data from the webhook has been fully processed and is available in the database.
As a result, the PDF is created without the new invoice items because they haven't been committed to the database by the time the data is fetched for the PDF. This leads to the generation of an empty PDF.
This problem stems from a potential asynchronous operation of the webhook, where the completion of the data insertion is not synchronized with the subsequent PDF generation. This results in a timing mismatch between when the data is available and when it is needed for the PDF.
 
Top Labels in this Space