Workflow send welcome email to lead created

Hello Fellow users & contributors,

I have created a workflow, that sends a welcome email to every opportunity created. Be it lead converted to opportunity, or direct opportunity.

Steps that i have done to create the workflow is as follows.

  1. Created a email template
  2. Created a workflow for oportunity moduele, that runs on save.
  3. set the conditions which states if the created by user is me
  4. action is set to send email.

Now i have two things here, which i used for the test
a) i have sent the To > Related field > Leads
b) i have set a CC to user as myself.

Now the problem is, somehow (a) is not working. Where as, when i remove the (a) and run only (b) as"To", The email is delivered.

Also, i dont find “record email” filed. Insted in the dropdown it is “related field”

Any advice regarding this is highly appreciated.

Hi designer

1 - have you tried changing this workflow to focus on Lead record on relationship with opportunity?

2 - ‘Also, i dont find “record email” filed. Insted in the dropdown it is “related field”’

Opportunities do not have an email address field this is why AOW is only giving you the option for related

Hope this helps

thank you for your response @TaufiqueAhmed

Things are working good now. Sorry that i have not replied to this topic.

  1. I had kept it as leads module only for the workflow. I dint need to add any relationships, it worked by itself

  2. yes, figured that.

The problem i had was with the schedulers and cron. It was related to the permission settings.
I am using godaddy shared server (Linux)

Its all good for the moment.

Except that am getting a lof of

16-Jan-2020 16:14:01 UTC] PHP Fatal error: Uncaught Exception: cron.php is CLI only. in /home/…/include/utils.php:1795
Stack trace:
#0 /home/…/cron.php(52): sugar_die(‘cron.php is CLI…’)
#1 {main}
thrown in /home/…/include/utils.php on line 1795

and

mysql gone away

Any advice on these?

@pgr @coccoinomane

This is a serious error, your MySQL is crashing (not an error, a crash)

There are plenty of possible causes.

Please make sure you get rid of that, before anything else.

This just means you’re starting your cron jobs in an unofficial, unsupported way, right? But that is not necessarily a problem. If you’re deliberately using the web server for the cron.php call, instead of CLI PHP, then just disable that message. There are several threads here in the forums discussing how to do this.

@pgr thank you for your response, and sorry for the delay in replying.

  1. I am on godaddy shared server, i have limited access to anything. More over the support is very pathetic on godaddy. So there is little i can do about it. We will be moving for VPS by the end of this year. But till then, we are stuck with this.
    I am unable to do any tweaks to mysql process.

  2. I don’t have any special cron running manually. Its just the regular work flow. I dont understand the reason this fatal error is generated.
    I commented the CLI error in cron.php to stop getting the error. It did stop that one. But it still showed some fatal error linked to utils.php and other set of new errors.

Also, there are a hell lot of PHP deprecated logs generating every minute almost.

You have to turn OFF PHP settings for display_error. Also change your error_reporting settings to only display ERRORS

error_reporting(E_ERROR | E_WARNING | E_PARSE);

Somehow after the php version update, the errors have reduced a lot. Except for the cron.php CLI.

Thank your everyone for all your help @pgr @cherub-chum @TaufiqueAhmed

Everything looks good now.

The below post helped me solve the problem

First thing I had to do was remove the ‘cd’ and then I had to remove the “; php -f” Be sure to remove that semicolon too.
Then I had to replace put a forward slash where the semicolon was and add the cron.php to it which made it look like below:

/home/[color=#880000]here-will-be-different[/color]/public_html/[color=#880000]here-will-be-different[/color]/[color=#880000]is-going-tobe-different[/color]/cron.php

Then go to your Godaddy cPanel and add the Godaddy cron code and then your code. It should look something like it does below:

/usr/local/bin/php -q /home/[color=#880000]here-will-be-different[/color]/public_html/[color=#880000]here-will-be-different[/color]/[color=#880000]is-going-tobe-different[/color]/cron.php > /dev/null 2>&1

Just edit that code by replacing the red and boldsections and paste it in the ‘Command’ box in your Godaddy cpanel and save it. It should take less than a minute to start working if it was done correctly.

1 Like

Thread Closed. From my side.