Unit 4: Integrating AI Into Workflows
4a. Integrate free generative AI services into existing workflows.
How do you add a free generative AI service to a workflow without changing the whole process?
Which kind of task should you send to AI, and which should stay in the existing workflow?
What information must the workflow provide so the AI service can do useful work?
When would you choose an AI step, rather than a non-AI step, to handle a task?
The unit materials show that you can generative AI service to provide text output inside an existing workflow, so the workflow keeps its normal steps while AI handles a language task such as writing or rewriting content. The key idea is to connect the service at the right point in the flow, pass in the needed information, and then use the AI output as part of the larger process. This lets you keep the workflow structure you already have while adding a more flexible content step.
A common decision is whether the task needs pattern-based processing or language generation. Use AI when the task depends on producing new text from the input you give it, and keep the rest of the process in the normal workflow. Students often try to send too little information to the AI service, which makes the result less useful. The materials emphasize that you should give the service enough context so its output fits the task and can be used in the next step.
A simple example from the unit is using a free AI service in a workflow that already handles incoming requests. The workflow can collect the request, send the content to the AI service, and then pass the AI result to the next step. Can you see how this keeps the original process in place while adding AI only where it helps most?
To review, see:
[4.1 Integrating Free Generative AI Services]
[1.4 How Generative AI Powers Automation]
4b. Use AI to summarize, classify, generate, and extract content in automated workflows.
How do summarizing, classifying, generating, and extracting differ as workflow tasks?
What kind of output should you expect from each AI task?
Which task would you choose if you need a short version, a label, new text, or specific details?
When might a workflow fail if the AI output does not match the format the next step expects?
The unit materials explain four common content tasks for AI in workflows: summarize means shorten text while keeping the main point; classify means place content into a category; generate means create new text from the input; and extract means pull specific information out of content. These tasks are useful because they turn unstructured text into something a workflow can use. For example, a long message can be summarized, tagged with a category, used to create a reply, or searched for a needed detail.
You should choose the task based on the job the workflow must do. If the next step needs a short overview, summarize. If it needs a decision label, classify. If it needs new text, generate. If it needs only one or two details, extract. A common pain point is expecting AI to produce the same kind of output every time without telling it what format to use. The materials show that the workflow works best when the AI task matches the next action's needs.
One concrete way to think about this is to compare the outputs: a summary can feed a review step, a classification can route the item, generated text can become a response, and extracted values can fill fields. Because each task serves a different purpose, the wrong choice can break the flow even if the AI result is reasonable on its own.
To review, see:
[4.2 Using AI for Dynamic Content Tasks]
[1.4 How Generative AI Powers Automation]
4c. Combine AI outputs with workflow actions to build responsive automations.
How do you connect an AI result to the next workflow step?
What should happen when the AI output changes the route the workflow takes?
Which workflow action should use the AI result directly, and which should only use it after a check?
How do you design a responsive automation instead of a one-way AI step?
The materials show that a responsive automation does not stop at the AI output. Instead, you combine the output with workflow actions so the process can react. For example, the AI result can be used to choose a route, fill a field, send a message, or start another step. This makes the automation responsive because the next action depends on what the AI produced.
To build this kind of flow, first decide what the AI result will control. Then connect that output to an action that can use it. If the output is a label, the workflow can follow different branches. If the output is text, the workflow can send it forward or insert it into a message. If the output is a value, the workflow can place it in the right field. The main judgment is whether the AI result is ready to use right away or whether the workflow should check it first. Students often get this wrong by treating AI as the whole automation, when it is really one part of a larger sequence.
A useful pattern in the unit is to let AI make the content decision and let the workflow make the operational decision. That division keeps the process clear. In practice, the AI step gives the information, and the workflow step acts on it. This is how you create a system that responds to changing input instead of following only one fixed path.
To review, see:
[4.3 Creating Responsive AI-Enhanced Workflows]
[3.3 Adding Conditional Logic]
[2.3 Defining Triggers, Actions, and Conditions]
4d. Write prompts that produce consistent, structured AI outputs for automation tasks.
What should you include in a prompt so the AI gives output that automation can use?
Why does a structured prompt help a workflow more than a general request?
How would you change a prompt if the next step needs the output in a fixed format?
Which prompt would you trust more for automation: a broad instruction or one that clearly names the needed parts, and why?
The unit materials show that prompts for automation should be clear, specific, and structured so the AI returns output the workflow can use reliably. A prompt is the instruction you give the AI service. If you want consistent results, the prompt should say what the task is, what information to use, and what form the answer should take. This reduces variation and helps later steps handle the result.
A structured prompt is especially important when the next action needs a predictable format. For example, if a workflow needs a summary, a category, or extracted details, the prompt should make that requirement clear. A broad request may produce useful text, but not in a form the workflow can handle. The materials point to this as a common problem: if you do not specify the structure, the AI output may be harder to use. So the better prompt is the one that helps the workflow, not just the one that sounds natural to a person.
To make a prompt consistent, state the task directly and name the output you need. Then use the result in the workflow step that follows. Because automation depends on reliable input, the prompt is part of the design, not just a message to the AI. Can you see why the best prompt is the one that makes the next step easier to build?
To review, see:
[4.4 Writing Effective Prompts for Automation]
[4.2 Using AI for Dynamic Content Tasks]
Unit 4 Vocabulary
This vocabulary list includes terms you will need to know to successfully complete the final exam.
classify
extract
generate
generative AI service
prompt
summarize

Last modified: Thursday, 18 June 2026, 1:29 PM
Callback before_footer in local_aigrade component should be migrated to new hook callback for core\hook\output\before_footer_html_generation
  • line 7225 of /lib/moodlelib.php: call to debugging()
  • line 7292 of /lib/moodlelib.php: call to {closure}()
  • line 71 of /lib/classes/hook/output/before_footer_html_generation.php: call to get_plugins_with_function()
  • line 987 of /lib/classes/output/core_renderer.php: call to core\hook\output\before_footer_html_generation->process_legacy_callbacks()
  • line 94 of /mod/page/view.php: call to core\output\core_renderer->footer()