I have found a few other threads but none seemed to have an answer. I see Iโm not the only one experiencing this.
Sidenote - it is frustrating that you canโt test scheduled automations before you deploy, because now Iโm deployed and itโs not working.
I have an app that is used to log employee absenteeism - a person enters the absence into the app, in real time it emails their leader to let them know.
Then at the end of the day, I need it to email out a summary of all the people who were absent today.
I have the email template, coding, etc. All works great. But now that Iโm deployed, it says The event and process of the โEnd of Dayโ Bot are not compatible. The output of event โAbsenteeism Reportโ and the input of the process โDaily Reportโ must be the same table or โNoneโ in the case of a scheduled event that is not โFor Each Rowโ.
When I turn on โfor each rowโ, it sends one email for every single change made that day. We have a lot of absenteeism lol. This is not feasible.
When I turn off โfor each row,โ this is the error. But It is attached to the table, and I need a report on the actions on that table. When I tried to create a new task with no table attached, it doesnโt even populate the email i create to use.
How can I attach this daily report to the table but have it send out the email only once, daily at a certain time as a summary?
Plot twist - the email sends out at the time I set with only one instance but the app fails. It sent out at the times I set no issue, but the app itself says itโs unable to fetch app definition and thatโs not runnable.
So the setup kinda works, but it thinks doesnโt.
Scheduled Events, without ForEachRow enabled, must be paired with a Process and Task that are not attached to any Table.
Exactly. Which is not helpful lol. Every row in table sends one email for every instance, not one summary email.
But I have created a workaround by locking the first result of my google sheet with a unique ID in an ID column, and using a filter condition on the event to restrict the rows to only those with that ID (ie only one row)
Then my email table still reports all the people who are absent today, as per the formula in the template.
It sends out only one email this way. But I do not like MacGyvering things and hope to find an actual solution.
How is it not helpful?
Sounds like you have a ForEveryRow Bot, with an attached Process/Task that only sends a single recordโs of data.
You need a new Process/Task that is not attached to any Table, that sends all records at once.
Iโve read that page so many times, it was very helpful when creating my email template.
I created a new process and task not attached to any table and nothing happened. The email didnโt send, the process didnโt execute. The email template filters perfectly and only returns the records I want. The trouble Iโm having is getting the automation to send one email at a specified time with all of todayโs records.
How might I get a process and task to send all records at once if itโs not attached to a table?
Hmm I see the example of Start. Iโll try that now.
@Marc_Dillon I added <<Start:Absenteeism Reporting Client Care[ID]>> at the very beginning and < < End > > (without spaces) to the very end of my template, I used ID because thatโs my Key Column, but it didnโt trigger. Is that the right code to return ALL results?
Iโm going to have to come back to this tomorrow, Iโm getting way too frustrated lol. It shouldnโt be this hard to send a daily summary. What if I didnโt want to use a template? In the old reports, this would take me 2 minutes. Now it takes 5 different steps, a complicated email template, a start expression, an end expressionโฆ and I couldnโt test it before I deployed it. Luckily I deployed it early and set the emails to send to me because I had a feeling. And I donโt discount this is just me not understanding, but I see so many threads of people just like me not understanding.
Update: nope. Cannot get it to work.
And Iโve consulted with 2 appsheet experts in my organization who also canโt figure this out.
If I attach it to a table, it sends one email for each row
If I donโt attach it to a table and use a start expression, it duplicates my template for every instance (so if I have 20 reports, my template repeats 20 times in the email).
I cannot figure out how to have it send ONE email with ONE template instance as an aggregate of the dayโs activity. Every way I try sends multiple reports.
If anyone knows how to use a start expression to solve for this, or any other trick, Iโm fairly desperate.
Sounds like a problem with your template. Post it here so we can see where you may have gone wrong.
I have looked over your template
Because it appears that most of your instances where you are referencing the Absenteeism Reporting Client Care table are aggregations - COUNT, SUM etc. - you do NOT need the first START block at the top and END at the bottom. So remove that Start/End that you had added.
However, you do have Team Member tables in several places that are NOT in the proper format and it would appear to me to be causing errors that are preventing the template from properly executing. You should be seeing errors in the log entries.
Yah I have no idea whatโs going on in that template. Maybe you need to take a large step back. The basic concepts just arenโt as difficult as youโre making them out to be.
Start with a very simple template:
<<START:absenteeism_table[key_col]>>
<<[absent_employee]>>
<<END>>
Make a new Bot.
Make a new Event, schedule-driven, ForEveryRow not selected.
Make a new Process, select โnoneโ as the Table.
From the Process, create a new Task, and use the above template.
Test it.
My original hack works, I will stick with that.
The hack is to attach the bot to the table, but set a filter condition to only look at one row
Even though itโs only looking at one row, it still populates everything in my template for the day.
And only sends one email
Hmm, I am surprised this even would work because it seems to me the template has syntax errors where the Team Member columns are not encased in square brackets.
Regardless, I think if you look closely at the Team Member table data, you are likely not getting the results you would expect.
If you apply the 2 corrections I noted in my post above AND turn off the โForEachRowโ setting, I think you will be good.
Yeah, this an oddity of the template parser: the text between <<
and >>
can be just a column name, in which case the column value is substituted. It does work. I donโt know how the parser decides when to treat it as a column name versus an expression. Probably: does it match a column name? If yes, itโs a column name; if no, treat as expression.
I see. I didnโt realize this.
@airind This explains why the template works when you have the โForEachRowโ turned ON. However, `<<[Team Member]>> in each Team member table will be the value from the row passed to the template. Based on the filter conditions of each expression used in each table, that is not what you want and the tables will not show correct team member info.
When โForEachRowโ is turned OFF, there is a template error because <<[Team Member]>>
is outside of any expression AND there is no row passed to the template. This prevents the template from executing.
Youโd think so, but nope! The team member info is correct and populates just fine. The row I specified has a team member name of โDO NOT EDITโ lol.
The entire template works just fine when filter condition for the first row. If populates all information .
I also do not get any errors and all information is correct.
Coming to the party late but I think itโs important to emphasize Scheduled Bots and the โForEachRowโ setting.
If you have โForEachRowโ turned OFF, the Scheduled Bot run criteria simply acts as a โRun/Donโt Runโ switch - thatโs it! No rows are passed downstream. Typically, in this case, the template will control what rows are used and appear in the generated doc through a START/END block. Perfect for a summary report which sounds like what you need!
Just to contrastโฆ
If you have โForEachRowโ turned ON, all rows matching the run criteria are sent downstream to the Process. If you are generating a doc from a template, you will get each row passed to the template. You could ignore the passed in row and use your own START/END block to choose your own set of rows BUT the document will still be generated once per row that matched the Bot run criteria.
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |