Jump to content
  • 1

Automated Email on date


AlexH

Question

Hello all,

I have been playing around with Caspio and really like what I see!  I have several potential projects in mind, but I want to ask about two features I haven't been able to find/figure out.

1)  The database will contain information including fields for email address and an expiration date.  I would like to automate a process to send an automated email to the email address specified in the record at the 30 day mark prior to the expiration date in the record.  The email will contain a link on how to submit a new record.

2) Can I send an automated email with a  link to someone to update a particular record, and only that record? (not as important, but would be nice)

3) Can I create a custom html template to display a particular record?  On the backend, I would like to export one particular record to a specific format so I can save it as a PDF and print it. 

If you can point me in the right direction on any of these, it would be great!

Thanks!!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1

Hello,

Sorry for the delay in response. I have been using the method below to automatically trigger email notifications using the bulk edit feature in tabular reports. I initially reported this as a bit cumbersome but it has been working well the past few months. This is especially helpful if you rely on the notification email type which summarizes and parses notifications nicely, however you can use this for both acknowledgment emails (single record) and notification emails (summary records). I believe Caspio is working on adding email notifications as a feature to triggers, but only for record level notification and not summary notification. This solution below will work for both record detail and/or summary notifications in the meantime.

The steps below will cause the emails to auto trigger when the tabular report URL is opened in your browser, so you can use Windows Task Manager to schedule the tabular report URL to open at a certain time.  It basically does what you would normally do - checkmarks all records and then on bulk popup submits without the need to click anything. You can search on google how to open a URL in windows task manager.  I have been using this method to trigger emails daily for the past 6 months without issue. 

Since tabular reports can only contain up to 999 records per page - if you are triggering less than this you do not need to add the following. However, if you are triggering more than 999 at a time then you will need to add this filter. If you have more than 999 records, when the JS below runs it will only trigger then first 999. It does not refresh the page to trigger remaining, as this would cause an endless loop of emails. So use the filtering method below, if you expect more than 999 per page then you would have to use Windows task manager to open X times (a few minutes apart) to achieve this. Yes, this part is cumbersome but if you need to trigger 99 or less  you don't have to worry about this.

If you set the bulk field as hidden to receive a timestamp, then setup up your datapage filter field to that same timestamp field, set filter to next x days then when the trigger runs your screen will flush out as confirmation the emails have been sent. This serves as a visual display that the trigger has ran (other than looking for the email notification copy). Also it is a safeguard for sending out duplicate emails in case you or someone else refreshes the URL (which would normally cause emails to re-trigger). Lastly, it is a method needed if you trigger more than 999 records at a time. Of course this optional method only works if frequency of emails is daily or greater (daily, weekly, monthly, etc), however you can still run this trigger less than daily without this option.

Lastly, if your datapage is protected with authentication then you would have to set to timeout to maximum 1 week and login at least once a week or your notifications will fail. If you are not using authentication then you don't have to worry, but it is generally a good idea to add authentication especially for bulk email triggers.

1. Create a tabular report and enable the bulk edit feature.

2. Add a hidden field in "configure fields for bulk edit" and receive a value for that hidden field. I generally use a date/time field as this hidden field, and then set the hidden field to receive a timestamp. This way you capture it as an email notification timestamp, and using the optional filter (above) works well with this method.

3. Add your acknowledgment and/or notification email templates.

4. Add the following JS:

Add to Configure Results Page Fields - Header:

<script type="text/javascript">window.jQuery || document.write("<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js'>\x3C/script>")</script>

Add to Configure Results Page Fields - Footer:

<script>
 
$(document).ready(function(){
 
setTimeout(function() {
var checkboxes = $("input[type='checkbox']");

for (i = 0; i < checkboxes.length; i++ ) {
  $(checkboxes).prop('checked', true);
}

$("[data-cb-name='BulkEditButton']").click();

}, 10);
 
});
</script>

Add to Configure Fields for Bulk Edit - Header:

<script type="text/javascript">window.jQuery || document.write("<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js'>\x3C/script>")</script>
<script>

function to_confirm()
{
var alertWindow = document.getElementsByClassName("Dialog")[0];
alertWindow.getElementsByTagName("input")[12].click();
window.parent.close();
}

  if(document.getElementById("caspioform")) { setTimeout(to_confirm,500); }

</script>

Link to comment
Share on other sites

  • 0

Hello,

1) Caspio does not have the ability to trigger email notifications automatically in Caspio Bridge. Your options would be a) have Caspio professional services hard code the email trigger (at additional cost), b ) use Javascript on a bulk edit form to auto generate the email upon URL open and use Windows task manager to schedule (this option works but a bit cumbersome), or c) use a 3rd party service like Zapier to auto generate the email (setup a Caspio import to trigger a table update, which through Zapier would trigger email notification).

2)Yes, if using bulk edit datapage to trigger emails you could create a calculated field with case statement in the table or datapage to produce the custom URL and use it on the email notification.

3) For custom HTML, you can use a details datapage and setup headers/footers/html block to display html data (just set filter to receive parameter, then add at least one field to display, and you can then hide this unused field (see article https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-hide-fields-in-datapages/). 

 

 

 

Link to comment
Share on other sites

  • 0

Caspio should have the ability to trigger email notifications automatically in Caspio Bridge. 

Can I ask you, Carlson, to elaborate a bit about option 2  using JavaScript on a bulk edit form to auto generate the email upon URL open and use Windows task manager to schedule?

More specific, an example for the JS, and how to refer to open/refresh a Caspio page in Windows Task Manager.

Link to comment
Share on other sites

  • 0
On 1/11/2018 at 11:58 AM, Carlson said:

2)Yes, if using bulk edit datapage to trigger emails you could create a calculated field with case statement in the table or datapage to produce the custom URL and use it on the email notification.

I too would love more information about option 2. How can you use bulk edit to trigger emails with Javascript?

Link to comment
Share on other sites

  • 0

Hi, 

Last October 2018, Caspio released new features. The released includes tasks feature. Tasks are very similar to Triggered Actions. The main difference is what triggers them. Tasks are operations that you can create in your application and run them manually or automatically based on a predefined schedule. 

Your workflow can be done using this feature. For more information about this feature, you can go through this article: https://howto.caspio.com/tasks/

 

Regards,

kristina

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.

Guest
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.

Loading...
×
×
  • Create New...