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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,167
Community Members
 
Community Events
176
Community Groups

Sending HTML in the body for custom data from Send Web Request in automation

Hi there,

I am trying to send some lookupobject results to a confluence page via the Send web request in JSM automation but can't get past a 500 error.

As part of the custom data I have this

"body":{"storage":{"value":
"{{#lookupObjects}}
{{Key}}
{{Name}}
{{Created.format("dd/MM/yyyy")}}
{{Updated.format("dd/MM/yyyy")}}
{{/}}","representation":"storage"}}

 tied in with the rest of the process I end up with a page with that in the body but it is just a massive block of text.
I am not sure how to display this in a table format when sent over to confluence.

 

1 answer

0 votes
Darryl Lee Community Leader Dec 05, 2022

Hi @Steven Lees-Smith - I think you'll actually need to convert it into Confluence Wiki Markup format which looks like this:

||heading 1||heading 2||heading 3||
|cell A1|cell A2|cell A3|
|cell B1|cell B2|cell B3|

So in your case, something like this might do the trick:

"||Key||Name||Created||Updated||
{{#lookupObjects}}
|{{Key}}|{{Name}}|{{Created.format("dd/MM/yyyy")}}|{{Updated.format("dd/MM/yyyy")}}|
{{/}}"

Hey @Darryl Lee  I was actually trying that out as I saw something on another site about that.

I don't get the line breaks though, when I tried that out.



"body":{"storage":{"value":
"||Key||Name||Created||Updated||{{#lookupObjects}}|{{Key}}|{{Name}}|{{Created.format("dd/MM/yyyy")}}|{{Updated.format("dd/MM/yyyy")}}|{{/}}","representation":"storage"}}

had me with a mass of text

||Key||Name||Created||Updated|||IEA-1104|LAP-01-APP-2939|05/12/2022|05/12/2022||IEA-1103|LAP-07-APP-4219|05/12/2022|05/12/2022||IEA-1101|LAP-19-APP-0093|05/12/2022|05/12/2022||IEA-1102|LAP-20-APP-1245|05/12/2022|05/12/2022||IEA-1105|LAP-21-TP-2918|05/12/2022|05/12/2022||IEA-1096|LAP-22-APP-2344|05/12/2022|05/12/2022||IEA-1106|LAP-283-APP-2948|05/12/2022|05/12/2022||IEA-1094|LAP-322-APP-4433|05/12/2022|05/12/2022||IEA-1098|LAP-362-APP-3311|05/12/2022|05/12/2022||IEA-1093|LAP-42-APP-3922|05/12/2022|05/12/2022||IEA-1099|LAP-5562-APP-3399|05/12/2022|05/12/2022||IEA-1097|LAP-721-APP-3234|05/12/2022|05/12/2022||IEA-1095|LAP-762-APP-3334|05/12/2022|05/12/2022||IEA-1109|MON-01-E112-1213|05/12/2022|05/12/2022||IEA-1108|MON-01-E229-2775|05/12/2022|05/12/2022||IEA-1107|MON-01-E273-1322|05/12/2022|05/12/2022||IEA-1100|Mon-7712-OO1|05/12/2022|05/12/2022|

oh..   /n

gives me the breaks I need, but now I just need to wrap it all up in a nice evenly spaced table :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS

Atlassian Community Events