Text parser expression doesn't work on my e-mails

Hello,
I’m new to Make and I’m trying to use it to send Google Play reviews(via Gmail) to a Slack Channel.
I’m not a developer at all but was very proud to have created a regex expression that works on regex101 and in my test flow (with a Set variable), but when I use it with Gmail it doesn’t work.
Does anybody know why?

Here is the expression:

New review on (?<date>.*) GMT\\n(?<note>.*)\\n\\n(?<review>.*)\\n\\nReply

And the Gmail input:

---------- Forwarded message ---------\nDe : Google Play Console <noreply-play-developer-console@google.com>\nDate: dim. 7 janv. 2024 à 03:08\nSubject: A user has written a new review for Sesterce – Share Expenses on\nJanuary 7, 2024\nTo: <xxxx@gmail.com>\n\n\n[image: Google Play Console Logo] <https://play.google.com/console/>\nHello,\n\nWe wanted to let you know that a user wrote a new review for your app. You\ncan write a reply to the user's review on the Play Console.\nNew review on Jan 7, 2024 at 2:08 AM GMT\n★★★\n\nGood app...\n\nReply\n<https://play.google.com/console/developers/6986090176279654299/app/4973983275620276208/user-feedback/review-details?reviewId=7b846ea8-dc73-4564-9632-3b65ceabaddc&corpus=PUBLIC_REVIEWS>\nSincerely,\n*The Google Play team*\nAll replies must follow our posting guidelines\n<https://support.google.com/googleplay/android-developer/answer/138230>.\nIf you have concerns about a user's review, contact support\n<https://support.google.com/googleplay/android-developer/answer/113417>.\nIf you don’t want to receive notifications when users write reviews, update\nyour email preferences\n<https://play.google.com/console/developers/6986090176279654299/notifications>\n.\n

I attached the results with the Gmail input and a set variable (copied from the Gmail input).
Thanks for your help.


Looks like you are not using the Gmail module.

Please use a Gmail module and provide the actual output bundle of the Gmail module.

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
Screenshot_2023-10-06_141025

A.

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading them here will look like this:

module-1-input-bundle.txt (12.3 KB)
module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

This will allow others to better assist you. Thanks!

2 Likes

Thanks for your reply.
I’m a bit confused by it. I am using the Gmail module and I already shared the input in my message.
Here it is again, and the full Gmail output.

GMAIL OUTPUT:

[
    {
        "date": "2024-03-06T12:39:00.000Z",
        "id": 1346,
        "size": 9457,
        "labels": [
            "\\Important",
            "\\Inbox"
        ],
        "xGmMsgid": "1792780523221546904",
        "messageId": "18e13c6326dbf798",
        "threadId": "18e0f62c5dc869e3",
        "messageLink": "https://mail.google.com/mail/u/0/#inbox/18e13c6326dbf798",
        "attachments": [],
        "headers": {
            "received": [
                "by 2002:a2e:90d6:0:b0:2d2:8c42:f1f3 with SMTP id o22csp742828ljg; Wed, 6 Mar 2024 04:39:00 -0800 (PST)",
                "from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id i18-20020a50fc12000000b00567b47ef220sor768232edr.3.2024.03.06.04.39.00 for <xxx@gmail.com> (Google Transport Security); Wed, 06 Mar 2024 04:39:00 -0800 (PST)"
            ],
            "deliveredTo": "xxx@gmail.com",
            "xOriginalFrom": null,
            "replyTo": null,
            "messageId": "<CAPzcJqa74-2BPHZuOHArNikmyr3+keQb5RnOehrF1Tfz8UY0cw@mail.gmail.com>"
        },
        "headersList": [
            {
                "key": "delivered-to",
                "value": "savxxx@gmail.com"
            },
            {
                "key": "received",
                "value": [
                    "by 2002:a2e:90d6:0:b0:2d2:8c42:f1f3 with SMTP id o22csp742828ljg; Wed, 6 Mar 2024 04:39:00 -0800 (PST)",
                    "from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id i18-20020a50fc12000000b00567b47ef220sor768232edr.3.2024.03.06.04.39.00 for <savxxx@gmail.com> (Google Transport Security); Wed, 06 Mar 2024 04:39:00 -0800 (PST)"
                ]
            },
            {
                "key": "x-received",
                "value": [
                    "by 2002:a05:6402:22fb:b0:567:3c07:8bbc with SMTP id dn27-20020a05640222fb00b005673c078bbcmr6069563edb.21.1709728740109; Wed, 06 Mar 2024 04:39:00 -0800 (PST)",
                    "by 2002:a50:cc08:0:b0:566:8fa7:5d0b with SMTP id m8-20020a50cc08000000b005668fa75d0bmr10374642edi.3.1709728739381; Wed, 06 Mar 2024 04:38:59 -0800 (PST)"
                ]
            },
            {
                "key": "arc-seal",
                "value": "i=1; a=rsa-sha256; t=1709728740; cv=none; d=google.com; s=arc-20160816; b=zSfSTy1HQ5sGQ4ibO1V8F+JslYuEFyDBSuv8ycps9jBuvBrOJ/WY9Qor23VVbaBs41 5eshFeEhIIc14j0lESbHbd4zt8k4VckyyfowThkjzq45RlMVoSQa1mhF1orQcmnzQ4Bu JS2L162Q6ZH2vOLQsH3Z6YFt0O1/N+O1ZKYRbe3g9IHhaKEqw4GQ0+dwm3VhtlySli+k h7JFPfCPnCDmg3bSo6Yd8vAT38Yfvue69aXbcwhAAGJ6/Yb/sGDTKt4C080ciGdFdK2Z voeBao2tE9RMvX3Rd5Z8YcUdAwFfnONoqx46atim9jkfK/l/xSdJERyRLTZh+w6HAW0/ +3Bw=="
            },
            {
                "key": "arc-message-signature",
                "value": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=w7NgtocAqqbMz3fzNRpJz386O5usNRzQpoF+PSCDg+E=; fh=A7hjENHUKT1EXD8GnGkB9lPfZCeVIh4KWVG2lgQldlw=; b=yZinv7xDxqaMjwhBp6s4cyp0mWPh0HqEqaTVLr6IO2zqSavzq9jYSyfa6BBo3kuXYw HeJgNxx/wxSJ1dsVAES2bozKqpFm7TbJ3rWbeIgEo7jnHN8fjcaBvltKfRhs3HcoRNiw f8RUGNAop2eiWGt2eIxf/Kc29c/CQnm/Jm2Qk9j4X3zflKFKMQGT+vST3hf/QmKGsxvN IvVBLU6UJDkUH7hTZVdgNOXBx2PO0AUFooZyG3/fJct5Rky7iEyEkybApO0mlaquRCIu +uxhhn1z89eSvY542EWu5ORrmYALXdE8ormjFFc+8L2hR3WA4Ab5hOvDjJUUSOZfxkjr 8beA==; dara=google.com"
            },
            {
                "key": "arc-authentication-results",
                "value": "i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QuMAOsn2; spf=pass (google.com: domain of xxx@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=xxx@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com"
            },
            {
                "key": "return-path",
                "value": "<xxx@gmail.com>"
            },
            {
                "key": "received-spf",
                "value": "pass (google.com: domain of xxx@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;"
            },
            {
                "key": "authentication-results",
                "value": "mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QuMAOsn2; spf=pass (google.com: domain of xxx@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=xxx@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com"
            },
            {
                "key": "dkim-signature",
                "value": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709728739; x=1710333539; dara=google.com; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=w7NgtocAqqbMz3fzNRpJz386O5usNRzQpoF+PSCDg+E=; b=QuMAOsn2v0h8NYRLfJW3WJ9yA4U6oTiUyL2/LFiIJpY/d+9tnSufaJMFZeLYUJ4S+m 6cGZYCvPqvcYBtN956JHQ4jYtmKCWXWVj4RSnC89CCmvCQWyx/v2COdh4iDT87N5ISXw du+lNXS6YvmPbq25j/8udVKr4WmVHtqGlnwweeftBpCzVvIQGIBRYS7MKFBAOxIMk5KJ xtxuHc37w1lGpkV3Ik2am3ru9nS8wILThMj6tl0A3+hO9GUhpMP2yAlWgd5qq3ImvaCY DwhEHu95/o2lCoLvMk/k2CMZXv5zhERvUMGmjxjvQuTplNE8tPDVU7BXfEg1nN9XvQdW +Sdw=="
            },
            {
                "key": "x-google-dkim-signature",
                "value": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709728739; x=1710333539; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w7NgtocAqqbMz3fzNRpJz386O5usNRzQpoF+PSCDg+E=; b=LAW80sDDR2yd7yfsBeHCop9/I8kT4w6HTmFqUIMF/OQlnmboIIMI0vexwp5sq9f1ly etT0/lpFLaOvLHeDzyzmROOcdveysaF5Z8vF2n4JE1mJYvJfW479jvXr0vclnDK11RQz IS/mBrEXFRGgFelO16YFBW2xbKEcKcsNwtJcVwkpryRV8n4eK1Y4SGxgdv9XbJJDIqVo 5FmHYsh0jeWEqbzdAZyYhE39TZJAMHvNRqLSQVCTGosi5+hxuFRaU2fm2AAL9dvYXdIS oyx3ZuR+EjfqDy+1vNQbiV6usMFO9BqdyssWBQ3h16S+mwlVzWpOuQlUpUX+2/G6zHFW 4bKQ=="
            },
            {
                "key": "x-gm-message-state",
                "value": "AOJu0Yxg5xRrYpZvpi9BMzXddhWT5Kjyt7WMqjlA67ZQkMgCGkRXptB3 xjdZRcHvSsvNObon4Y5Y7LDe/6xyf+r7MkOgrpCf/ohlLdLCrbx7fMBB0Mp9WjY9untwQlyB9+x LRDwZfov02yE6gcV0TjHfHdTYbbexMzv7"
            },
            {
                "key": "x-google-smtp-source",
                "value": "AGHT+IGLsqjsT9bq2IFWs4Csg0giqgW/83rcE5SF3WobQ02eHAGmXgQK54+C7YUFjHst+XJqVWC/oaPwvLQytKQaHE4="
            },
            {
                "key": "mime-version",
                "value": "1.0"
            },
            {
                "key": "references",
                "value": "<zySBrKs0Szx-vQWWGeV8jw@notifications.google.com> <CAPzcJqZC=WMfsSiibxwXR7E+8Rpwq=0_y9hm+DRnt8saV==Urg@mail.gmail.com>"
            },
            {
                "key": "in-reply-to",
                "value": "<CAPzcJqZC=WMfsSiibxwXR7E+8Rpwq=0_y9hm+DRnt8saV==Urg@mail.gmail.com>"
            },
            {
                "key": "from",
                "value": "xxx <xxx@gmail.com>"
            },
            {
                "key": "date",
                "value": "Wed, 6 Mar 2024 13:38:23 +0100"
            },
            {
                "key": "message-id",
                "value": "<CAPzcJqa74-2BPHZuOHArNikmyr3+keQb5RnOehrF1Tfz8UY0cw@mail.gmail.com>"
            },
            {
                "key": "subject",
                "value": "Fwd: A user has written a new review for xxx – Share Expenses on March 2, 2024"
            },
            {
                "key": "to",
                "value": "savxxx@gmail.com"
            },
            {
                "key": "content-type",
                "value": "multipart/alternative; boundary=\"0000000000002c5b8c0612fd3e32\""
            }
        ],
        "from": {
            "address": "xxx@gmail.com",
            "name": "xxx"
        },
        "to": [
            {
                "address": "savxxx@gmail.com",
                "name": ""
            }
        ],
        "subject": "Fwd: A user has written a new review for xxx – Share Expenses on March 2, 2024",
        "cc": null,
        "bcc": null,
        "text": "[image: Google Play Console Logo] <https://play.google.com/console/>\nHello,\n\nWe wanted to let you know that a user wrote a new review for your app. You\ncan write a reply to the user's review on the Play Console.\nNew review on Mar 2, 2024 at 4:20 PM GMT\n★★★★★\n\nGenial idea\n\nReply\n<https://play.google.com/console/developers/6986090176279654299/app/4973983275620276208/user-feedback/review-details?reviewId=ba5a4b10-3ecc-41d4-b4c0-08e7bd262e7d&corpus=PUBLIC_REVIEWS>\nSincerely,\n*The Google Play team*\nAll replies must follow our posting guidelines\n<https://support.google.com/googleplay/android-developer/answer/138230>.\nIf you have concerns about a user's review, contact support\n<https://support.google.com/googleplay/android-developer/answer/113417>.\nIf you don’t want to receive notifications when users write reviews, update\nyour email preferences\n<https://play.google.com/console/developers/6986090176279654299/notifications>\n.\n",
        "html": "<div dir=\"ltr\"><br><div class=\"gmail_quote\"><div dir=\"ltr\"><div class=\"gmail_quote\"><br><div><div style=\"background-color:#f5f5f5;font-family:verdana;font-size:12px;color:#555555;line-height:14pt;max-width:680px\"><div style=\"padding:20px;border-bottom:1px solid #ddd\"><a href=\"https://play.google.com/console/\" target=\"_blank\"><img src=\"https://www.gstatic.com/android/market_images/apps_publisher/logo_play_console_email_2023.png\" alt=\"Google Play Console Logo\" style=\"border:none;width:214px;height:36px\"></a></div><div style=\"padding:20px\">Hello,<div style=\"margin:10px 0\"><p>We wanted to let you know that a user wrote a new review for your app. You can write a reply to the user&#39;s review on the Play Console.</p><div style=\"border:1px solid #ddd\"><div style=\"background-color:white;padding:10px\"><div><div><span style=\"color:white;background-color:#f06c02;padding:2px 10px;border-radius:2px\">New review</span> <span style=\"color:#777\">on Mar 2, 2024 at 4:20 PM GMT</span></div><div style=\"font-size:140%;margin:10px 0\" title=\"5 stars out of 5\"><span style=\"color:#777\">★★★★★</span></div><pre style=\"font-family:inherit;white-space:pre-wrap;word-wrap:break-word;font-style:italic;margin-bottom:0\">Genial idea</pre></div><div style=\"line-height:2.3em;margin-top:10px\"><a href=\"https://play.google.com/console/developers/6986090176279654299/app/4973983275620276208/user-feedback/review-details?reviewId=ba5a4b10-3ecc-41d4-b4c0-08e7bd262e7d&amp;corpus=PUBLIC_REVIEWS\" style=\"background-color:#43b9c9;border:1px solid #3ba9b8;border-radius:2px;color:#fff;font-weight:bold;padding:0.5em 0.8em;text-decoration:none\" target=\"_blank\">Reply</a></div></div></div></div>Sincerely,<br><b>The Google Play team</b></div><div style=\"background-color:#f1f1f1;border-top:1px solid #ddd;padding:20px\">All replies must follow our <a href=\"https://support.google.com/googleplay/android-developer/answer/138230\" style=\"font-weight:bold;text-decoration:none;color:#3aaaba\" target=\"_blank\">posting guidelines</a>.<br>If you have concerns about a user&#39;s review, <a href=\"https://support.google.com/googleplay/android-developer/answer/113417\" style=\"font-weight:bold;text-decoration:none;color:#3aaaba\" target=\"_blank\">contact support</a>.<br>If you don’t want to receive notifications when users write reviews, update your <a href=\"https://play.google.com/console/developers/6986090176279654299/notifications\" style=\"font-weight:bold;text-decoration:none;color:#3aaaba\" target=\"_blank\">email preferences</a>.</div></div></div></div></div>\n</div></div>\n",
        "references": [
            "zySBrKs0Szx-vQWWGeV8jw@notifications.google.com",
            "CAPzcJqZC=WMfsSiibxwXR7E+8Rpwq=0_y9hm+DRnt8saV==Urg@mail.gmail.com"
        ],
        "inReplyTo": [
            "CAPzcJqZC=WMfsSiibxwXR7E+8Rpwq=0_y9hm+DRnt8saV==Urg@mail.gmail.com"
        ],
        "priority": "normal"
    }
]

PARSER INPUT:

[
    {
        "text": "[image: Google Play Console Logo] <https://play.google.com/console/>\nHello,\n\nWe wanted to let you know that a user wrote a new review for your app. You\ncan write a reply to the user's review on the Play Console.\nNew review on Mar 2, 2024 at 4:20 PM GMT\n★★★★★\n\nGenial idea\n\nReply\n<https://play.google.com/console/developers/6986090176279654299/app/4973983275620276208/user-feedback/review-details?reviewId=ba5a4b10-3ecc-41d4-b4c0-08e7bd262e7d&corpus=PUBLIC_REVIEWS>\nSincerely,\n*The Google Play team*\nAll replies must follow our posting guidelines\n<https://support.google.com/googleplay/android-developer/answer/138230>.\nIf you have concerns about a user's review, contact support\n<https://support.google.com/googleplay/android-developer/answer/113417>.\nIf you don’t want to receive notifications when users write reviews, update\nyour email preferences\n<https://play.google.com/console/developers/6986090176279654299/notifications>\n.\n"
    }
]

Maybe it wasn’t clear but the parser works perfectly when I enter the text in the set variable module, but not in my flow with a Gmail module.

I’ve solved my issue by replacing newlines by <br>. It seems \n was not recognized correctly by the Parser.

2 Likes

Heya @Johan_Marie :wave:

Great job figuring this out on your own! :clap: Also, thanks a lot for stepping back in here and letting us know what did the final trick for you. This could be super helpful to many others who are facing a similar situation. :pray:

1 Like