Mailhook and MySQL: Expense Receipt Logging Template

Staff forward expense receipts to a dedicated mailhook address, and Spojit reads each PDF and logs a categorized row into your MySQL expense table.

What It Builds

A Mailhook trigger gives the workflow its own @mailhook.spojit.com address. When someone forwards a receipt, an Attachment node pulls the PDF bytes, an Agent-mode Connector node extracts the merchant, date, and amount into a structured shape, and a MySQL Connector node inserts the categorized row.

The Prompt

Paste this into Miraxa and it builds the workflow, connecting the tools for you:

Build a workflow that triggers when a receipt is emailed to a mailhook address. Pull the attached PDF, then read it to extract the merchant name, transaction date, total amount, and a spending category. Insert a row into my MySQL "expenses" table with those fields plus the sender's email address.

Connectors Used

  • Mailhook - the trigger; any email to the workflow's address starts a run.
  • Attachment - fetches the forwarded PDF receipt's bytes.
  • PDF - reads the receipt text for the extraction step.
  • MySQL - inserts the categorized expense row.

Customize It

Change the table name, the category list, or the columns mapped in the prompt. You can add the receipt's currency, a cost-center tag from the subject line, or a confidence flag for amounts the extraction is unsure about.

Tips

  • Use a Response Schema on the Agent-mode node so the merchant, date, and amount always arrive as clean, typed fields.
  • Make sure your MySQL connection user has insert rights on the expense table.
  • Share the mailhook address with staff, or set a forwarding rule from a shared finance inbox.

Related

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.