Now that our flow knows the weather, we need to pass that information to our "brain"—the AI. This is a major step: You are about to perform Module-to-Module mapping, which allows different services to share information automatically (and it is irrelevant whether the next module utilizes AI or not at this point ).
If using a personal training team and not the central team for data analysts, please enable the AI addendum as shown below.
Accept the AI Addendum (Personal Training Team only)
Note: In the central team, the AI Addendum is already accepted. Check the URL to see if you're in a central or personal training team:
Central training team URL: data-engineer-analyst-training.training.celonis.cloud
Personal training team URL: [unique ID]-[Date of creation].training.celonis.cloud
👉🏼 We usually recommend using the central rather than the personal training team!
🚨 Enable AI Services
Please ensure to read, understand, and accept the Celonis Artificial Intelligence Addendum in your training environment. Otherwise, you cannot complete the practical exercises in this course. To do so, navigate to "Admin & Settings", and then to "AI Settings":
Here, you have the option to enable AI Services as required:
Prerequisites: "No Run, No Data"
Before you can map data from one module to another, there is a golden rule in Action Flows: You must run the module at least once. The Reason: Celonis needs to "see" the actual data structure coming back from a module to know what variables are available.
If you try to map a module that hasn't executed yet, your mapping panel will be empty. Since we ran our Weather module in the last lesson, the data pills are ready and waiting for us.
Adding the AI Module
We can therefore go ahead and add the AI module to our Action Flow, which will take in the current weather conditions as an input, along with the rest of the prompt informing it what outputs we expect from it.
To add the "Create AI Prompt" module:
Hover over the right side of your Weather module and click the (+) icon. Search for Create AI Prompt (part of Celonis Apps) and click to add it. Because you used the plus icon, the two modules are now physically linked on your canvas. Draft your Prompt
It’s time to configure the AI Consultant. We want you to try drafting the prompt yourself. Click on the AI module, select a model of your choice (recommended: gpt-4o-mini since it's a light-weight task), and set the Role to Developer/System.
While there are other roles like Assistant or User, we use System here to define the core instructions and laws for our consultant. We won't go into the technical deep-dive of AI roles in this introductory course, but for now, remember that "System equals Rules".
Your prompt (the text content) should contain two parts:
The Facts: Use data pills from the Weather module (like Temperature and Description) to tell the AI what is happening outside. The Logic: Describe your personal sport preferences. For example: You love cycling and don't mind the cold, but if it's slippery (e.g., there’s rain, snow, or ice), you'd rather go to the gym.
Give it a try! Type your instructions into the prompt field and map the necessary weather pills where they belong.
One Possible Solution
How did you do? While there are many ways to write a prompt, here is one way to structure it:
"You are a sports consultant. The current weather is [Description], and the temperature is [Temperature]. The user prefers to cycle outside and doesn't mind the cold, but if the streets are slippery (e.g., there’s rain, snow, or ice), they’d avoid it at all temperature levels. Otherwise, they’d go to the gym. Give them a one-sentence recommendation based on the weather conditions and their preferences."
The way to map the weather outputs to the prompt is the same as before, when mapping your input to the weather module's location field.
Run the entire Action Flow
It is time to test your current Action Flow configuration! Once you hit run and specify the location, take a look at the AI module's output. Do you see something similar as below?
Hint: the final message output hides inside "choices" and "message".
Architect's Note: Is AI the right tool?
Using a "Create AI Prompt" module here is a powerful and fast way to get a recommendation. However, as an Action Flow (and AI) architect, you should always consider the cost of intelligence.
AI is Heavy: Using an LLM for a simple "If it's raining, go swimming" decision is computationally expensive and consumes more energy than standard logic. The Alternative: In a more advanced flow, you could achieve this same result using a Router and Filter conditions. It’s more complex to build, but it's "cheaper" - both in terms of processing credits and environmental impact.
We are using AI today for speed, but always ask yourself: "Does this need a brain, or just a simple rule?"
It is now time to complete the circle and send our recommendation to ourselves via Email. After all, you wouldn’t want to access Celonis and this particular Action Flow every day to receive your recommendation, would you?