Connect Obsidian and n8n with the Post Webhook Plugin

Hi everyone!

I’m thrilled to share something new for the part of the n8n community that also uses the note‑taking app Obsidian. I’ve developed a plugin called Post Webhook that bridges the gap between these two powerful tools, allowing you to seamlessly integrate your Obsidian notes into your n8n workflows.

With Post Webhook, you can send the full content of your notes, including structured YAML frontmatter metadata and attachments, directly to any Webhook-compatible endpoint. This means you can take the information stored in your notes and immediately put it to work in your automated n8n workflows.

To give you a sense of what’s possible, I’ve created an example n8n workflow template (Send Emails via Obsidian) that makes it easy to send emails directly from your Obsidian notes. Using the Post Webhook plugin, the n8n workflow takes note content and parses YAML frontmatter to define key email fields like recipients and subject lines. It even processes attachments, encoding them for emails and sending them seamlessly through Gmail. Once the email is sent, the workflow confirms the status back to your note, so you always have a complete record.

Feedback, ideas, and suggestions are always welcome.

9 Likes

Thank you for this. I am still trying to figure out how to use it, but this seems very interesting. I am trying to create a workflow where i can integrate my Web Clippings, send them to Obsidian and then to n8n to post to a Google Sheet where I can then write a blog post, track prices of items, or just maintain a record of something. I will let you know if i get it working. It would also be interesting if there ways a way to send a web hook directly from the clipping, but I should probably figure out the basics first.

1 Like

Hi Keithc,

Thank you for your comment. The idea you’ve outlined is indeed perfectly achievable.

For example, imagine your Webclipper Obsidian note looks like this:

image

Using your Post Webhook plugin, you can send this note to an n8n Post Webhook with a workflow like this:

Here’s a brief explanation of how this workflow processes the note content:

  • Webhook: Captures the note data from Obsidian via the Post Webhook plugin.
  • Separate Attachment Data: Extracts attachment details from the incoming payload.
  • Fix Base64 String: Cleans and decodes any Base64-encoded data in the note.
  • Process Each Attachment: Prepares to handle multiple attachments in batches.
  • Convert Attachment to File: Converts attachment data into file format for processing.
  • Upload Attachments to Google Drive: Saves the attachments to a specific folder in Google Drive.
  • Aggregate Links to Attachments: Collects links to the uploaded attachments into a single array.
  • Prepare Data for Sheet: Maps metadata (e.g., title, author, tags) and attachment links to structured fields.
  • Append Row to Sheet: Adds the note’s metadata and attachment links as a new row in a Google Sheets document.

The result will look like this:

This assumes that the notes are sent manually to the webhook. You may also be able to use another plugin to monitor a folder and automatically execute the command ‘send note to webhook.’

Please let me know if you’d like to receive the JSON file for this workflow!

3 Likes

Looks great masterblaster :wink:
Could you share the json file please?

Here you go:

2 Likes

Como conectarías obsidian, es decir, enviar un mensaje a un agente solicitando que te haga una nota con una estructura especifica y que te la ponga en obsidian

Can you use this to send information to n8n process it, then send back into obsidian? That is the part I’m confused on.

Yes, with the Obsidian Post Webhook plugin, you can send full notes or selected text (including frontmatter, inline fields, and attachments) directly to an n8n webhook. n8n processes the data, and the plugin can then automatically insert the response back into Obsidian, either appended, in a new note, or overwriting the original.

Hey @masterb12345 - I’m just trying this plugin. I have notes with text and images and after processing (summarizing text with AI and resizing image with image node) I want to return it into a new note. Would this be possible?

Hey @flyover137. Interesting use case! While it’s possible to send notes with multiple attachments (base64 converted) to the webhook endpoint and process these attachments in your n8n workflow, there appears to be a limitation: the n8n “Respond to Webhook” node cannot return both text and multiple binary files simultaneously (at least ot in a way that can be processed by the webhook plugin subsequently).

To work around this constraint, I suggest the following approach: configure your workflow to upload the resized images to separate hosting (such as cloud storage), then have the “Respond to Webhook” node return the summarized text containing hyperlinks to these hosted images. This allows you to embed the resized images directly into your note through the links.

Additionally, you can configure the webhook plugin in the settings to automatically create a new note for each request.

Would this solution work for your needs?

Interesting, @masterb12345 . Let me give that a try in the next few days. I’ll post back.

this is interesting. But sending emails from Obsidian notes feels niche; wondering where else this could be intergrated

@flyover137, you inspired me to update the Post Webhook plugin to handle this scenario more directly.

The latest version of the plugin can now process a specific JSON format in the response from your webhook. If your webhook is configured to return a JSON object with content and attachments keys, the plugin will automatically handle it.

Here is the JSON structure the plugin is designed to process:

{
  "content": "Here is the notes content, ![[chart.png]] and ![[example.gif]]",
  "attachments": [
    {
      "name": "chart.png",
      "data": "base64_encoded_image_data..."
    },
    {
      "name": "example.gif",
      "data": "base64_encoded_image_data..."
    }
  ]
}

When the plugin receives a response in this format, it automatically saves the files from the attachments array into your vault and inserts the text from the content field into your note. This new feature means you no longer need to use workarounds like hosting files externally.

Here’s an example of how your workflow could look:

Would this solution work better for your needs?