Announcement

Collapse
No announcement yet.

Workflow sendEmail error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Workflow sendEmail error

    I have a workflow:

    Target Entity "Contact" and Trigger Type "After Record Saved"

    which triggers a secondary Workflow:

    Target Entity "Contact" and Trigger Type "Sequential"

    (edit)
    which triggers one more workflow:

    Target Entity "Contact" and Trigger Type "Sequential"

    (end edit)

    which sends an email. The email fails to send, the log states:

    [2016-12-28 17:38:05] Espo.ERROR: CronManager: Failed job running, job [5863f840d7ad236d5]. Error Details: Workflow[5863da8e6e2607960][sendEmail]: Email address is empty. [] []
    [2016-12-28 17:39:03] Espo.ERROR: CronManager: Failed job running, job [5863f840d7ad236d5]. Error Details: Workflow[5863da8e6e2607960][sendEmail]: Email address is empty. [] []
    [2016-12-28 17:40:05] Espo.ERROR: CronManager: Failed job running, job [5863f840d7ad236d5]. Error Details: Workflow[5863da8e6e2607960][sendEmail]: Email address is empty. [] []
    [2016-12-28 17:41:05] Espo.ERROR: CronManager: Failed job running, job [5863f840d7ad236d5]. Error Details: Workflow[5863da8e6e2607960][sendEmail]: Email address is empty. [] []


    But the contact clearly has an email.

    I look at scheduled jobs, and here's the item that is failing:

    Scheduled Job
    None
    Service
    Workflow
    Method
    sendEmail
    Data
    {
    "workflowId": "5863da8e6e2607960",
    "entityId": "5835ea2497bec634c",
    "entityName": "Contact",
    "from": {
    "entityName": "User",
    "entityId": "system",
    "type": "currentUser"
    },
    "to": {
    "entityName": "Contact",
    "entityId": "5835ea2497bec634c",
    "type": "targetEntity"
    },
    "emailTemplateId": "58503f54e7c041018",
    "doNotStore": false
    }

    I can confirm that entity "5835ea2497bec634c" has an email and is correct. Ideas?
    Last edited by FredFredrickson; 12-28-2016, 06:08 PM.

  • #2
    I can confirm, sending an email in the parent workflow works fine.

    It does not work when you've chained two or more workflows in a row.

    Edit: Sorry, Two chained workflows will send mail. The third workflow does not.
    Last edited by FredFredrickson; 12-28-2016, 06:02 PM.

    Comment


    • #3
      It looks like it's trying to do additional workflows with USER: System rather than the originating user. System does not have an email address. How do I fix that?

      Comment


      • #4
        I tested it with 5 chained workflows. It works fine for me. Do you use the latest Advanced Pack 1.6.0?
        Job Offers and Requests

        Comment


        • FredFredrickson
          FredFredrickson commented
          Editing a comment
          I found the problem. The third chained workflow no longer has a user assigned to the workflow, it defaults to system, who didn't have a from: email address.
      Working...
      X