Link Search Menu Expand Document

Service Action Steps

Table of Contents

  1. File
  2. Twitter
  3. Mastodon
  4. Dropbox
  5. Notion
  6. Airtable
  7. Evernote
  8. WordPress
  9. Ghost
  10. Medium
  11. Google Drive
  12. Gmail
  13. Google Task
  14. List in Google Tasks
  15. Box
  16. OneDrive
  17. OneNote
  18. Outlook
  19. Microsoft To Do
  20. List in Microsoft To Do
  21. Todoist
  22. WebDAV

File

iOS macOS

Create or modify files in the iCloud Drive “Drafts” folder or local storage. It is not possible to modify files outside the app’s iCloud Drive folder.

Examples

Options

  • Name: Template for file name, including extension.
  • Path: Template for folder path, relative to root directory. For local files, this is the app “Documents” folder, for iCloud Drive it is the “Drafts” folder in iCloud Drive.
  • Tags: Template for Finder tags to assign to the exported file. Should be a comma-separated list of tags. To use the tags assigned to the current draft, use the [[tags]].
  • Template: Template for the content of the file.
  • Write Type:
    • create: Create a new file. If an existing file already exists at the location, create as new file with a number suffix added.
    • replace: Create new file, overwriting an existing if it exists.
    • prepend: Prepend template content at the beginning of the file. Create the file if it does not already exist.
    • append: Append template content at the end of the file. Create the file if it does not already exist.
  • Destination: Should the file be in app local storage or iCloud Drive.
    • Local: File stored in app container. These documents are visible in the file system, and should only be used internally with Drafts actions.
    • iCloud Drive: Paths relative to the “Drafts” folder in iCloud Drive.
    • Bookmark: Paths relative to the folder associated with the named Bookmark provided.
  • Maintain date: If enabled, the creation date of the current draft will be assigned to newly created files, and the modification set to the last modification date of the draft.

Twitter

iOS macOS

Twitter (X) is no longer supported directly due to API policy changes at their end. For details on other methods of integration, see our integration guide


Mastodon

iOS macOS

Post a status update to a Mastodon instance. Use steps with alternate identifiers to target multiple accounts.

Learn more in our Using Mastodon with Drafts guide.

Examples

Options

  • Host: The domain name of the Mastodon instance hosting your account. Use only the domain (i.e. mastodon.social), not the full URL.
  • Template: Template for the content of the post.
  • Content Warning Template: If this template results in a non-empty value, it will be used as the Content Warning for the Mastodon post.
  • Visibility: Visibility of the post.
  • Sensitive Content: If enabled, the post will be marked as sensitive content.
  • Identifier: Arbitrary string identifier for the credentials to use. This value is only needed if you wish to use more than one account with Drafts. If used, all actions with the same identifier should use the same “host” value and will share credentials.

Dropbox

iOS macOS

Create, append or prepend to files in Dropbox. For more information about using Dropbox with Drafts, see our Dropbox integration guide, which covers more advanced scripted actions and API usage.

Learn more in our Using Dropbox with Drafts guide.

Examples

Options

  • Name: Template for file name, including extension.
  • Path: Path of folder, relative to Dropbox root, to place file. Default “/” is the root of your Dropbox folder.
  • Template: Template for the content of the file.
  • Write Type:
    • create: Create a new file. If an existing file already exists at the location, create as new file with a number suffix added.
    • replace: Create new file, overwriting an existing if it exists.
    • prepend: Prepend template content at the beginning of the file. Create the file if it does not already exist.
    • append: Append template content at the end of the file. Create the file if it does not already exist.
  • Identifier: A string identifier for the Dropbox account to use. This value is only needed if you wish to use more than one Dropbox account with Drafts. If used, all actions with the same identifier will use the same alternate login for Dropbox.

Notion

iOS macOS

Create or append to pages in Notion.

Learn more in our Using Notion with Drafts guide.

Examples

Options

  • Parent Selection:
    • Ask Each Time: When the action is run, prompt to select from recent pages in Notion which have been shared with the Drafts integration.
    • Assign: Select a specific Page ID to use each time this action is run.
  • Parent Page: The Page ID of a Notion page to target with this action. Only used if “Assign” is selected above. The page ID change be selected using the select button, or copy and paste from the Notion website. This page must be shared with the “Drafts” integration.
  • Add As:
    • New Page: The action will add content as a new sub-page of the parent page. If the Title option below is not empty, it will be used as the title of the new page.
    • Append to Page: The action will append content to the end of the parent page. If the Title option below is not empty, it will be added as a heading above the content returned by the template.
  • Format: Format to use creating content. Options are:
    • Text: Add as plain text paragraph element.
    • To Do List: Add each line of text returned by the template below as a to do item in a list. If the lines in Drafts start with Markdown style list markup, it will be stripped.
  • Title: Template for the title. If adding as “New Page”, it will be used as page title. If appending, it will be added a heading.
  • Template: Template for the content of the page.
  • Open page in Notion: If enabled, after successfully running the action, the URL of the target page will be opened.

Airtable

iOS macOS

Create records in an Airtable table. Allows you to insert a record with up to five field values in an existing table. For details on finding the required base and table IDs, see this Airtable article

Learn more in our Using Airtable with Drafts guide.

Examples

Options

  • Base ID: The unique identifier of a “base” in your Airtable account. Use the “Select” button to choose from a list of bases in the authenticated Airtable account, or paste from and Airtable URL.
  • Table ID or Name: The exact name, or unique identifier of, a table in the base selected above.
  • Field Names and Values: Configure up to five field names and values to send. Field names and value use templates to generate values. Field names must be exact matches (case-sensitive) for fields in the targetted table. Values should be strings that can be coerced (by Airtable) into valid value for the field. See the integration guide for more discussion of field types and values.

Evernote

iOS macOS

Create, append or prepend to notes in Evernote.

Learn more in our Using Evernote with Drafts guide.

Examples

Options

  • Note: Template for note name.
  • Notebook: Template for name of an existing Notebook in your Evernote account. Leave blank to use the default notebook.
  • Tags: Template for tags to assign the note. Should be comma-delimited list of tags. If they do not exist, they will be created. Use the [[tags]] template tag to assign draft tags.
  • Template: Template for the content of the note.
  • Template Output Format: The type of output from the above template property. Evernote uses it’s own HTML-like ENML markup for notes and conversion needs to be done before saving. This setting determines how Drafts will apply conversion. Options are:
    • Text: Assume the output of the template plain text. Drafts will convert the plain text to ENML by adding line feed tags.
    • Markdown: Assume the template output is Markdown. If you want Markdown syntax to be converted to rich-text in Evernote, choose “Markdown”. Drafts will take the output of the template and run it through the Markdown processor to convert to X-HTML before sending to Evernote.
    • ENML: Assume the output of the template is already valid ENML. This is an advanced setting for cases where scripting or special output is already configured with the necessary valid ENML tags.
  • Write Type:
    • create: Create a new note.
    • replace: Create new note, overwriting an existing one with the same name, if it exists.
    • prepend: Prepend template content at the beginning of the note. Create the note if it does not already exist.
    • append: Append template content at the end of the note. Create the note if it does not already exist.

WordPress

iOS macOS

Post to a WordPress site. This action relies on the WordPress XML-RPC API, which is active by default on most newer WordPress installations, but may be subject to rate limits or blocking on some hosts.

Learn more in our Using WordPress with Drafts guide.

Examples

Options

  • Credential Identifier: A friendly name for the associated credentials used for this action. The first time the action is run, the user will be prompted to enter the WordPress site home page URL, and their username/password. This information will be stored for future use and can be reset in Settings > Credentials. If you only post to one WordPress site, leave this blank. If you post to more than one site, each WordPress action with the same credential identifier will share the same credentials.
  • Post Title: Template for post title.
  • Post Content: Template for content of the post.
  • Post Status: Status of the post once it is created. Default is “Draft”.
  • Visibility: Select if post should be public, or only available to members or paid members.
  • Post Format: Default “Standard”.
  • Categories: Comma-delimited list of categories to assign to the post. If the category does not already exist it will be created.
  • Tags: Comma-delimited list of tags to assign to the post. If the tag does not exist it will be created.
  • Post Slug: Optional URL slug for the post. The result of this field will be URL encoded.
  • Excerpt: Optional shorter excerpt to display in blog listing.
  • Custom Fields: The step can also accept two named custom fields and values. If used, the name of the custom fields should match ones which already have already been created in your WordPress site.

Ghost

iOS macOS

Post to a Ghost site.

Learn more in our Using Ghost with Drafts guide.

Examples

Options

  • Credential Identifier: A friendly name for the associated credentials used for this action. The first time the action is run, the user will be prompted to enter the Ghost site home page URL, and their staff access token. This information will be stored for future use and can be reset in Settings > Credentials. If you only post to one Ghost site, leave this blank. If you post to more than one site, each Ghost action with the same credential identifier will share the same credentials.
  • Title: Template for post title, default: [[display_title]]
  • Body: Template for content of the post, default: [[body]]
  • Body Output: Either “Markdown” or “HTML”. Ghost posts are in HTML, if “HTML” is selected, Drafts assumes the output of the body template is already well-formed HTML. If “Markdown”, the content will be passed through the Markdown parser to convert to HTML before uploading.
  • Post Status: Status of the post once it is created. Default is “Draft”.
  • Tags: A comma-separated list of tags to assign the post. Defaults to [[tags]] to pass the tags assigned in Drafts.
  • Featured: Should the post be featured.
  • Post Slug: Optional URL slug for the post. The result of this field will be URL encoded.
  • Excerpt: Optional shorter excerpt to display in blog listing.
  • Open Post: If enabled, the post created will be opened in your default browser.

Medium

iOS macOS

Post to a Medium.com stories.

Examples

Options

  • Post Title: Template for post title.
  • Content: Template for content of the post.
  • Content Format: Either Markdown or HTML. The output of the Content template should be in the this format.
  • Published Status: Status of the post once it is created. Default is “Draft”, in which case the story will appear in your Medium drafts ready to be published. “Public” will post as a visible public post, and “Unlisted” will be available not included in listings and searches.
  • Tags: Comma-delimited list of tags to assign to the post.
  • Canonical URL: Optional URL linking to original source URL for the material if it published elsewhere.
  • Excerpt: Optional shorter excerpt to display in blog listing.
  • Notify Followers: Indicate whether followers should receive notification of the publication of this post.
  • Credential Identifier: A string identifier for the Mediu, account to use. This value is only needed if you wish to use more than one account with Drafts. If used, all actions with the same identifier will use the same alternate login for Medium.

Google Drive

iOS macOS

Create, append or prepend to files in Google Drive.

Examples

Options

  • Name: Template for file name, including extension.
  • Parent: Leave blank for root level of Google Drive, or include the name of a folder in the root level of Google Drive. The folder will be created when the action is run if it does not already exist.
  • Template: Template for the content of the file.
  • Template Output Format: The above template should be assumed to output text in the format selected here. Options are:
    • Text: The template outputs plain text. No further processing will be done.
    • Markdown: The template outputs Markdown and should be converted to HTML by the Markdown processor.
    • HTML: The template outputs fully formed HTML. This allows style and formatting information to be included to control output. Useful when combined with Upload Type parameter to create formatted Docs or PDFs.
  • Write Type:
    • create: Create a new file. If an existing file already exists at the location, create as new file with a number suffix added.
    • replace: Create new file, overwriting an existing if it exists.
    • prepend: Prepend template content at the beginning of the file. Create the file if it does not already exist. Only valid for Upload Type = Text.
    • append: Append template content at the end of the file. Create the file if it does not already exist. Only valid for Upload Type = Text.
  • Upload Type: This is used as a hint to tell Google Drive to convert the uploaded content to this type of file after upload. Combined with HTML input, this allow detailed control of uploaded documents.
  • Credential Identifier: A string identifier for the Google Drive account to use. This value is only needed if you wish to use more than one account with Drafts. If used, all actions with the same identifier will use the same alternate login for Google Drive.

Gmail

iOS macOS

Send pre-configured email messages in the background using Google Gmail and GSuite accounts. This step sends mail using the Gmail API.

Lwarn more in our [Sending Mail with Drafts[(https://forums.getdrafts.com/t/sending-mail-with-drafts/3597) guide.

Examples

Options

  • Recipients: Comma separated list of recipient emails for each of the recipient types. These can be just email address, or Name <email> formatted - like “Joe Smith joe@smith.com, Jane Doe jane@doe.com”.
    • To
    • CC
    • BCC
  • Subject: Template for the subject line.
  • Body: Template for content of the message. If “Send as HTML” is enabled, this template is expected to output valid HTML, otherwise plain text.
  • From: Usually left blank, but can be included to override Gmail’s default “From” value, in the format Name <email>
  • Send as HTML: If enabled, the mail is sent as formatted HTML email and the body template should output fully formed HTML. The most common use of this option is to run Markdown to HTML conversion to get rich-text mail. In this case the simple template “%%[[body]]%%” can be used.
  • Credential Identifier: A string identifier for the Gmail account to use. This value is only needed if you wish to use more than one account with Drafts. If used, all actions with the same identifier will use the same alternate login for Gmail.

Google Task

iOS macOS

Create an individual task in the Google Tasks (Gmail integrated task manager). For more details on working with Google Tasks, see our integration guide

Examples

Options

  • List: Name of the task list to use. If not found, it will be created.
  • Title: Template for title of the task.
  • Body Template: Template for the notes to include.

List in Google Tasks

iOS macOS

Add tasks to a list in Google Tasks, using each line of the draft as a separate task. In addition to pre-defining a list name for a List in Google Tasks step, the step will look at the first line of the text of the draft and if it starts with a “#”, “!” or “@” character, the text on that line will override the “List” value on the step and be used as the list name. If the list name does not exist, it will be created. For more details on working with Google Tasks, see our integration guide

Examples

Options

  • List Template: Name of the Reminders list to use. If not found, it will be created.
  • Body Delimiter: Separator to distinguish beginning of notes on the line. Any text after this character on each line will be treated as a note, and text before will be used as the title of the task.
  • Template: Template for the lines to use to create reminder tasks. Default value [[draft]] uses the full content of the current draft.

Box

iOS macOS

Create, append or prepend to files in the Box.com service. Note that more advanced Box actions can also be scripted with Box scripting support.

Examples

Options

  • Name: Template for file name, including extension.
  • Path: Path of folder, relative to Box.com account root, to place file. Default “/” is the root of your Box.com folder. Should begin with “/”
  • Template: Template for the content of the file.
  • Write Type:
    • create: Create a new file. If an existing file already exists at the location, create as new file with a number suffix added.
    • replace: Create new file, overwriting an existing if it exists.
    • prepend: Prepend template content at the beginning of the file. Create the file if it does not already exist.
    • append: Append template content at the end of the file. Create the file if it does not already exist.
  • Identifier: A string identifier for the OneDrive account to use. This value is only needed if you wish to use more than one Box.com account with Drafts. If used, all actions with the same identifier will use the same alternate login for OneDrive.

OneDrive

iOS macOS

Create, append or prepend to files in Microsoft’s OneDrive service. Note that more advanced OneDrive actions can also be scripted with the OneDrive scripting support.

Examples

Options

  • Name: Template for file name, including extension.
  • Path: Path of folder, relative to OneDrive root, to place file. Default “/” is the root of your OneDrive folder. Should begin with “/”
  • Template: Template for the content of the file.
  • Write Type:
    • create: Create a new file. If an existing file already exists at the location, create as new file with a number suffix added.
    • replace: Create new file, overwriting an existing if it exists.
    • prepend: Prepend template content at the beginning of the file. Create the file if it does not already exist.
    • append: Append template content at the end of the file. Create the file if it does not already exist.
  • Identifier: A string identifier for the OneDrive account to use. This value is only needed if you wish to use more than one OneDrive account with Drafts. If used, all actions with the same identifier will use the same alternate login for OneDrive.

OneNote

iOS macOS

Create, append or prepend to notes in Microsoft’s OneNote service.

Examples

Options

  • Notebook: Template for notebook name. Should be exact match for existing notebook in your personal OneNote account, or leave blank to target the default notebook.
  • Section: Name of a section within the specified notebook. If the section does not exist, Drafts will created it.
  • Page: Title of page in the section specified above. If the page does not exist, Drafts will create it.
  • Template: Template for the content of the note.
  • Template Output Format: Determines how the output of the above template should be treated. Options:
    • Text: Assumes the output of the template is plain text, and converts it to HTML by converting HTML entities, and adding line breaks.
    • Markdown: Assumes the output of the template is raw Markdown, and runs it through the Markdown processor to convert it to HTML to upload.
    • HTML: Assumes the template outputs HTML. When using this, the template should not include <html>, <body> tags, just the content part of the HTML, in fully-valid X-HTML format (closing tags, quoted attributes) or OneNote will reject the content. Generating the correct HTML, it is possible to create special OneNote-specific items like tasks. Refer to OneNote data tag documentation.
  • Write Type:
    • create: Create a new note. If an existing file already exists at the location. If the page targetted already exists, fail with an error.
    • replace: Create new page, overwriting an existing if it exists.
    • prepend: Prepend template content at the beginning of the page. Create the page if it does not already exist.
    • append: Append template content at the end of the page. Create the page if it does not already exist.
  • Identifier: A string identifier for the OneNote account to use. This value is only needed if you wish to use more than one OneNote account with Drafts. If used, all actions with the same identifier will use the same alternate login for OneNote.

Outlook

iOS macOS

Send pre-configured email messages in the background using Outlook.com/Live integrated accounts. Step integrates via Microsoft Graph API. The first time this step is used you will be asked to authenticate. To use multiple accounts, use different credential identifiers.

This step will work with any personal or work/school account enabled to work with Outlook.com/Live.

Lwarn more in our [Sending Mail with Drafts[(https://forums.getdrafts.com/t/sending-mail-with-drafts/3597) guide.

Examples

Options

  • Recipients: Comma separated list of recipient emails for each of the recipient types. These can be just email address, or Name <email> formatted - like “Joe Smith joe@smith.com, Jane Doe jane@doe.com”.
    • To
    • CC
    • BCC
  • Subject: Template for the subject line.
  • Body: Template for content of the message. If “Send as HTML” is enabled, this template is expected to output valid HTML, otherwise plain text.
  • Send as HTML: If enabled, the mail is sent as formatted HTML email and the body template should output fully formed HTML. The most common use of this option is to run Markdown to HTML conversion to get rich-text mail. In this case the simple template “%%[[body]]%%” can be used.
  • Credential Identifier: A string identifier for the Gmail account to use. This value is only needed if you wish to use more than one account with Drafts. If used, all actions with the same identifier will use the same alternate login for Gmail.

Microsoft To Do

iOS macOS

Create an individual task in the Microsoft To Do. For more details on working with Microsoft To Do, see our integration guide

Examples

Options

  • List: Name of the task list to use. If not found, it will be created.
  • Title: Template for title of the task.
  • Body Template: Template for the notes to include.
  • Importance: low, normal, or high The priority to use for the task.
  • Link to Draft: If true, the current draft will be linked to the task as a linked resource.

List in Microsoft To Do

iOS macOS

Add tasks to a list in Microsoft To Do, using each line of the draft as a separate task. In addition to pre-defining a list name for a List in Microsoft To Do step, the step will look at the first line of the text of the draft and if it starts with a “#”, “!” or “@” character, the text on that line will override the “List” value on the step and be used as the list name. If the list name does not exist, it will be created. For more details on working with Microsoft To Do, see our integration guide

Examples

Options

  • List Template: Name of the Reminders list to use. If not found, it will be created.
  • Body Delimiter: Separator to distinguish beginning of notes on the line. Any text after this character on each line will be treated as a note, and text before will be used as the title of the task.
  • Template: Template for the lines to use to create reminder tasks. Default value [[draft]] uses the full content of the current draft.

Todoist

iOS macOS

Add a task to your inbox on the Todoist task management service. More advanced integration with Todoist is also available via the Todoist script object. Under the hood, this action step uses the Todoist Quick Add API endpoint, so can use any markup supported, such as any text after the // being treated as the description.

Learn more in our Using Todoist with Drafts guide.

Examples

Options

  • Template: Template for the content of the new task. Can contain Todoist quick task shorthand to specify project, priority, etc.
  • Reminder: Optional human-readable date specifier in a format Todoist understands, like “next Wednesday” or “Tomorrow”. If blank, no reminders will be assigned to the task.
  • Comment: Also optional, but if this template generates text, it will be added to the new task as a comment.
  • Identifier: Arbitrary string identifier for the Todoist credentials to use. This value is only needed if you wish to use more than one account with Drafts. If used, all actions with the same identifier will use the same alternate login for Todoist.

WebDAV

iOS macOS

Create and modify files on a WebDAV enabled server.

Options

  • Account Identifier: A friendly name for the associated credentials used for this action. The first time the action is run, the user will be prompted to enter the WebDAV server URL, and their username/password for the connection. This information will be stored for future use and can be reset in Settings > Credentials. The identifier can be any short string, but should help identify the intended server - like possibly a fragment of the host name. All WebDAV actions with the same account identifier will use the same set of credentials, so use different identifiers to target different servers/accounts.
  • Name: Template for file name, including extension.
  • Path: Template for folder path, relative to root directory. For local files, this is the app “Documents” folder, for iCloud Drive it is the “Drafts 5” folder in iCloud Drive.
  • Template: Template for the content of the file.
  • Write Type:
    • create: Create a new file. If an existing file already exists at the location, create as new file with a number suffix added.
    • replace: Create new file, overwriting an existing if it exists.
    • prepend: Prepend template content at the beginning of the file. Create the file if it does not already exist.
    • append: Append template content at the end of the file. Create the file if it does not already exist.


© 2012-2023 by Agile Tortoise, Inc.
Drafts is a registered Trademark of Agile Tortoise, Inc.
Privacy | Terms

Mastodon