Black Friday: Get 40% off Craft for Life!

用 Craft 創想

使用 Craft 的 API 建構Apple Shortcuts

啟用 API 後,您的 Craft 文件即可為您的工作流程提供支援。使用 Apple Shortcuts 自動化,並擴展您的文件功能。

Craft
Apple Shortcuts

Enabling the API for Documents

First, you have to enable the API in order for Craft to setup an API endpoint for your documents. Then, you use the API endpoint URL to connect to the server from Apple Shortcuts.

Click the “Imagine” tab in the sidebar

步驟1

Open the “Imagine” tab
Click “Add Your First API Connection” button

步驟2

Click “Add Your First API Connection”
Configure API connection settings

步驟3

Configure your API connection with a name.
Click “Add Document” button

步驟4

Click “Add Document” to select which documents this API connection has access to.
API URL displayed at the top

步驟5

The API URL that will be used to interact with your document is now displayed at the top
Click the “Download AI Bundle” button

步驟6

Click the “Download AI Bundle” button. This will download a folder containing the API documentation and the content of your doc.

Using the API in Apple Shortcuts

Once the API is enabled for your Craft docs, you can use it in Apple Shortcuts to automate your workflows.

With Apple Shortcuts, you can perform a series of actions on a single tap, a voice command to Siri, or automatically. You build a shortcut by combining different actions. These shortcuts can be added to the Home Screen, run from the Apple Watch, or accessed through the share sheet.

建立新快捷方式

步驟1

快捷指令中,建立一個新的快捷指令。以下範例展示如何在 macOS 上建立快速指令,但同樣的方法也適用於 iOS。
配置快捷方式

步驟2

設定快捷指令的基本設定。在這裡,我們將建立一個快捷指令,用於將語音筆記儲存到您的 Craft 文件中。
連接到 Craft API

步驟3

imagine.connectGuides.apiClients.shortcuts.steps.step3.description
配置您的 API 呼叫

步驟4

imagine.connectGuides.apiClients.shortcuts.steps.step4.description
使用你的快捷方式

步驟5

您的快捷方式已準備就緒!我們已將其新增至鎖定螢幕,以便快速將語音備忘錄儲存到您的 Craft 文件中。

一些入門建議

瀏覽範例