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,257,489
Community Members
 
Community Events
164
Community Groups

Creating a User Macro

The documentation indicates that you create a user macro from the General Configuration page. I can't find the link on that page. Am I missing something?

7 answers

1 accepted

6 votes
Answer accepted

User macros cannot be defined by Cloud users, it's a restricted function.  Only server installations can do it.

4 votes
James Dellow Community Leader Jan 11, 2017

User Macros are a feature available in Confluence on-premise.

In Confluence Cloud you create custom macros (and other custom functionality) using the Atlassian Connect framework.

I know this is years old, but it's what I'm trying to do. But how would I use the Connect framework? 

Heh, the Connect framework has been quite superseded by Forge.  Start with a read through https://developer.atlassian.com/platform/forge/

Like Andreas Schwab likes this
James Dellow Community Leader Feb 23, 2022

Yes, but Connect and Forge aren't quite on parity so there might be things you can't do in Forge but can do in Connect. This will change over time, so if you are reading this in the future you'll need to check the documentation for the latest.

Anyone know of a Cloud add-on that allows a user macro function?

Dominic Lagger Community Leader Mar 06, 2022

Don't exist... 

0 votes
James Dellow Community Leader Dec 16, 2020

BTW probably worth mentioning on this thread that in the last 12 months, Atlassian introduced another new cloud development platform, called Forge. It's currently in beta.

Hi everyone,

Is it possible to add Expand All button in Confluence Cloud? I came across this link:

https://community.atlassian.com/t5/Confluence-questions/How-to-create-an-quot-Expand-All-quot-button-for-Confluence/qaq-p/294206?tempId=eyJvaWRjX2NvbnNlbnRfbGFuZ3VhZ2VfdmVyc2lvbiI6IjIuMCIsIm9pZGNfY29uc2VudF9ncmFudGVkX2F0IjoxNjAzODQ3NDg0OTk1fQ%3D%3D#U1518036

But then I saw your discussion about User Macro not possible in Confluence Cloud. Is that right?

Yes, Cloud does not have "user macros" (yet)

Dominic Lagger Community Leader Oct 28, 2020

@Nic Brough _Adaptavist_ 

What do you mean by (yet)?
Is it on the roadmap for cloud?

There are plans to allow for a bit more flexibility, but it won't be user macros as we know them on Server/DC

Is this still true that the Cloud version of JIRA does not support user written macros?

Correct, and we expect it never will.

Like # people like this
Like # people like this

Actually, no, it does not "suck".  A short story:

Last week, I spent 2 hours finding and fixing a strange error message for a client.  They had done something in Confluence Server that broke a space (not a user macro, but similar).  Total accident, one of those things that could happen to anyone.

But 2 hours of expense - ok for big places, but this could have been the client with 20ish users - 2 hours of my time is 6 months of operating their Jira and Confluence costs!

Now consider that Atlassian Cloud supports millions of users who could make similar mistakes, and think through the implications of support time.  It gives you a stark choice between

  • Give people access to functions that they could (and hence will) wreak havoc with and then genuinely demand support to get it fixed.
  • Limit people to the safe functions that won't cause problems

You can imagine that anyone choosing the first is going to have to charge an absolute fortune to supply thousands of expert support operatives who can dive in and fix absolutely everything really quickly.

Atlassian has gone with the second, to keep the price down. 

Personally, if I were a real support agent, I would not want to support anyone who "has enough rope to hang themselves with".  That's exactly what user macros *could* do, even though 99.9% of us will find a better use for the rope, that 0.1% it going to cost far too much and take resources away from others who need help.

Like # people like this

Well thought-out response. I just disagree with it.

Like # people like this

Atlassian does actually provide a pathway for developing enhancements for Cloud. Its not as hard as people think. However, I do wish they would provide people with a way to create simple user macros in Cloud (i.e. no scripts, just text and existing macros). The excerpt macros can be used for this, but there are scenarios where it doesn't work well.

Like # people like this

@Kevin McCreary- I'm not sure what there is to "disagree" with.  Is it the choice Atlassian made not to cost a fortune? 

There's ways to avoid that though, for example:

- make it quick and easy for users to turn macros off or to see which ones are enabled
- disable them until a user manually performs a specific task that needs one then ask permission to enable that macro
- enable them only for a period of time
- only allow macros within an enhanced issue editor that must be explicitly requested by the user
- supply a "safe mode" to quickly disable all but core functionality

There's so many ways to avoid having macros always on and silently changing behaviour without user knowledge. Many of those approaches are tried and tested in applications where security is a concern such as when opening office attachments from MS Outlook or explicitly enabling Outlook macros before being able to run them. 

I'm not saying the choice to not support user macros on cloud is right or wrong - only that there are ways to mitigate the risks involved.

Like # people like this
James Dellow Community Leader Dec 10, 2019

@Vince Swann some of what you've described is actually part of Confluence (server and Cloud) already. However, user macros in Confluence aren't quite the same as macros in the Office suite, so I'm not sure how that exact model would be applied to Confluence. It sounds like you are thinking of automation scripts?

The issue with allowing user macros in Cloud is how they are rendered on a page because they can include scripts. Instead in Cloud you have the option to create either static content macros (simple, no scripts) or dynamic content macros (scripting allowed, but runs inside an iframe). Other Cloud apps that might provide automation features can only run with scoped permissions, which the administrator is aware of when they install it (like when you add an extension to Google Chrome).

@Nic Brough _Adaptavist_/ @James Dellow -- Talking about cost-effectiveness -> how do I convert our widely used 50+ user macros to something usable in the cloud version?

Like # people like this
James Dellow Community Leader Dec 16, 2020

Yes, that's going to be a challenge.

It will depend on what exactly those macros do.

Can you share some examples of the least complex and most complex user macros you have?

Like Nic Brough _Adaptavist_ likes this

Yep, you'll need to look at what each one is doing and find or write a Cloud app to provide the function (assuming Cloud Confluence hasn't implemented something that can cover it)

Like # people like this

Thanks for the quick replies. Right after I posted the question, I found the answer my self. You guys were too quick... I wasn't able to mark it as such!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Presenter Mode for Confluence is here 🖥 👩‍💻

👋  Hello Community!  My name is Stephanie Zhang, and I’m a product manager on the Confluence cloud team. Today, I’m excited to announce the rollout of  Presenter Mode : a ...

2,361 views 19 41
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