Integrations
Connect EmDash
Publish articles to an EmDash site through the Kitful plugin, with the featured image, tags and later improvements.
The Kitful plugin for EmDash receives your articles through a webhook and saves each one as a post. Publishing to EmDash needs an active paid plan, because it uses a webhook.
Before you start
- An EmDash site whose admin shows Registry. On Cloudflare, sandboxed plugins need the Workers Paid plan, the
LOADERWorker Loader binding, andsandboxRunner: sandbox()in theemdash()options ofastro.config.mjs. EmDash's Cloudflare template adds the binding but not the runner. EMDASH_ENCRYPTION_KEYset for the site. EmDash's create command writes it to.envfor local development; on Cloudflare, add it as a Worker secret. The plugin stores its secret encrypted with it.- A collection with a title field and a rich text (Portable Text) field. An
excerptfield carries the meta description and an image field the featured image. Thepostscollection in EmDash's blog template has all four.
Install the plugin
- In your EmDash admin, open Registry and search for Kitful.
- Open it, select Install, and confirm its permissions. It asks to read your collection fields, write and publish content, manage tags, upload media, and download images from
img.kitful.ai. - Open the Kitful page the plugin adds to your admin.
Connect Kitful
- In Kitful, open Integrations inside the site.
- Click Add on Webhook.
- Enter EmDash as the Integration Name.
- Paste the plugin's Webhook URL into Webhook URL and its Secret into Secret.
- Click Test. Reload the Kitful page in EmDash: it shows Kitful is connected with the time the test arrived.
- Click Save.
The EmDash card in Integrations links to the plugin's page in the EmDash registry.
Publish
Pick the webhook when you publish an article, in a scheduled slot, or in a campaign. Each article becomes a post with:
- the title, and the body with its headings, lists, tables, code, images and YouTube videos;
- the slug Kitful chose for the article;
- the featured image, uploaded to your EmDash media library, when the collection has an image field;
- the meta description in the
excerptfield, which EmDash uses as the page description; - up to five new tags per article, added to the
tagtaxonomy. Existing tags with the same name are reused.
Kitful's table of contents is left out, because EmDash headings have no anchors for its links. Images inside the article stay on Kitful's image host.
On the Kitful page in EmDash you can pick another collection or tag taxonomy, or turn off Publish articles as soon as they arrive to receive drafts and publish them yourself. The page lists recent articles with their status.
Update a post
Publishing the same article again updates its post, and creates it again if someone deleted it in EmDash. An improvement applied from Optimize updates the title, excerpt and body of the post Kitful published, and a live post stays live. The plugin only holds posts Kitful sent it, so an improvement for any other post on the site answers that the post was not found, and nothing changes.
If someone saved unpublished edits to a live Kitful post in EmDash, the next update from Kitful publishes those edits together with its own. Publish or discard them before you apply an improvement.
Change the secret
New secret on the Kitful page replaces the secret at once. Paste the new one into the webhook's Secret in Kitful, or publishing fails with a 401.
Troubleshoot
- The test fails with 503: open the Kitful page in EmDash once. It creates the secret.
- The test fails with 401: the secret in Kitful doesn't match. Copy it again from the Kitful page.
- The Kitful page shows No secret yet: the site has no
EMDASH_ENCRYPTION_KEY. Set it and reload the page. - Publishing fails with 422: the message says why: the collection is missing or lacks a title or rich text field, or EmDash refused the content. The Kitful page lists the error.
- Publishing fails with 502: the post was saved as a draft, but EmDash refused to publish it. Open it from the Kitful page to see why.
- An improvement fails with 422: EmDash refused the update, or the collection has no
excerptfield for the new meta description. - No Registry in the admin: the site has no sandbox runner. See EmDash's plugin sandbox guide.