Answers.Body: <p>Using Scheduled Reminders would be an alternative approach.</p>
  <p>when you set up a SchRem one of the 'entities' you can choose is 'contact' and once you choose that you then get options like 'created date' so in theory can do 0 hours after Created Date (or try .1 or 1 or something if zero doesn't cause it to fire)</p>
  <p><a href="https://i.sstatic.net/un9tm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/un9tm.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-18T20:40:02.377Z
Answers.Text: That's great.  I am testing it now.  So far I have tried it with various delays, haven't actually seen it send the letter.  I can look in the cron log to see that the job is running every five minutes, but I'm not sure how to read the log... Every five minutes it reports the same thing:  "Success (a:1:{s:9:"processed";i:0;}).  Would it say i=1 if "triggered"  or "Failure" if it wasn't able to send the email?  
  Is it possible it only looks at the "Created Date" and it won't send the email until tomorrow?   
  One last question.  Where/how do I see the "Created Date" for a given Contact?
Answers.UserDisplayName: David Hyman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-19T23:51:42.830Z
Answers.Text: Created date will show at bottom right of a Contact Summary screen
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-19T23:52:11.793Z
Answers.Text: Yes I would expect it to say Failure if job was not succeeding
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-19T23:53:49.347Z
Answers.Text: hmm https://civicrm.stackexchange.com/questions/40399/one-reminder-going-out-and-one-not suggests i have given this advice before with no evidence of it working. sorry
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-21T00:24:34.080Z
Answers.Text: Thanks for the tip on finding created/modified dates.  Small print!
  The Scheduled Reminder does work, sort of, but not for several hours, even though cron job runs every 5 minutes.  Still don't see any difference in the log bbetween "cron job ran, no records to process" and "cron job ran, one record processed, mail sent."  Probably won't work for us.  I'll resume TRYING to mail the CiviRule work.  Thanks!
Answers.UserDisplayName: David Hyman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-21T05:29:32.813Z
Answers.Text: you know you need https://civicrm.org/extensions/e-mail-api
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-21T05:32:12.780Z
Answers.Text: also re 'cron' do you know there is also a setting per job eg "Send Scheduled Reminders (Hourly)"
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-18T18:40:28.137Z
Answers.LastActivityDate: 2022-01-18T18:40:28.137Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I have continued to have problems getting one particular Rule to work.  It is supposed to trigger whenever a new contact is added, and do two things:  Add those new users to a specific group, and send them a welcome email, using a template that works well when we send it individually.</p>
  <p>For a while, the rule would run, but it would send TWO emails.  Then, for no obvious reason, it started not sending the emails at all (although the rule would trigger and add the new account to the correct group).  Looking at the log, I'd see this:</p>
  <p>[rule_title] =&gt; Send welcome email to new sign-ups
  [original_error] =&gt; Civirules api action exception: One of parameters  (value: ) is not of the type Positive. API call: Email.send with params: from_name=&quot;&quot;, from_email=&quot;&quot;, template_id=&quot;72&quot;, disable_smarty=&quot;&quot;, location_type_id=&quot;&quot;, from_email_option=&quot;1&quot;, alternative_receiver_address=&quot;&quot;, cc=&quot;&quot;, bcc=&quot;&quot;, file_on_case=&quot;&quot;, contact_id=&quot;2063&quot;, extra_data=&quot;Array&quot;
  [reason] =&gt; Failed to execute action</p>
  <p>I tried to modify the rule in various ways, and now when I try to add a contact I get the error:
  &quot;There has been a critical error on this website. Please check your site admin email inbox for instructions.&quot;</p>
  <p>We are using CiviCRM 5.45.1. System Status: Ok on Wordpress version: 5.8.3.</p>
  <p>Any suggestions?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-18T02:07:17.493Z
Comments.Text: without wanting to change your approach, would using Scheduled Reminders work for you?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-18T05:34:15.790Z
Comments.Text: Is there a way to use Scheduled Reminders to send an email when someone first gets added to the database?  I have only seen those related to memberships, and these folks are just signing up to be on our mailing list, not actual members.  
  How would I get started looking for a non-membership-related Reminder?
Comments.UserDisplayName: David Hyman
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-18T18:38:44.910Z
Comments.Text: when you set up a SchRem one of the 'entities' you can choose is 'contact' and once you choose that you then get options like 'created date' so in theory can do 0 hours after Created Date
Comments.UserDisplayName: petednz - fuzion
Tags: <civirules>
Title: rules that send emails generate errors
ThreadText: # rules that send emails generate errors
  
  (Asked by: username_0 on 2022-01-17)
  
  I have continued to have problems getting one particular Rule to work. It is supposed to trigger whenever a new contact is added, and do two things: Add those new users to a specific group, and send them a welcome email, using a template that works well when we send it individually.
  
  For a while, the rule would run, but it would send TWO emails. Then, for no obvious reason, it started not sending the emails at all (although the rule would trigger and add the new account to the correct group). Looking at the log, I'd see this:
  
  [rule\_title] => Send welcome email to new sign-ups
  [original\_error] => Civirules api action exception: One of parameters (value: ) is not of the type Positive. API call: Email.send with params: from\_name="", from\_email="", template\_id="72", disable\_smarty="", location\_type\_id="", from\_email\_option="1", alternative\_receiver\_address="", cc="", bcc="", file\_on\_case="", contact\_id="2063", extra\_data="Array"
  [reason] => Failed to execute action
  
  I tried to modify the rule in various ways, and now when I try to add a contact I get the error:
  "There has been a critical error on this website. Please check your site admin email inbox for instructions."
  
  We are using CiviCRM 5.45.1. System Status: Ok on Wordpress version: 5.8.3.
  
  Any suggestions?
  
  **Tags:** civirules
  
  > **Comments:**
  > **username_1**: without wanting to change your approach, would using Scheduled Reminders work for you?  
  > **username_0**: Is there a way to use Scheduled Reminders to send an email when someone first gets added to the database?  I have only seen those related to memberships, and these folks are just signing up to be on our mailing list, not actual members.   How would I get started looking for a non-membership-related Reminder?  
  > **username_1**: when you set up a SchRem one of the 'entities' you can choose is 'contact' and once you choose that you then get options like 'created date' so in theory can do 0 hours after Created Date  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-01-18. Score: 1
  
  Using Scheduled Reminders would be an alternative approach.
  
  when you set up a SchRem one of the 'entities' you can choose is 'contact' and once you choose that you then get options like 'created date' so in theory can do 0 hours after Created Date (or try .1 or 1 or something if zero doesn't cause it to fire)
  
  [![enter image description here](https://i.sstatic.net/un9tm.png)](https://i.sstatic.net/un9tm.png)
  
  > **Comments:**
  > **username_0**: That's great.  I am testing it now.  So far I have tried it with various delays, haven't actually seen it send the letter.  I can look in the cron log to see that the job is running every five minutes, but I'm not sure how to read the log... Every five minutes it reports the same thing:  "Success (a:1:{s:9:"processed";i:0;}).  Would it say i=1 if "triggered"  or "Failure" if it wasn't able to send the email?   Is it possible it only looks at the "Created Date" and it won't send the email until tomorrow?    One last question.  Where/how do I see the "Created Date" for a given Contact?  
  > **username_1**: Created date will show at bottom right of a Contact Summary screen  
  > **username_1**: Yes I would expect it to say Failure if job was not succeeding  
  > **username_1**: hmm https://civicrm.stackexchange.com/questions/40399/one-reminder-going-out-and-one-not suggests i have given this advice before with no evidence of it working. sorry  
  > **username_0**: Thanks for the tip on finding created/modified dates.  Small print! The Scheduled Reminder does work, sort of, but not for several hours, even though cron job runs every 5 minutes.  Still don't see any difference in the log bbetween "cron job ran, no records to process" and "cron job ran, one record processed, mail sent."  Probably won't work for us.  I'll resume TRYING to mail the CiviRule work.  Thanks!  
  > **username_1**: you know you need https://civicrm.org/extensions/e-mail-api  
  > **username_1**: also re 'cron' do you know there is also a setting per job eg "Send Scheduled Reminders (Hourly)"  
  
  ---
  
  