Email Action dosen't give time for child table to finish data sync

I have an app to enter sales that get forwarded to the office for processing. The data is stored in Google Sheets.
The format is one customer to many products per order. I was using behaviors to send an email but I thought automation would be a better way to go.
The automation populates the the email before the data in the child table has a chance to finish the sync.
So all the email shows is the customer info and none of the products in the order.
If I go back and change any of the sale information to trigger the bot, the email sends with all the customer and product information perfectly.
The ‘Wait for condiion’ option in the automation causes to unpdredictable of a delay, the sale should be sent in to the office as soon as it is synced in the app.
Is there a way to get the bot to wait until the sync is completed on both tables before it sends the email?

Attn @prithpal @Dan_Bahir @praveen

1 Like

Could you please share what your automation steps look like ?

What is the expression in your wait step ?

1 Like

We are a small family nursery and are having trouble finding help. This is being tested by two of us to take the order in the display yard then send it on to the office to be entered into quickbooks.
I have our customer list and products uploaded into the app. We are using the app outside in our tree yard.
When the app starts it opens to the Orders screen,a dropdown is used to lookup the customer then select the ‘Add Items’ which opens an ‘Order Detail’ screen so each product can be entered
Once all the items are in, I set up a behavior button to send an email, but automation would make it easier when it is busy.

The Tables are setup as.
Customer, Product, Order, Order Details

The main table Is ‘Orders’ with many products referenced to that order in the 'Order Details" table.
Is there a way to wait until the sync on the child table is finished then trigger the automation?

I tried the ‘Wait for condition’ but since it does not trigger until the next time a record is updated it is to unpredictable to use here.

Not sure if this is what you need. I’m pretty new to apps so let me know if this isn’t what you ent.
Thanks for helping.

I believe @Dan_Bahir was asking if you can share the details of your wait step configuration. i.e a screen shot of the wait condition or paste the condition here.

1 Like

The expression is, ISNOTBLANK(SELECT(Order Details[OrderDetail Id], ([Order ID] = [Order ID]), TRUE))

The expression does wait until there are records in the ‘Order Detail’ table with the matching ‘Order Id’. but because it waits until a new record is created or updated the time frame for that to happen is unpredictable. It would be Ideal to send once the Sync completes the records in both tables or maybe a wait time of 30 seconds to 1 minute to continue with the rest of the automation.

I am having the same problem,

The e mail is sent before the child table is updated, how can I fix it?

thnak you

See Sending Email Only After Adding a Parent Record and All of Its Children here:


Thank you I will try with the status…

1 Like

Steve Many Thanks it worked.

I’d like to comment that in the Workflow help document: “Sending Email Only After Adding a Parent Record and All of Its Children”, also works with “add and update only”, and not only with "updates only"


1 Like