# Is een automatisering zoals deze vandaag mogelijk met Discourse AI?

**URL:** https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142
**Category:** Community Building
**Tags:** ai
**Created:** [30 april 2025 om 12:20 UTC](https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142 "2025-04-30T12:20:38Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [30 april 2025 om 12:20 UTC](https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142/1 "2025-04-30T12:20:38Z")

</div>

There’s is a task we do today that I’ve been able to make pretty good progress in automating using n8n, but I’m wondering if it’s possible with Discourse natively.

We have a draft category where product marketing managers draft product announcements to be sent out about their products. When they create that draft, we look at the product name, the version, if it’s a major/minor/patch release. We also take the body of their announcement content and summarize it with a LLM for a 4-7 word description of the content.

We then use that to create the announcement banner in Adobe, like so:

 ![The image features an illustration of a person using a laptop with a focus on security enhancements, specifically highlighting the "PolicyPak 25.3 Client-Side Extensions" in blue. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/b/e/b/bebee1b8873e0ce9bcfb75228e59378d0a7c0411.jpeg)

> **[Minor Version 25.3 Released](https://community.netwrix.com/t/minor-version-25-3-released/1185)**
>
> Netwrix is pleased to announce the general availability of Netwrix PolicyPak build number 25.2. With this release, you will be able to benefit from the following: PolicyPak - General End-of-Life for 32-bit PolicyPak This is a reminder that...

I feel as though this could be done by an LLM and some traditional logic:

- The background is just one hue per announcement type and there are four variations of each color—we just randomly select one.
- The product name and version are entered into the boxes at the top
- The description in the body middle-center there
- We use [https://storyset.com/](https://storyset.com/) to whip up a quick illustration to put on the right.
- 

I feel I have a good approach to doing this with n8n, but wonder if it could be done natively with Discourse AI and other tools?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [1 mei 2025 om 01:46 UTC](https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142/3 "2025-05-01T01:46:09Z")

</div>

The Designer persona using the excellent new GPT Image 1 model is capable of doing stuff like this:

 !["POLICYPAK 25.3 Client-Side Enhancements" illustrates an illustrated man working on a laptop within a tech-oriented environment containing icons like a shield, lock, and remote, possibly signifying security or software features. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/d/5/b/d5bc4ca6e351020c3c0d395c0225efda719ab6c6.jpeg)

 ![The image features a professional using a laptop, with the title "POLICYPAK 25.3 Client-Side Extensions Enhancements" and related icons representing security and technology in the background. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/d/d/d/ddd3f602d49314acfaae74357664e73bd30189be.jpeg)

> **[PolicyPak 25.3: Client-Side Extension Enhancements](https://meta.discourse.org/discourse-ai/ai-bot/shared-ai-conversations/GCV5IkOpKHKPqOua3gQ9_Q)**
>
> sam: Help me make an announcement banner for PolicyPak 25.3: Client-Side Extension Enhancements. it should look modern and and include a banner. A bit about PolicyPak: Netwrix PolicyPak 
> netwrix.com/endpoint 
> CUSTOMER FEEDBACK 
> “Netwrix PolicyPak makes it much easier to comply with federal security mandates. In fact, in some cases, we would simply have no way 
> to implement the mandated settings without…

I think you could wire something up using custom presona and using the right tools to achieve a lot of this, for sure.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [1 mei 2025 om 03:23 UTC](https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142/4 "2025-05-01T03:23:33Z")

</div>

Note for custom tool usage, as long as there are proper REST APIs you can integrate easily, for example this is how I integrate with flux image generation:

```javascript
const apiKey = "password";
const model = "black-forest-labs/FLUX.1.1-pro";

let prompt;

function invoke(params) {
  let seed = parseInt(params.seed);
  if (!(seed > 0)) {
    seed = Math.floor(Math.random() * 1000000) + 1;
  }

  let height = parseInt(params.height);
  if (!height || height < 256 || height > 1440) {
      height = 768;
  }
  let width = parseInt(params.width);
  if (!width || width < 256 || width > 1440) {
      width = 1024;
  }
  
  width = width - (width % 32);
  height = height - (height %32);

  prompt = params.prompt;
  const negative_prompt = params.negative_prompt || "";
  const body = {
    model: model,
    prompt: prompt,
    width: width,
    height: height,
    steps: 10,
    n: 1,
    seed: seed,
    negative_prompt: negative_prompt,
    response_format: "b64_json",
  };

  const result = http.post("https://api.together.xyz/v1/images/generations", {
    headers: {
      "Authorization": `Bearer ${apiKey}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(body),
  });
  
  if (result.status !== 200) {
      return { error: true, body: result.body };
  }

  const base64Image = JSON.parse(result.body).data[0].b64_json;
  const image = upload.create("generated_image.png", base64Image);
  const raw = `
![${prompt}](${image.short_url})
`;
  
  if (!params.show_to_user === false) {
     chain.setCustomRaw(raw);
  }

  return { result: "Image generated successfully", prompt: prompt, url: image.url, seed: seed, negative_prompt: negative_prompt };
}

function details() {
  return prompt;
}

```

You can see the HTTP post and the parsing of the base 64 image in the sample.

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [1 mei 2025 om 03:55 UTC](https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142/5 "2025-05-01T03:55:21Z")

</div>

If given a post body, does the burden for turning content from that body into valid parameters fall on Discourse AI to read the content and then create the request object? Or should the raw content be passed onto the tool and the burden for an LLM parsing that for the necessary data to construct a proper input for its API call exist there?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [1 mei 2025 om 04:04 UTC](https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142/6 "2025-05-01T04:04:05Z")

</div>

Yes in that case the tool has an api already for reading posts so you can just pass an id in

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [1 mei 2025 om 12:20 UTC](https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142/7 "2025-05-01T12:20:15Z")

</div>

Would you be able to point me to the docs for this by chance?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [12 mei 2025 om 01:35 UTC](https://meta.discourse.org/t/is-an-automation-like-this-possible-with-discourse-ai-today/364142/10 "2025-05-12T01:35:42Z")

</div>

Sorry for the delayed reply here, it is tricky, our documentation is evolving and the API surface is growing weekly.

This kind of technique provides some accurate up to date mileage, but I think we need to wait a bit for all the API to stablize prior to setting stuff in stone:

> **[Discourse AI Tool JS API Explained - AI Conversation - Sam Saffron's Blog](https://discuss.samsaffron.com/discourse-ai/ai-bot/shared-ai-conversations/zM73UIvl0H0FH6H69cBnBQ)**
>
> AI Conversation with Gemini-2.5-pro:
> sam: I need you to read discourse-ai/lib/personas/tool\_runner.rb at main · discourse/discourse-ai · GitHu… gemini-2.5-pro: Okay, I can help with that! 
> First, I’ll need to fetch the content of the tool\_runner.rb...
