Boxflow and Power Automate

Work in Microsoft 365? Let Boxflow start a Power Automate flow for every new eBox or MyMinfin message, and archive the documents in SharePoint, post them in Teams or start an approval.

What you need

  • A Boxflow account with at least one connected company, and an administrator role in Boxflow.
  • A Power Automate licence that includes premium connectors: the “When an HTTP request is received” trigger and the HTTP action are premium.
  • An API token, created in your Boxflow profile.

How it works

  1. 1

    Boxflow webhook

    An automation in Boxflow sends the details of every matching message to your flow.

  2. 2

    Boxflow API

    The flow downloads the attachments of the message through the Boxflow REST API.

  3. 3

    Microsoft 365

    The flow saves the documents in SharePoint or OneDrive, posts in Teams or starts an approval.

Step by step

  1. 1

    Create the flow and its trigger

    In Power Automate, create an instant cloud flow with the trigger “When an HTTP request is received”. Set “Who can trigger the flow?” to “Anyone” (Boxflow cannot sign in with a Microsoft account; the secret signature in the URL protects the flow) and paste the request body JSON schema below. Save the flow to generate the HTTP URL.

  2. 2

    Add a webhook action in Boxflow

    In Boxflow, create an automation with the conditions you need (for example one company or one sender) and add a webhook action: method POST, format JSON, the HTTP URL from Power Automate, and the payload below.

  3. 3

    List the attachments

    In your flow, add an HTTP action with method GET on the attachments endpoint of the message, with the header “Authorization: Bearer” followed by your Boxflow API token.

  4. 4

    Download each attachment

    Add an “Apply to each” on the data array of the response. Inside it, add a second HTTP action that downloads the attachment by its ID. The response body is the file itself.

  5. 5

    Save the file

    Add the SharePoint or OneDrive “Create file” action. Use the attachment name as file name and the body of the download action as file content, for example in a folder per company.

  6. 6

    Test and switch on

    Save the flow and reprocess the automations of an existing message in Boxflow. Check the run history in Power Automate and the audit trail of the message in Boxflow.

Copy and paste

Webhook payload in Boxflow json
{
  "message_uuid": "{{ message.uuid }}",
  "tenant_uuid": "{{ tenant.uuid }}",
  "subject": "{{ message.subject }}",
  "sender": "{{ sender.name }}",
  "company": "{{ company.name }}",
  "date": "{{ message.message_date }}"
}

Boxflow replaces the placeholders with the values of each message.

Request body JSON schema for the trigger json
{
  "type": "object",
  "properties": {
    "message_uuid": { "type": "string" },
    "tenant_uuid": { "type": "string" },
    "subject": { "type": "string" },
    "sender": { "type": "string" },
    "company": { "type": "string" },
    "date": { "type": "string" }
  }
}
HTTP actions in the flow http
# List the attachments
GET https://boxflow.be/api/external/v2/tenants/@{triggerBody()?['tenant_uuid']}/messages/@{triggerBody()?['message_uuid']}/attachments
Authorization: Bearer <your Boxflow API token>
Accept: application/json

# Download one attachment (inside "Apply to each" on body('List_attachments')?['data'])
GET https://boxflow.be/api/external/v2/tenants/@{triggerBody()?['tenant_uuid']}/messages/@{triggerBody()?['message_uuid']}/attachments/@{items('Apply_to_each')?['id']}
Authorization: Bearer <your Boxflow API token>

Each attachment in the list has an id and a name. Use the name as file name in “Create file”.

Keep it secure

  • Treat the HTTP URL of the trigger as a password: it contains a signature that lets anyone start the flow. Regenerate it if it leaks.
  • Add a custom header with a secret value to the Boxflow webhook and check it with a condition at the start of your flow.
  • Turn on “Secure inputs” and “Secure outputs” on the HTTP actions, so your API token and the documents do not appear in the run history.
  • The API token gives access to the messages of your Boxflow account: store it as a secret, for example in Azure Key Vault.

Ideas for your flow

  • Save documents in a SharePoint library with a folder per company and year.
  • Post a message in a Teams channel for every new letter from FPS Finance.
  • Start an approval for payment requests before they go to accounting.
  • Add a row to an Excel or SharePoint list to keep a register of all government letters.

Tips

  • If your flow is temporarily unavailable, Boxflow retries the webhook automatically, up to 10 times over about 3 days.
  • Use several automations with different conditions to start different flows.
  • The full API reference is available in the Boxflow API documentation.

Sources: Microsoft Learn – Request trigger (“When an HTTP request is received”)

Frequently asked questions

Do I need a premium Power Automate licence?

Yes. The “When an HTTP request is received” trigger and the HTTP action are premium connectors in Power Automate.

Why choose “Anyone” for “Who can trigger the flow?”

The other options require a Microsoft Entra ID token, which Boxflow cannot provide. With “Anyone”, the flow is protected by the secret signature in its URL; you can add a secret header for extra protection.

Can I save the documents in Teams?

Yes. Files in Teams channels are stored in SharePoint, so you use the SharePoint “Create file” action on the document library of the team.

Is there a ready-made Boxflow connector for Power Automate?

Not yet. The webhook and API approach in this guide works today with any Power Automate environment.

Ready to put your eBox on autopilot?

Connect your first company for free and receive your government messages wherever you need them.