Jump to content
  • 0

Task to group records by user and send an email



I have two tables



The two are related using USERS.userID and TODOS.userID

I would like to send a periodic email to each user listing all of their todo's in the body of the email.

I am having a hard time wrapping my head around it because the only other time I have used a task to send an email I was just sending one email per record in the dataset. For this it seems I will have to use some sort of loop.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

I such cases I split the issue in order to get near the solution step-by-step.

1) First of all make a view between the two. This is in order to have in the same place userinfo, like email, firstname and lastname, and todo details.

2) then make a scheduled task that using this view and send email for eac record

One note: the table dimensions could make the task "unrunnable" due to CASPIO limits on records affected.
Did you expect this type of response or did you want a more detailed one?

Link to comment
Share on other sites

  • 0
10 hours ago, CoopperBackpack said:

Hello @JoeyBrannon,

If I got the question correctly, you may check this thread. I provided an explanation of the Task design there. 
I would recommend testing this Task using the table with a couple of emails in order not to send too many emails while testing.


That solution worked well. It is currently functional, but not super readable. Is there a way to add additional formatting to the table  variable when it is inserted into the email as well as change the column headers to something other than the field name?

Screenshot 2023-10-30 at 5.36.24 PM.png

Link to comment
Share on other sites

  • 0

Hello @JoeyBrannon,

It is possible to rename column headers using the workaround described in this thread.
The idea is to use Expressions:

This forum post can be helpful too:

Please note that every email client renders the email content differently, so it is really difficult to customize the content.

As for me, the email content from your screenshot looks like 'Plain Text' and not 'HTML'.
Did you use HTML? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...