Random Quote — Confluence Cloud Macro
The macro retrieves a random quote from an external API and displays it in a styled blockquote format. It dynamically fetches and formats the quote and author’s name for visual appeal. The macro is suitable for adding engaging content to Confluence pages, and users can customize its appearance for better alignment with page styles.
Template
#*
Random quote in JSON format from dummyjson.com site
'request' object has headers[], status, and body properties
JSON in response supports .dot notation
HTML supports Atlassian AUI: https://aui.atlassian.com/aui/latest/docs/typography.html
*#
#set($result = $RequestManager.get("https://dummyjson.com/quotes/random"))
<blockquote style="border-left: 2px solid #0052CC; background-color: #F7F8F9; width: 100%;">
<p>
$result.quote
</p>
<cite> $result.author</cite>
</blockquote>You May Also Like
Shows page creation date
Find image within page attachments. Handy for reuse files and update them all at once
Display and interact with an OpenAPI / Swagger specification directly in Confluence by rendering a fully featured Swagger UI from a provided JSON URL
Perform text searches within pages, blog posts, and attachments.
Macro that will show a "Delete me" message only for editors (in the Page Edit mode)
Basic greeting for user
Convert a specified amount of cryptocurrency to fiat currency.
Create dropdown menus in Confluence Cloud with predefined sets of options and permission gates
Improve default Confluence tables with sorting, filtering, pagination, and CSV export features
Create dropdown menus in Confluence Cloud with custom sets of options, multiselect features, and permission gates