Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2025
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.33 KB | None | 0 0
  1. {
  2. "name": "Obsidian Notes Ollama Agent",
  3. "nodes": [
  4. {
  5. "parameters": {
  6. "interval": 3600
  7. },
  8. "name": "Schedule Trigger",
  9. "type": "n8n-nodes-base.scheduleTrigger",
  10. "typeVersion": 1,
  11. "position": [250, 300]
  12. },
  13. {
  14. "parameters": {
  15. "operation": "readFile",
  16. "path": "/path/to/obsidian/vault/*.md"
  17. },
  18. "name": "Read Obsidian Notes",
  19. "type": "n8n-nodes-base.readWriteFile",
  20. "typeVersion": 1,
  21. "position": [450, 300]
  22. },
  23. {
  24. "parameters": {
  25. "values": {
  26. "string": [
  27. {
  28. "name": "content",
  29. "value": "={{$node['Read Obsidian Notes'].json['content']}}"
  30. },
  31. {
  32. "name": "fileName",
  33. "value": "={{$node['Read Obsidian Notes'].json['fileName']}}"
  34. }
  35. ]
  36. }
  37. },
  38. "name": "Parse Content",
  39. "type": "n8n-nodes-base.set",
  40. "typeVersion": 1,
  41. "position": [650, 300]
  42. },
  43. {
  44. "parameters": {
  45. "method": "POST",
  46. "url": "http://localhost:11434/api/generate",
  47. "headers": {
  48. "Content-Type": "application/json"
  49. },
  50. "body": {
  51. "model": "llama3",
  52. "prompt": "Analyze the following Obsidian note content: {{$node['Parse Content'].json['content']}}. Identify customer-related information (e.g., names, tasks, dates). Make inferences about potential customer needs or actions. Generate 2-3 clarifying questions for ambiguous or incomplete data. Suggest specific follow-up actions for customers (e.g., email, call). Return the response in JSON format with fields: inferences, questions, suggestions.",
  53. "stream": false
  54. }
  55. },
  56. "name": "Ollama Analysis",
  57. "type": "n8n-nodes-base.httpRequest",
  58. "typeVersion": 1,
  59. "position": [850, 300]
  60. },
  61. {
  62. "parameters": {
  63. "values": {
  64. "string": [
  65. {
  66. "name": "inferences",
  67. "value": "={{$node['Ollama Analysis'].json['response']['inferences']}}"
  68. },
  69. {
  70. "name": "questions",
  71. "value": "={{$node['Ollama Analysis'].json['response']['questions']}}"
  72. },
  73. {
  74. "name": "suggestions",
  75. "value": "={{$node['Ollama Analysis'].json['response']['suggestions']}}"
  76. }
  77. ]
  78. }
  79. },
  80. "name": "Extract Ollama Response",
  81. "type": "n8n-nodes-base.set",
  82. "typeVersion": 1,
  83. "position": [1050, 300]
  84. },
  85. {
  86. "parameters": {
  87. "operation": "writeFile",
  88. "filePath": "/path/to/obsidian/vault/output/customer_followups_{{$node['Parse Content'].json['fileName']}}.md",
  89. "fileContent": "# Customer Follow-up Suggestions\n\n**File**: {{$node['Parse Content'].json['fileName']}}\n\n**Inferences**:\n{{$node['Extract Ollama Response'].json['inferences']}}\n\n**Clarifying Questions**:\n{{$node['Extract Ollama Response'].json['questions']}}\n\n**Follow-up Suggestions**:\n{{$node['Extract Ollama Response'].json['suggestions']}}"
  90. },
  91. "name": "Save Suggestions",
  92. "type": "n8n-nodes-base.readWriteFile",
  93. "typeVersion": 1,
  94. "position": [1250, 300]
  95. }
  96. ],
  97. "connections": {
  98. "Schedule Trigger": {
  99. "main": [
  100. [
  101. {
  102. "node": "Read Obsidian Notes",
  103. "type": "main",
  104. "index": 0
  105. }
  106. ]
  107. ]
  108. },
  109. "Read Obsidian Notes": {
  110. "main": [
  111. [
  112. {
  113. "node": "Parse Content",
  114. "type": "main",
  115. "index": 0
  116. }
  117. ]
  118. ]
  119. },
  120. "Parse Content": {
  121. "main": [
  122. [
  123. {
  124. "node": "Ollama Analysis",
  125. "type": "main",
  126. "index": 0
  127. }
  128. ]
  129. ]
  130. },
  131. "Ollama Analysis": {
  132. "main": [
  133. [
  134. {
  135. "node": "Extract Ollama Response",
  136. "type": "main",
  137. "index": 0
  138. }
  139. ]
  140. ]
  141. },
  142. "Extract Ollama Response": {
  143. "main": [
  144. [
  145. {
  146. "node": "Save Suggestions",
  147. "type": "main",
  148. "index": 0
  149. }
  150. ]
  151. ]
  152. }
  153. }
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement