Create or Replace Magic Dash Item
hudu_upsert_magic_dash_itemCreate or replace a magic dash tile on a Hudu company page. Matches by title and company name; overwrites the existing tile or creates a new one to display current status.
Instructions
Create a magic dash tile, or replace the existing one with the same title on the same company. A magic dash item is one of the coloured tiles across the top of a company page in Hudu — a title, a headline message, an optional shade and optional HTML detail. They are normally written by scripts and integrations to surface a live status ("Microsoft 365: 42 licences, 3 unassigned") next to the documentation.
Read that first sentence carefully: this single endpoint does both. Hudu matches on title plus company_name, and if a tile with that pair already exists it is overwritten with what you send — no error, no warning, and no way to recover what it said before. Check hudu_list_magic_dash_items for the title on that company first whenever you are not deliberately refreshing a tile you own.
The replacement is wholesale rather than a merge: fields you omit are not carried over from the previous tile, so send the complete tile you want to end up with every time.
The write endpoints identify the company by name, not by id — company_id is a read-side filter only, and there is no way to address a tile by company id when writing. The name has to match an existing Hudu company exactly. Take it from company_name on a listed item, or from name on the record hudu_list_companies returns.
Operation class: Update. Impact: Overwrites any existing tile with the same title on the same company, wholesale and without confirmation. Creates a new tile only when no such pair exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Font Awesome class shown in the tile header, e.g. "fas fa-circle". | |
| shade | No | Background colour of the tile, used to signal state at a glance — "success" and "danger" are the examples Hudu documents. Hudu publishes no closed list, so copy a value off an existing tile via hudu_list_magic_dash_items rather than inventing one. | |
| title | Yes | Heading of the tile, e.g. "Microsoft 365" or "Backup Status". This is half of the match key: reusing a title that already exists on this company replaces that tile rather than adding a second one. | |
| content | No | Longer detail revealed when the tile is opened, as HTML. Hudu renders this, so Markdown sent here is shown literally with its asterisks and pipes intact — use <table>, <ul>, <p> and <a href="..."> instead. | |
| message | Yes | The headline shown on the face of the tile — short, and usually the number or status the tile exists to report, e.g. "42 licences, 3 unassigned". | |
| image_url | No | URL of an image to show in the tile header, as an alternative to an icon. | |
| company_name | Yes | Exact name of the company whose dashboard the tile belongs on. This is the other half of the match key. It must match an existing Hudu company name; there is no id form of this field. | |
| content_link | No | URL the tile links out to, for sending a reader to the system the tile reports on. |