Workflow Email Trigger Test>Send works, but does not send out emails from the App

Hi Guys!

A few weeks ago I stumbled upon AppSheet while working on Google Sheets which were new to me also. That said, I’m not new to spreadsheets. I’ve been using those when they were just 14 column paper spreadsheets that you worked on, with a pencil, eraser and a calculator! :(Well, there were no PCs then, they came much later, in 1985 I think). In any case, what a delight this Appsheet is! Congratulations, Praveen and the whole team!!

I built my first app in about 8 hours, from a database of all the airports in India. And it works quite well and it was a lot of fun. Now I’m working on my second app, one for ordering fresh produce from a customer’s point of view. I studied the Order Capture app before starting on mine, but that one seems to be built for the merchant rather than the customers.

I’m almost done with my app, but I’m running into a small issue, which I’m not able to find an answer to. In my app, the first thing a customer does is Register and the app sends out a Registration Confirmation email without any attachments, via the built in Workflow tools. This part works fine.

Then the second things that the customer does is buy the produce from the Order Form generated from the daily List (read Catalog) of fresh produce uploaded by the merchant. I want to send an automated Order Confirmation email to each customer when they place an order. I’ve been able to design an Order Report and it works fine from the Workflow Test > Send method, and I do get an email with a nicely formatted PDF attachment also. However, this is not happening automatically, as it is supposed to, when the “customer” syncs the app with all the items ordered after saving all the purchases in the App.

So what am not doing right? This is the only thing that is stopping me from publishing my app! Can anyone please help out? After this, I have two other projects I’d like to work on!

Many thanks in advance!!

Warm regards,

Parag Raval

0 4 288
4 REPLIES 4

You mean an Appsheet Report, correct? If YES: These do not run on data changes or triggers, but instead they run on a schedule.

What you will want to do is create a workflow that sends out the same PDF that your existing report does. Designers sometimes also include a special field “ready to submit”, if that field is set to TRUE then the workflow runs (that’s just an example).

Hope this helps!

Hi Ty,

Thanks for your prompt response!

As I mentioned in my post, I’m really very new to all this. I don’t know if emails are same same as reports or not. Another thing: The email with the details of the Order Summary needs to go out immediately, since the next customer maybe working on the order right away, using the same database.

If I were to include the “Ready to submit” field, what would be the correct syntax and where would it go? Would it allow the email (or Report) go out immediately?

Thanks again!

Parag

  1. create workflow:

  1. settings for same:

step 4 is where you would put something like [Ready To Sumit] = TRUE, or any other conditional logic.

Hey Ty,

Thanks! This looks like a good workaround and I’ll give it a try.
In order for it (Ready to Submit) to work properly, the customer should be able to enter the complete order before submitting it. Else they’ll keep getting an email after each “Save” on the App’s Order Form.
To accomplish this, what I’ve done is:
From Behavior>Offline/Sync:
Turned ON the Sync on start (since the merchant would have a new List every morning and all customers should have the most current selection and prices)

Turned ON the Delayed sync (So all items are saved on the device, and “ready to sync” counter above the Sync icon shows the number of items saved in red)
Turned OFF Automatic updates (So another customer’s activities don’t mess up someone else’s order!)

Since I’ve not been successful, so far, to send out email from the App, I’ve figured out another workaround.
From the underlying Google Sheet, I created a sendOrder email Script with a TimeDrivenTrigger that sends out an email after a 2 minute delay.
The reason I had to have the 2 minute delay is because sometimes it takes a while for the Google Sheet to sync to the server, and all order information is not populated in my email template in real time.
I’ve also simplified the email template to refer to only 4 CELLS: For Time (to send), Email (Address), Subject and Message.
I’ve been able to get the entire order information in just one cell by using a combination of spreadsheet formulas and formatting.
So all of this is working fine, as expected, during my testing.
Now my App is sending out two emails, automatically: Once when the Customer registers for the first and only time, and then whenever they place an order.
So far, so good!

Now the only remaining issue for me is, neither the App’s Order Form nor the underlying Google Sheet is resetting to zero/blank after the customer submits the completed order.
This is even after I’ve set the column Quantity (the ONLY editable field in the Order Form) to “Reset on Edit” (From Data>Column>Order>Update Behavior)

So the previous customer’s last order information (and the email ID) is visible to the next customer.

This is a bit embarrassing!
What do you think is causing this, and what is the fix for this?
Your help is always greatly appreciated!!

Warm regards,

Parag Raval

Top Labels in this Space