Action
Create Craft Note
Posted by FlohGro,
Last update
about 1 month ago
this action creates a craft note in a configurable space.
before first use please configure it to use your chosen.
You can get it by copying the deepplink of a document in this space. Paste the link into a new draft and extract the combination like “2159f404-e3ed-4d8a-fbe1-6c361399c8f3” after spaceId= in the link. replace “unconfigured” with this id in the spaceID variable of the script.
Steps
-
script
// created by @FlohGro // create Craft note // insert your preferred space ID for a document here. You can get it by copying the deepplink of a document in this space. Paste the link into a new draft and extract the combination like "2159f404-e3ed-4d8a-fbe1-6c361399c8f3" after spaceId= in the link. replace "unconfigured" with this id in the spaceID variable. const spaceID = "unconfigured" if(spaceID == "unconfigured"){ let errorMsg = "the spaceID variable was not configured in the script" alert(errorMsg) context.fail(errorMsg) } else { let title = draft.displayTitle let content = draft.processTemplate("[[body]]") const baseURL = "craftdocs://createdocument?" var cb = CallbackURL.create() cb.baseURL = baseURL cb.addParameter("spaceId",spaceID) cb.addParameter("title",title) cb.addParameter("content",content) cb.addParameter("folderId","") cb.waitForResponse = false cb.open() }
Options
-
After Success Default Notification Info Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.