Mailhook, Slack and PDF: Invoice Approval Request Template

When a vendor invoice arrives by email, Spojit reads the amount, routes large bills to finance for sign-off, and posts the outcome to Slack.

What It Builds

A Mailhook trigger gives the workflow its own inbound email address, so any invoice forwarded there starts a run. An Attachment node fetches the PDF bytes, PDF tools extract the text, and a Connector node in Agent mode reads out the amount and vendor. A Condition checks the total against a threshold: anything above it goes to a Human approval node before the bill is recorded, and either way the result lands in Slack.

The Prompt

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

Build a workflow with a Mailhook trigger that receives vendor invoices. Fetch the PDF attachment, extract the invoice amount, vendor name, and invoice number from it. If the amount is over 1000, send a Human approval request to the finance team showing those details and wait for a decision. Once approved (or if it is under 1000), record the invoice and post the outcome to the #ap-invoices Slack channel; if it is rejected, post that to Slack instead.

Connectors Used

  • Mailhook trigger - the inbound address that receives forwarded invoices.
  • PDF - extracts the invoice text from the attachment.
  • Slack - posts the approval outcome to a channel.

Customize It

Change the 1000 threshold, swap the #ap-invoices channel, point the approval at a specific user or role instead of the team, or add fields like due date and PO number to the extraction and the Slack message.

Tips

  • The Attachment node only works in Mailhook workflows; set it to Single to grab the first PDF.
  • A rejected Human approval halts the run, so the bill is never recorded.
  • Use Agent mode for the extraction so Miraxa handles varied invoice layouts, then a Direct mode Slack post for predictable output.

Related

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