Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Confluence automation rules via REST API - getting 404 errors

Ganesh Naiknavare
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 8, 2025

 

I'm trying to create automation rules in Confluence Cloud programmatically using the REST API, but I'm getting 404 errors on all automation endpoints.

What I'm trying to do:

  • Create an automation rule that triggers when a page is edited
  • Send a webhook POST request to an external URL when the trigger fires
  • Using Python with requests library and proper authentication

Endpoints I've tried:

  • https://[site].atlassian.net/wiki/rest/api/automation/rule → 404
  • https://[site].atlassian.net/wiki/rest/api/automation → 404
  • https://[site].atlassian.net/rest/api/automation/rule → 404

What works:

  • Basic Confluence REST API endpoints (like /rest/api/space) work fine with my credentials
  • Authentication is working properly

Questions:

  1. Does Confluence Cloud support automation rule creation via REST API?
  2. If yes, what is the correct API endpoint?
  3. Do I need to install the "Automation for Confluence" app first?
  4. Are there any specific permissions or product plan requirements?
  5. Is there alternative API documentation for automation endpoints?

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Champion
July 8, 2025

Hi @Ganesh Naiknavare and welcome,

please take a look to the following documentation https://developer.atlassian.com/cloud/automation/rest/intro/#about in order to retrieve information about what type of operation you can perform on automation through rest api.

Hope this clarifies,

Fabio

Ganesh Naiknavare
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2025

Send an email when a Confluence page is updated.


Please check my code and give me suggestion based on this
import requests
import json

# Configuration variables
USER_EMAIL = "" # Email address to receive notifications
CLOUD_ID = "" # Your Confluence cloud ID
API_TOKEN = "" # Atlassian API token
SPACE_KEY = "" # Optional: only needed if you plan to filter by space
EMAIL = "" # Not used in the script – can be removed

# Confluence Automation API endpoint
url = f"https://api.atlassian.com/automation/public/confluence/{CLOUD_ID}/rest/v1/rule"

# HTTP headers
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {API_TOKEN}"
}

# Automation rule payload
payload = {
"rule": {
"name": "Page Updated Email Notification",
"description": "Send email when page is updated",
"state": "ENABLED",
"trigger": {
"component": "TRIGGER",
"type": "confluence.page.updated",
"schemaVersion": 1,
"value": {}
},
"components": [
{
"component": "ACTION",
"type": "confluence.send.email",
"schemaVersion": 1,
"value": {
"to": {
"type": "static",
"value": USER_EMAIL
},
"subject": {
"type": "smart",
"value": "Page Updated: {{page.title}}"
},
"body": {
"type": "smart",
"value": (
"Page '{{page.title}}' in space '{{page.space.name}}' "
"was updated by {{user.displayName}} at {{now}}.\n\n"
"View page: {{page.url}}"
)
}
}
}
]
}
}

# Send POST request to create automation rule
response = requests.post(url, headers=headers, json=payload)

# Print response
print(f"Status: {response.status_code}")
print(f"Response: {response.text}")

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events