none
Why is the gmail connector trigger skipping new incoming email? RRS feed

  • Question

  • In one of my Logic Apps I'm using gmail connector trigger "when a new email arrives", but it doesn't seem to be working correctly on the mail that I want to use it with.

    I'm sending email that it should detect when the trigger is run, but the trigger history simply shows the trigger is skipping and therefor not firing the rest of the workflow.

    How can I debug this issue?

    The following json is the trigger section of the logic app:

        {
            "When_a_new_email_arrives": {
                "description": "",
                "inputs": {
                    "host": {
                        "connection": {
                            "name": "@parameters('$connections')['gmail']['connectionId']"
                        }
                    },
                    "method": "get",
                    "path": "/Mail/OnNewEmail",
                    "queries": {
                        "fetchOnlyWithAttachments": false,
                        "from": "secret@secret.com",
                        "importance": "All",
                        "includeAttachments": false,
                        "label": "INBOX",
                        "starred": "All",
                        "subject": "something"
                    }
                },
                "recurrence": {
                    "frequency": "Day",
                    "interval": 1,
                    "startTime": "2019-08-17T08:40:00Z"
                },
                "type": "ApiConnection"
            }
        }

    It setup to runs ones every day, although for testing purposes I'm running the trigger manually.

    Update 1

    I've tried sending the mail from my own mail adress after configuring the from-parameter in the trigger and that works as intented. So I think the issue might be due to something about the senders original mail message. I did some digging, and pulled out the original raw mail from gmail. It contains some logging information from gmail servers. Appearently something called DMARC authentication have failed. I wonder if this has anything do the problem that is arising, maybe the gmail connector will not accept the senders identity.

    Here's the part about DMARC in the raw mail message:

    Authentication-Results: mx.google.com;
           spf=pass (google.com: domain of source-company@company-product.com designates 85.236.67.1 as permitted sender) smtp.mailfrom=source-company@company-product.com;
           dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=source-company.com

    Could this be the reason the connector does not detect these mails?


    • Edited by Kaveh Hadjari 2 Saturday, August 17, 2019 2:38 PM more information
    Saturday, August 17, 2019 10:40 AM

All replies

  • This is already been replied on SO thread

    Posting it here so that it is beneficial to other members of the community.

    "For this issue I did some test but I haven't met this issue. In my logic app, I set the "How often do you want to check for items?" box as 10 minutes. I didn't run the trigger manually(I didn't click the "Run" button). Then I sent an email to my gmail, and after about 10 minutes, when the trigger went to check my gmail, the logic app run the actions under the trigger successfully. Apart from this, if I sent two emails to my gmail in these ten minutes, the trigger will not be triggered twice, it will be triggered just once.

    I saw you mentioned set once every day in your description. So for example, if you completed the configuration of the logic app at 1:00 pm, and your gmail received an email at 2:00 pm, it will not run the actions under the trigger at once. The trigger will check your gmail at 1:00 pm tomorrow, so the actions under the trigger will also run at 1:00 pm tomorrow. But when you test this logic app, if you run the logic app manually, when your gmail received an email, it will triggered at once"

    Monday, August 26, 2019 2:50 AM
    Moderator
  • Any updates on this ?
    Thursday, August 29, 2019 3:02 AM
    Moderator
  • Authentication-Results: mx.google.com; spf=pass (google.com: domain of source-company@company-product.com designates 85.236.67.1 as permitted sender) smtp.mailfrom=source-company@company-product.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=source-company.com

    This looks like an alignment error. So DMARC passes if :

    spf = pass or dkim = pass AND alignment between header-from and envelope-from or DKIM domain.

    I don't know the application you are using but if it relies on the mail delivery and that DMARC passes it could be it.

    How ever your domain dmarc policy is p=none which means it should be delivered even if dmarc fails.

    Monday, October 21, 2019 12:49 PM