I need to include a JSON-parameterized URL in the body of an email action to pre-fill a web form. I can successfully create the link text and send the email but if I attempt to wrap it in an HTML link tag, the resulting URL is missing the parms.
Here's what I need the URL to be ... and if I copy/paste that in my browser, it works fine:
https://www.cognitoforms.com/BrotherhoodMutual/InitialContractTestJira?entry={"JiraIssueKey":"OT-1"}
This is what I have in the email body field in the automation rule. This generates a valid URL (as above) in the resulting email, but is not a hyperlink:
https://www.cognitoforms.com/BrotherhoodMutual/InitialContractTestJira?entry={{issue.key.asJsonObject("JiraIssueKey")}}
This is what I get if I wrap that in an HTML link tag in the body field of the automation rule:
https://www.cognitoforms.com/BrotherhoodMutual/InitialContractTestJira?entry=%7B%7B
... which is obviously a complete fail.
I've made various attempts at wrapping the whole thing ... HTML link tags and all ... in something like
{{#urlEncode}}link{{/}}
or
{{#htmlEncode}}link{{/}}
to no avail.
I'm assuming the answer is in the appropriate syntax to both allow for the use of smart values and link encoding, but I'm clearly out of my depth at this point and I'm hoping you smart folks can point me in the right direction!
Thanks in advance.
@Andreas Knecht, @Simmo : Any chance either of you can point me in the right direction with this?
Hey @Rick Crow ,
Can I get you to tag questions with just automation? We're moving away from the old codebarrel one so these questions can get missed! Like so:
As to your question, could I get you to include some screenshots of how you've configured your rule, including the action you're having trouble with atm?
Cheers,
Simeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Rick Crow ,
Assuming that you haven't changed the email format away from HTML in the "More Options" section, the first thing I'd try doing is:
<a href="https://www.etc...entry={{issue.key.asJsonObject("JiraIssueKey")}}">name of the link here</a>
You'll need to fill in the rest of your URL, but you get the idea. Put your link in the hef and then give it a name. That'll style it as an actual HTML link and hopefully remove some issues. See how you go with that and let me know.
Cheers,
Simeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Simmo Yes, I've tried that ... see my original post for the result ... which looks like this:
https://www.cognitoforms.com/BrotherhoodMutual/InitialContractTestJira?entry=%7B
For some reason, everything beyond the first curly brace is getting clipped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmmm okay @Rick Crow . Best thing to try now is to take a step back and add the log action. Then put your smart value in there and provide a screenshot of the output. Lets check what your smart value is doing.
The other thing to try, which might seem rather whack is this:
{{issue.key.asJsonObject("JiraIssueKey").urlEncode}}
Try that inside the <a href.... suggestion. It'll encode it to go in a URL and so will look funny but the receiving service should understand it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Simmo Bingo! We have a winner. Your last suggestion works ... thanks!
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.