I want to send email to all member when confluence page is updated or created.
but it was hard to find script example.
Please tell me sending email on the confluence cloud with script runner.
if there is another solution besides script-runner please tell me!
Thanks!
#scriptrunner
Welcome to the Atlassian Community!
The examples here are for Jira, but the "send email" code will work with Confluence (and Bitbucket) too - have a skim through https://docs.adaptavist.com/sr4jc/latest/features/script-listeners/script-listener-examples
Again, the example is for Jira, but will work with Confluence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi thanks for the reply
I tried, but failed.. :(
I don't know what to write in the post part..
Is there api for confluence to send email?
def resp = post("/wiki/rest/api/content/{id}")
.header("Content-Type", "application/json")
.body([
subject: 'Priority Increased',
textBody: "textMessage",
htmlBody: "<p>htmlMessage</p>",
to: [
watchers: true,
voters: true,
users: [[
name: '체험공유'
]],
groups: [[
name: 'allmember'
]]
]
]).asString()
assert resp.status == 204
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.