Modules@robinpath/confluence
confluence

@robinpath/confluence

0.1.1Node.jsPublic

Confluence module for RobinPath.

Confluence

Confluence module for RobinPath.

Package: @robinpath/confluence | Category: Productivity | Type: Integration

Authentication

confluence.setCredentials "your-credentials"

Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.

Use Cases

Use the confluence module when you need to:

  • listSpaces -- Use confluence.listSpaces to perform this operation
  • getSpace -- Use confluence.getSpace to perform this operation
  • createSpace -- Use confluence.createSpace to perform this operation
  • listPages -- Use confluence.listPages to perform this operation
  • getPage -- Use confluence.getPage to perform this operation

Quick Reference

FunctionDescriptionReturns
setCredentialsConfigure confluence credentials.object
listSpaceslistSpacesobject
getSpacegetSpaceobject
createSpacecreateSpaceobject
listPageslistPagesobject
getPagegetPageobject
createPagecreatePageobject
updatePageupdatePageobject
deletePagedeletePageobject
listPageChildrenlistPageChildrenobject
getPageByTitlegetPageByTitleobject
searchContentsearchContentobject
listCommentslistCommentsobject
addCommentaddCommentobject
listAttachmentslistAttachmentsobject
getLabelsgetLabelsobject
addLabeladdLabelobject
removeLabelremoveLabelobject
getPageHistorygetPageHistoryobject

Functions

setCredentials

Configure confluence credentials.

Module: confluence | Returns: object -- API response.

confluence.setCredentials
ParameterTypeRequiredDescription
domainstringYesdomain
emailstringYesemail
apiTokenstringYesapiToken

listSpaces

listSpaces

Module: confluence | Returns: object -- API response.

confluence.listSpaces
ParameterTypeRequiredDescription
inputstringNoInput parameter

getSpace

getSpace

Module: confluence | Returns: object -- API response.

confluence.getSpace
ParameterTypeRequiredDescription
inputstringNoInput parameter

createSpace

createSpace

Module: confluence | Returns: object -- API response.

confluence.createSpace
ParameterTypeRequiredDescription
inputstringNoInput parameter

listPages

listPages

Module: confluence | Returns: object -- API response.

confluence.listPages
ParameterTypeRequiredDescription
inputstringNoInput parameter

getPage

getPage

Module: confluence | Returns: object -- API response.

confluence.getPage
ParameterTypeRequiredDescription
inputstringNoInput parameter

createPage

createPage

Module: confluence | Returns: object -- API response.

confluence.createPage
ParameterTypeRequiredDescription
inputstringNoInput parameter

updatePage

updatePage

Module: confluence | Returns: object -- API response.

confluence.updatePage
ParameterTypeRequiredDescription
inputstringNoInput parameter

deletePage

deletePage

Module: confluence | Returns: object -- API response.

confluence.deletePage
ParameterTypeRequiredDescription
inputstringNoInput parameter

listPageChildren

listPageChildren

Module: confluence | Returns: object -- API response.

confluence.listPageChildren
ParameterTypeRequiredDescription
inputstringNoInput parameter

getPageByTitle

getPageByTitle

Module: confluence | Returns: object -- API response.

confluence.getPageByTitle
ParameterTypeRequiredDescription
inputstringNoInput parameter

searchContent

searchContent

Module: confluence | Returns: object -- API response.

confluence.searchContent
ParameterTypeRequiredDescription
inputstringNoInput parameter

listComments

listComments

Module: confluence | Returns: object -- API response.

confluence.listComments
ParameterTypeRequiredDescription
inputstringNoInput parameter

addComment

addComment

Module: confluence | Returns: object -- API response.

confluence.addComment
ParameterTypeRequiredDescription
inputstringNoInput parameter

listAttachments

listAttachments

Module: confluence | Returns: object -- API response.

confluence.listAttachments
ParameterTypeRequiredDescription
inputstringNoInput parameter

getLabels

getLabels

Module: confluence | Returns: object -- API response.

confluence.getLabels
ParameterTypeRequiredDescription
inputstringNoInput parameter

addLabel

addLabel

Module: confluence | Returns: object -- API response.

confluence.addLabel
ParameterTypeRequiredDescription
inputstringNoInput parameter

removeLabel

removeLabel

Module: confluence | Returns: object -- API response.

confluence.removeLabel
ParameterTypeRequiredDescription
inputstringNoInput parameter

getPageHistory

getPageHistory

Module: confluence | Returns: object -- API response.

confluence.getPageHistory
ParameterTypeRequiredDescription
inputstringNoInput parameter

Error Handling

All functions throw on failure. Common errors:

ErrorCause
Confluence API error (${res.status}): ${t}Check the error message for details
confluence.setCredentials requires domain, email, apiToken.Check the error message for details
confluence.updatePage requires an ID.Check the error message for details
confluence.deletePage requires an ID.Check the error message for details
confluence.removeLabel requires an ID.Check the error message for details
Confluence: "..." not configured. Call confluence.setCredentials first.Check the error message for details
@desc "List spaces and validate result"
do
  set $result as confluence.listSpaces
  if $result != null
    print "Success"
  else
    print "No result"
  end
enddo

Recipes

1. List and iterate Spaces

Retrieve all items and loop through them.

@desc "Setup authentication"
do
  confluence.setCredentials $token
enddo

@desc "List spaces and iterate results"
do
  set $result as confluence.listSpaces
  each $item in $result
    print $item
  end
enddo

2. Create a new item with createSpace

Create a new resource and capture the result.

@desc "Setup authentication"
do
  confluence.setCredentials $token
enddo

@desc "Create space"
do
  set $result as confluence.createSpace
  print "Created: " + $result
enddo

3. Create and update workflow

Create an item and then update it.

@desc "Setup authentication"
do
  confluence.setCredentials $token
enddo

@desc "Create space and update page"
do
  set $created as confluence.createSpace
  # Update the created item
  confluence.updatePage
enddo

4. Check before creating

List existing items and only create if needed.

@desc "Setup authentication"
do
  confluence.setCredentials $token
enddo

@desc "List spaces and create space"
do
  set $existing as confluence.listSpaces
  if $existing == null
    confluence.createSpace
    print "Item created"
  else
    print "Item already exists"
  end
enddo

5. Multi-step Confluence workflow

Chain multiple confluence operations together.

@desc "Setup authentication"
do
  confluence.setCredentials $token
enddo

@desc "List spaces, get space, and more"
do
  set $r_listSpaces as confluence.listSpaces
  set $r_getSpace as confluence.getSpace
  set $r_createSpace as confluence.createSpace
  print "All operations complete"
enddo

6. Safe listSpaces with validation

Check results before proceeding.

@desc "Setup authentication"
do
  confluence.setCredentials $token
enddo

@desc "List spaces and validate result"
do
  set $result as confluence.listSpaces
  if $result != null
    print "Success: " + $result
  else
    print "Operation returned no data"
  end
enddo

Related Modules

  • google-sheets -- Google Sheets module for complementary functionality
  • google-calendar -- Google Calendar module for complementary functionality
  • google-contacts -- Google Contacts module for complementary functionality
  • google-forms -- Google Forms module for complementary functionality
  • gmail -- Gmail module for complementary functionality

Versions (1)

VersionTagPublished
0.1.1latest1 months ago
Install
$ robinpath add @robinpath/confluence

Collaborators

Dumitru Balaban
Dumitru Balaban
@dumitru
View all @robinpath modules
Version0.1.1
LicenseMIT
Unpacked Size4.9 KB
Versions1
Weekly Downloads26
Total Downloads26
Stars0
Last Publish1 months ago
Created1 months ago

Category

productivity