跳转到内容
Agentic Workflowdocs
v0.8.2免费安装

节点 / builtin / trigger

Context Menu

Run the flow from the browser context menu.

触发器 扩展程序网页应用 — 不可用

此内容尚不支持你的语言。

Run a workflow from the browser’s right-click menu, with details of what you clicked.

工作流 · save-page-to-airtable.awf 3 个步骤

Save Page to Airtable Reading List:包含 3 个步骤的工作流,从 Right-click a page 开始,到 Add a record to Airtable 结束。

An activated workflow with a Context Menu trigger shows up in the right-click menu under Agentic Workflow, then Personal Workflows (or Downloaded Workflows for ones you installed from the marketplace). The menu entry is the workflow’s name.

The entry only appears where it fits: on the kinds of content picked in Menu Contexts, and, when you set them, only on matching pages (Document URL Patterns) or matching links and media (Target URL Patterns). Clicking it runs the workflow from this trigger, with the clicked text, link or image and the page details as output.

A workflow can have several Context Menu triggers with different settings, for example one for selected text and one for links. Only the triggers that match what you clicked run.

  • Act on selected text: translate it, summarize it, save it, or send it to a chat.
  • Act on a link: save it to a list or open it somewhere else.
  • Act on an image: download it or send its address to a service.
  • Run a workflow on the current page without opening AWFlow.
设置项类型作用
Menu Contexts Multiple choiceOptions: Page, Selection, Link, Editable Field, Image, Video, Audio. 默认值:Page
Document URL Patterns ListOptional browser match patterns for the page URL.
Target URL Patterns ListOptional browser match patterns for link, image, video, or audio targets.
  • Menu Contexts decides where you right-click. Page means a right-click on the page itself, Selection a right-click on selected text, Editable Field inside a text box, and so on.
  • Document URL Patterns limits the entry to pages whose address matches, for example https://*.wikipedia.org/*. Leave it empty to show it everywhere.
  • Target URL Patterns checks the address of the clicked link, image, video or audio instead, for example https://*.youtube.com/* to only offer the entry on YouTube links.

Patterns use the form scheme://host/path with * as a wildcard; see Page Load for examples.

  • Output

Each output item has these fields:

Field类型What it holds
triggerType Always "contextMenu"
triggeredAt Text
pageUrl Text
selectionText Text
linkUrl Text
srcUrl Text
frameUrl Text
editable True/false
mediaType Text
tabId Number
windowId Number
tabUrl Text
tabTitle Text
Shape of an output item
{
"triggerType": "contextMenu",
"triggeredAt": "…",
"pageUrl": "…",
"selectionText": "…",
"linkUrl": "…",
"srcUrl": "…",
"frameUrl": "…",
"editable": true,
"mediaType": "…",
"tabId": 0,
"windowId": 0,
"tabUrl": "…",
"tabTitle": "…"
}

Which fields are filled depends on what you clicked:

  • selectionText: the selected text (Selection).
  • linkUrl: the address of the clicked link (Link).
  • srcUrl and mediaType: the address and type (image, video, audio) of the clicked media.
  • editable: true when you clicked inside a text field.
  • pageUrl, tabTitle, tabId: the page and tab you were on.

Use them downstream, for example {{ $input.selectionText }}.

None. This node needs no connection and has no slots for other nodes.

Summarize selected text on any page:

  1. Add Context Menu with Menu Contexts set to Selection.
  2. Add Summarize with Text {{ $input.selectionText }} and Length Short.
  3. Add Browser Notification with Title Summary and Message {{ $input.summary }}.
  4. Activate the workflow, select a paragraph on a page, right-click, and choose the workflow’s name.
  • The workflow is not in the right-click menu. Activate the workflow, then right-click and choose Get / Refresh Workflows so the menu picks up your changes. Also check that you right-clicked on the right kind of content: with only Page selected, the entry does not show on selected text or links.
  • The entry shows, but clicking it does nothing. What you clicked did not match this trigger’s contexts or patterns (the menu can show the entry more broadly than each trigger allows when a workflow has several Context Menu triggers). Check Menu Contexts and both pattern lists.
  • selectionText is empty. Selection is not in Menu Contexts, or you right-clicked outside the selected text.
  • It does not work in the web app. This node runs in the browser extension; install it and activate the workflow there.
Save the page you're on to an Airtable reading list 入门 · 5 分钟 需要连接 Turn highlighted text into a Todoist task 入门 · 6 分钟 需要连接 Explain any highlighted text in plain words 入门 · 4 分钟 设备端 Rewrite rough text in a professional tone 入门 · 4 分钟 设备端
  • Hotkey: run from a keyboard shortcut instead.
  • Get Selected Text: read the selection from a workflow started another way.
  • Funnel: share the same steps between a Context Menu and other triggers.
编辑此页

最近更新:

Was this page useful?
向 Aria 询问“Context Menu”