URL Scheme

Automating Workflow itself. It’s pretty meta.

Interact With Workflow via URL Scheme

Workflow provides the workflow:// URL scheme which can be used to launch Workflow from within other apps and immediately perform a certain task. Currently, the URL scheme allows you to import a workflow or run a workflow.

Importing a Workflow

workflow://import-workflow?url=[url]&name=[name]

Downloads a workflow to the My Workflows section and opens it.

  • url: A URL pointing to the workflow file you want to import.
  • name (optional): What to name the new workflow. If not provided, the workflow filename is used.
  • silent (optional): By default, the imported workflow will be opened and displayed to the user. Set this parameter to true to import without opening the workflow.

In Workflow 1.1 and later, users are prompted before running a workflow imported from other apps. This prompt ensures that arbitrary workflows will not be run without the user’s permission.

Running a Workflow

workflow://run-workflow?name=[name]&input=[input]

Runs a workflow saved in the My Workflows section.

  • name: The name of the workflow to run.
  • input (optional): What to provide as input to the workflow. Valid values are text and clipboard. When set to clipboard, the contents of the clipboard is used.
  • text (optional): When input is set to text, this text is used as input to the workflow.

X-Callback-URL

Workflow supports x-callback-url, allowing the calling app to receive a response (a callback) when a particular interaction has completed. You can import and run workflows from an x-callback-url using the same parameters as described above. Here's an example:

workflow://x-callback-url/run-workflow?name=Calculate%20Tip&input=text&text=24.99&x-success=...&x-cancel=...

Per the x-callback-url standard, the following additional parameters can be provided:

  • x-success (optional): A URL to open when the interaction was successful, for example, after a workflow was imported or finished running. If a workflow was run, a parameter named result is appended to the URL and contains the textual output of the workflow.
  • x-cancel (optional): A URL to open when the interaction was cancelled by the user.
  • x-error (optional): A URL to open when the interaction failed because an error occurred. A parameter named errorMessage is appended to the URL and contains a description of the error.

Importing workflows via x-callback-url is supported in Workflow 1.1 and later. To learn more about the x-callback-url standard, visit this page.


Developing Actions

We're working on new ways for your application to integrate with Workflow. In the meantime, if you would like us to add actions for your app, please contact us at support@workflow.is.