2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ChatGPTからObsidianへ、Obsidian Web Clipperを使って保存する方法

2
Posted at

概要

ChatGPTの出力を、Chrome拡張のObsidian Web Clipperを使って、Obsidianに保存するためのテンプレートです。
ファイル名に日付が自動で入力されるようになっています。

中身

{
	"schemaVersion": "0.1.0",
	"name": "web_clipper_chatgpt_conversation",
	"behavior": "create",
	"noteContentFormat": "<%*\nconst year = tp.date.now(\"YYYY\");\nconst month = tp.date.now(\"MM\");\nconst targetDir = `02_Literature_note/${year}_literature/${year}_${month}_literature`;\nawait tp.file.move(`${targetDir}/${tp.file.title}`);\n%>\n\n{{selectorHtml:article .markdown|join:\"\\n\\n\"|markdown}}",
	"properties": [
		{
			"name": "type",
			"value": "literature",
			"type": "text"
		},
		{
			"name": "medium",
			"value": "chatgpt",
			"type": "text"
		},
		{
			"name": "url",
			"value": "{{url}}",
			"type": "text"
		},
		{
			"name": "created",
			"value": "{{date}}",
			"type": "date"
		},
		{
			"name": "id",
			"value": "{{date|date:\"YYYYMMDDHHmm\"}}",
			"type": "text"
		},
		{
			"name": "tags",
			"value": "ChatGPT, AI, conversation",
			"type": "multitext"
		}
	],
	"triggers": [
		"https://chat.openai.com/",
		"https://chatgpt.com/"
	],
	"noteNameFormat": "{{date|date:\"YYYYMMDDHHmm\"}}_chatgpt",
	"path": "***"
}

最後のpathの***のところには、保存したいObsidianのフォルダ名を入れてください。

使い方

Chromeの拡張機能のObsidian Web Clipperを入れた後、拡張機能のオプションからテンプレートを編集する画面に行くことができます。

スクリーンショット 2026-03-12 2.18.40.png

右上のインポートボタンから、上のjsonファイルを貼り付けるとテンプレートに入れることができます。

プロパティやタグなどを調整して使用してください。

おまけ

ChatGPTが有料版であれば、テンプレートのプロパティに以下のいずれかを貼り付けるとモデルを記録することができます。

{{selector:button[data-testid='model-switcher-dropdown-button']}}
{{selector:header button .text-token-text-tertiary|slice:0,1|join:\"\"|trim}}
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?