Skip to content

Latest commit

 

History

History
376 lines (343 loc) · 15 KB

File metadata and controls

376 lines (343 loc) · 15 KB

scaleuptechnologies.outline_api.document_create

Create a document in Outline

Version added: 0.0.1

  • Create a new document in Outline.
  • By default a document is set to the collection root.
  • If you want to create a nested/child document, you should pass parent_document_id.
Parameter Choices/Defaults Comments
api_endpoint
string / required
URL of your Outline instance API (e.g. V(https://app.getoutline.com/api))
You can also set this option by using the E(OUTLINE_API_URL) environment variable
api_token
string / required
API Token
You can also set this option by using the E(OUTLINE_API_TOKEN) environment variable
collection_id
string / required
Identifier for the collection to create the document in.
parent_document_id
string
Identifier for the document this should be a child of.
publish
boolean
    Choices:
  • no ←
  • yes
Whether this document should be immediately published
and made visible to other team members.
template
boolean
    Choices:
  • no ←
  • yes
Whether this document should be considered to be a template.
template_id
string
Identifier for the template to create this document from.
text
string
Default:
""
The body of the document, may contain markdown formatting.
title
string / required
The title of the document.

- name: Create a simple document
  scaleuptechnologies.outline_api.document_create:
    api_endpoint: https://outline.example.com/api
    api_token: secret_token
    title: "My Document"
    collection_id: "c99ad6f3-04b8-4181-aa20-5d5670f5f984"
    text: "# Hello World\n\nThis is my document"
    publish: true

- name: Create a document from template
  scaleuptechnologies.outline_api.document_create:
    api_endpoint: https://outline.example.com/api
    api_token: secret_token
    title: "My Document from Template"
    collection_id: "c99ad6f3-04b8-4181-aa20-5d5670f5f984"
    template_id: "bed4fe68-7b0b-496f-988b-ca31333e23fb"
    publish: true

- name: Create a nested document
  scaleuptechnologies.outline_api.document_create:
    api_endpoint: https://outline.example.com/api
    api_token: secret_token
    title: "Child Document"
    collection_id: "c99ad6f3-04b8-4181-aa20-5d5670f5f984"
    parent_document_id: "a79c0232-3d65-43b1-b676-7ecadc57a08f"
    text: "This is a child document"

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
document
dictionary
always
The created document object

 
collectionId
string
The ID of the collection this document belongs to

Sample:
c99ad6f3-04b8-4181-aa20-5d5670f5f984
 
createdAt
string
Timestamp when the document was created

Sample:
2024-01-20T12:00:00.000Z
 
id
string
Unique identifier for the document

Sample:
a79c0232-3d65-43b1-b676-7ecadc57a08f
 
text
string
The text content of the document

Sample:
# Hello World
 
title
string
The title of the document

Sample:
My Document
 
updatedAt
string
Timestamp when the document was last updated

Sample:
2024-01-20T12:00:00.000Z


Authors

  • Moritz Jannasch (@mojansch)