Send files into a notebook automatically (notebook webhooks)

Create a secret address in the Business Brain. Any file your website, scanner or automation tool sends to it is added to a notebook and processed like an upload.

A clinic receives signed intake forms from its website, a law office scans documents every evening, an accountant gets invoices by email. Instead of uploading each file by hand, you give the Business Brain a secret address. Whatever is sent there lands in the notebook you chose and is read, transcribed and searchable like any upload. Setting it up is a few clicks; sending the files is done by your website, an automation tool such as Make or Zapier, or your developer.

Create the address

1. Open Webhooks in My notebooks: In the Business Brain open My notebooks and click Webhooks at the top. The window explains that a file sent with POST to a secret address is added to the Brain on its own.

2. Name it and choose where files go: Type a name, for example "Website forms". Choose Into an existing notebook and pick the notebook, or Create a new notebook and type its title. With a new notebook, each call can also set its own title by adding ?title= to the address.

3. Click + Create webhook: The webhook appears in the list with its address, an on/off switch and a count of calls. Click Copy to copy the address.

4. Give the address to the sender: Paste it where your tool sends files. In Make or Zapier that is an HTTP step that sends the file to a URL with the POST method. Your developer can use the example below.

The address is the password: Anyone who has the address can add files to your notebook. Do not put it inside a public web page. If it leaked, delete the webhook ("Delete this webhook? External systems using it will stop working.") and create a new one. Off pauses it without deleting.

For your developer

Send the file as multipart form data in a field called file (or files for several), or as the raw body with the file name in an X-Filename header or ?filename=. Every file type a notebook accepts works. The answer lists each document that was added.

curl -X POST "https://finestructure.ai/api/kb/webhooks/<your-token>/ingest" \
  -F "[email protected]"

{ "status": "accepted", "notebook_id": "...",
  "documents": [ { "filename": "intake-form-dana-levi.pdf", ... } ] }

Questions

Q: The sender gets "Unknown or disabled webhook."

A: The address is wrong, the webhook was deleted, or it is switched Off. Check the switch in the Webhooks window, or copy the address again.

Q: The sender gets "No file in the request (send multipart 'file' or a raw body)."

A: The request arrived without a file. In Make or Zapier, check that the file itself is mapped, not only its name, and that the field is called file.

Q: Where do I see what arrived?

A: In the notebook, like any upload. The Webhooks window also counts the calls.

Q: Does this cost credits?

A: Files sent this way are processed like files you upload yourself, with the same cost.

Q: Is this the same as the agent webhooks?

A: No. Agent webhooks send messages from Fine Structure to you. A notebook webhook receives files from you. See Webhooks for agent events.

Related: Notebooks, folders and uploads, Webhooks for agent events, What the Business Brain is, API keys for your account