How AI can optimise agency business processes

How AI can optimise agency business processes

Artificial intelligence can automate repetitive tasks, improve decision‑making with data‑driven insights and accelerate delivery of client projects, allowing design and marketing agencies to focus on creative strategy while the underlying workflow runs more efficiently.

Identify repeatable tasks that benefit from automation

Start by listing activities that occur in most projects and that require little creative judgement. Typical examples include:

  • Generating SEO‑friendly meta descriptions from page copy
  • Resizing and optimising images for web delivery
  • Populating content models in a CMS from a spreadsheet
  • Creating initial project briefs based on client questionnaires

For each task note the input source, the expected output and the current time spent. This simple matrix highlights where a language model or image‑processing AI can replace manual effort.

Automate content generation with large language models

Large language models (LLMs) such as OpenAI’s GPT‑4 can produce draft copy, headings and even code snippets. The workflow usually follows three steps: retrieve the prompt, call the API, store the result.

# Example: Node.js (v18) calling OpenAI API to generate a meta description
import { Configuration, OpenAIApi } from "openai";

const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);

async function generateMeta(pageTitle, pageContent) {
  const prompt = `Write a concise SEO meta description (max 160 characters) for a page titled "${pageTitle}". Use the following content as context:\n${pageContent}`;
  const response = await openai.createCompletion({
    model: "gpt-4o-mini",
    prompt,
    max_tokens: 60,
    temperature: 0.7,
  });
  return response.data.choices[0].text.trim();
}

Integrate the function into your build pipeline or content‑creation tool so that the AI‑generated text can be reviewed and edited before publishing.

Streamline project management with AI‑assisted bots

Many agencies use tools such as Trello, Asana or Jira. By adding a chatbot that understands natural‑language commands, team members can update tickets without leaving their messaging platform. A typical implementation uses a webhook that receives the message, parses intent with an LLM and calls the project‑management API.

  1. Set up a Slack app with an incoming webhook.
  2. Configure the webhook to forward messages to a serverless function (e.g., AWS Lambda, Node.js 20).
  3. In the function, send the message to an LLM to extract the action (create, move, close) and the relevant fields (task name, due date).
  4. Call the appropriate API endpoint of the project‑management tool to perform the action.

This reduces context‑switching and ensures that task status stays up to date.

Integrate AI with Drupal for white‑label development

Drupal 10 provides a robust plugin system that can host AI services as custom modules. The following outline shows how to create a simple service that calls the OpenAI API and returns generated text for a field widget.

// src/Plugin/Field/FieldWidget/AITextWidget.php (Drupal 10)
namespace Drupal\ai_text\Plugin\Field\FieldWidget;

use Drupal\Core\Field\WidgetBase;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Form\FormStateInterface;
use GuzzleHttp\Client;

/**
 * Plugin implementation of the 'ai_text' widget.
 *
 * @FieldWidget(
 *   id = "ai_text_widget",
 *   label = @Translation("AI text generator"),
 *   field_types = {"string_long"}
 * )
 */
class AITextWidget extends WidgetBase {

  public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
    $value = $items[$delta]->value ?? '';
    $element['value'] = $element + [
      '#type' => 'textarea',
      '#title' => $this->t('Content'),
      '#default_value' => $value,
      '#attributes' => ['rows' => 8],
    ];
    $element['generate'] = [
      '#type' => 'submit',
      '#value' => $this->t('Generate with AI'),
      '#ajax' => [
        'callback' => '::ajaxGenerate',
        'wrapper' => "ai-text-{$delta}",
      ],
    ];
    $element['#prefix'] = '
'; $element['#suffix'] = '
'; return $element; } public function ajaxGenerate(array $form, FormStateInterface $form_state) { $triggering_element = $form_state->getTriggeringElement(); $delta = $triggering_element['#parents'][1]; $prompt = $form_state->getValue(['fields', $delta, 'value']); $client = new Client(); $response = $client->post('https://api.openai.com/v1/completions', [ 'headers' => [ 'Authorization' => 'Bearer ' . \Drupal::config('ai_text.settings')->get('api_key'), 'Content-Type' => 'application/json', ], 'json' => [ 'model' => 'gpt-4o-mini', 'prompt' => $prompt, 'max_tokens' => 200, ], ]); $data = json_decode($response->getBody(), TRUE); $generated = trim($data['choices'][0]['text']); $form['fields'][$delta]['value']['#value'] = $generated; return $form['fields'][$delta]['value']; } }

The module adds a button beneath a long‑text field; when clicked, the current content is sent to the AI, the response replaces the field value and the editor can make final adjustments. Because the widget lives inside Drupal, the agency can brand the interface as its own while the AI logic remains invisible.

Maintain data privacy and output quality

When sending client data to an external AI service, ensure that you have a clear data‑processing agreement. Use the provider’s “no‑logging” or “data‑retention” options where available. For on‑premise needs, consider open‑source models such as Llama 2 that can be hosted behind your firewall.

Quality control is essential because AI can produce plausible but incorrect information. Implement a review step in the workflow:

  • Mark AI‑generated content with a visual cue (e.g., a badge or colour).
  • Require a human editor to approve before publishing.
  • Log the prompt and response for audit purposes.

Choosing a white‑label development partner

Agencies that lack in‑house developers should look for a partner that can embed AI‑enhanced functionality directly into the CMS they already use. Key criteria include:

  • Experience with Drupal 10 and its plugin architecture.
  • Ability to deliver custom modules that expose AI features through the agency’s branding.
  • Transparent process for handling API keys and client data.
  • Support for iterative improvement based on feedback from the agency’s designers and copywriters.

When the partner provides a clear hand‑off model—source control in a private repository, documentation that references the agency’s style guide and a testing suite that runs on the agency’s CI pipeline—the collaboration remains invisible to the client while adding measurable efficiency.

Start by mapping one low‑risk workflow, such as generating meta descriptions, to an AI service, and measure the time saved after a few weeks. The concrete improvement will guide further automation and demonstrate the value of AI without requiring a large upfront investment.

Illustration of a LibraFire team member on a video call with a client

How can we assist you?

Contact Us