Hi Atlassian community,
I'm hoping someone can help me find the correct regex to target Gravity Forms values in a comment on Trello.
Basically, I am using a Powerup called Sendboard to send Gravity Forms notifications emails to my board. The email is posted as comment on the card and my goal is to create an automation that extracts the form values and add them to custom fields.
Here is an example of an email that I receive when a Gravity Form is submitted:
Here is an example of the regex I'm trying to use that does not work:
I think the issue is related to the fact that there are line breaks involved. I know that Trello uses markdown so I tried many variations using \n\n to account for the line breaks but I cannot seem to get it to work...
Also, here is what the code looks like on the board in case that helps:
Any help on this would be greatly, greatly appreciated!
Hi Kelsey
Here's a butler rule that uses regex to extract 6 different values from incoming emails. You can use this rule exactly as-is to test the output of all 6 wildcards.
regex:/\📩\s\[Email\]\((.*)\) From \*\*(.*?(?=[<]))?<?(.*?(?=[>\*]))>?\*\*[\s\\n\\r]*(?:.*?(?=[\[]))?\[?(.*?(?=\]))?\]?(?:.*?)?[\s\\n\\r]*------[\s\\n\\r]*([\s\S]*?)[\s\\n\\r]*------[\s\\n\\r]*To: (.*)/
Please let me know if there is anything else I can help with.
Hey Wandile,
Thanks for the response. It seems like the regex you provided is basically the same as the regex in this Sendboard article:
Save email details to Trello Custom Fields
Essentially I think it follows the same pattern as the regex mentioned in the article:
📩 [Email]({*}) From **{*}<{*}>**{*}------{*}------{*}To: {*}
My goal is to be able to target individual items within the body of the Sendboard email, not just return the entire email body with a wildcard. For instance, I'm using the following regex to target the same content from the email body in the card description:
regex:/Property Address: (.*?)\nAre you the Owner\?: (.*?)(?:\n|$)/
I've tried countless regex variations to target the content in the email body but it seems like the dividers in the email are causing the issue. The typical line break notation (\n\n) does not work.
Any help on targeting individual items within the body of the Sendboard email would be greatly appreciated!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.