Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JSON-parameterized URL link in email action of automation rule

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.

1 answer

1 accepted

0 votes
Answer accepted

@Andreas Knecht@Simeon Ross : 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:

tags.png

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.

@Simeon Ross Got it.

Heres the screenshot: 80D25ABC-AA3A-4FBB-95FA-17CD253E98B3.jpeg

Simeon Ross Atlassian Team Aug 04, 2020

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.

@Simeon Ross 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.

Simeon Ross Atlassian Team Aug 06, 2020

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.

@Simeon Ross Bingo! We have a winner. Your last suggestion works ... thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

129 views 3 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you