Bot question

i try to set event and table,when i set table and then try to run the bot.
i find that when ten records in table, it will sent ten emails.
i just need one mail
how can i need to setup?

1 Like

why i close the for each row in table, and then the bot is wrong

i set my bot by the following step
first :i set a task
second : because i need to choose the task, so my process need to set the same table
third: i set event , i also need table,if i don’t do it, when i set bot, i can choose my process. when i take away the table name, my bot became is wrong?
how can it set it correctly

I’m sorry, I don’t understand what you’re describing. What is the issue now?

1 Like

Может тебе это поможет. В конце статьи видео с примером отчета pdf по всей таблице.

There are two ways to interpret your need.

  1. A single email with a single document that include all of the desired rows
  2. A single email with multiple attachments - one for each data row

A single email with a single document that includes all of the desired rows

If you need to send a single email that includes data from multiple data rows, you MUST create a Task that uses an email template that is designed to query the Table for ALL of the rows you wish to include and then extract and format that data in the template. I’ll assume you know how to create a template, if not, just ask and we can point you to articles to help.

Of course this Task is added as a Step in the Process.

Assuming that you wish to create a Scheduled Bot to execute the Task mentioned above, you will want to turn OFF the “ForEachRowInTable” setting. The Event then simply becomes a trigger to run or not run. You can still use the Filter Criteria to decide if the Bot should run. For example, you can test for a COUNT of rows to be included in the email. If > 0, run the Bot…otherwise don’t run. The template in the Task is responsible for gathering and reporting on the rows together into the generated document.

A single email with multiple attachments - one for each row

I am not certain with the new Automation features the best way to accomplish this scenario (it can be done). So I’ll give the general concept.

Again assuming that you wish to create a Scheduled Bot, you will need at least 2 tasks:

  1. In the first, you would turn ON the “ForEachRowInTable” setting in the Bot and the Task would be set to “Create a new file”. You would then use a template that creates a generated document for each data row. The Task SAVES this generated file with a name you specify in the Task.

  2. The second task would send the single email and attach ALL of the files SAVED in 1) above. You can use an expression to retrieve the files to be attached.

Here is the part I am not sure about. With the new automation, I don’t know if we can run a Task using the “ForEachRowInTable” setting i.e. the task runs multiple times, and then run a Task just once in order to send the email. At the very least this approach could be done with 2 different Bots. If this second approach is the way you wish to send the email, you will need to figure out how to assemble the Tasks in a single Bot or 2 Bots to run them in the correct order/timing.

I hope this helps!!

1 Like