---
title: "1.2.0-alpha1 is out"
video_id: G62GgvD_Imw
url: https://www.youtube.com/watch?v=G62GgvD_Imw
workflow_page: https://workflows-of-ai.com/workflow/120-alpha1-out
language: en
captions: generated
---

0:00 This video is sponsored very freely
0:02 give. If you need help with Drupal and
0:04 AI, get in contact with us. So, Drupal
0:07 AI 1.20
0:09 alpha 1 is out. It's ready to be tested.
0:12 You can try it out. There's a lot of new
0:14 features
0:16 uh in it. It's not feature complete yet.
0:18 There's going to be bugs in it, but uh
0:21 it's there so you can start testing it.
0:22 And I'm going to showcase
0:25 uh maybe the most important feature uh
0:31 at least that you see and at least for
0:33 agencies that works with uh heavy
0:36 editorial workflows and that's a module
0:39 called form um form widget actions that
0:43 comes with the AI module now. And what
0:46 this does is I have a movie overview
0:48 content type here. I've just copied
0:51 something uh and say that I want to add
0:55 a subtitle to my movie review. Now then
0:59 there's a button here. So what this is
1:01 doing it's uh contacting an automator
1:03 where we have a business specific
1:06 uh uh workflow where you could in theory
1:09 when you click on this button go out on
1:10 the internet uh uh Google
1:14 you know scrape websites get PDFs do a
1:18 lot of this cool stuff that you can do
1:19 with the automator in this case we're
1:21 just asking it to create a subtitle
1:25 and this has like I think it has around
1:28 100 plugins of things it can do now. So,
1:31 I'm just going to showcase something
1:33 completely else.
1:36 Maybe you get, you know, the images like
1:38 this from a photographer. This doesn't
1:40 mean anything. It's really bad SEO. We
1:43 just click our rewrite file name. The uh
1:47 the what's going to happen now is that
1:49 the AI goes and looks at this image,
1:52 reads this review, and thinks of a
1:54 actual good file name for this. This is
1:57 also added in 1.2. to O. So this is a
2:00 automator as well, which means if you
2:02 have thousands of images on your website
2:05 that has really bad file names, you can
2:07 run the automator through them and it
2:09 actually creates better file names for
2:11 it.
2:13 On the actual review, there is a edit
2:15 summary. Well, there's a summary field
2:17 here, right? No one ever fills it in. It
2:19 just takes the first paragraphs.
2:22 Well, no one I never fill it in. Now I
2:24 can click summarize. It's going to look
2:26 at this and create a summary for it.
2:30 Um,
2:34 and here we go. We have a summary. And
2:36 if I don't like it, can just click
2:38 again. It's going to create another one.
2:42 Uh, and these are based on my very
2:45 specific prompts. Once again, I can go
2:47 look at all the other content that I
2:49 have on the website. While I'm doing
2:51 this, I can set up a really complex
2:53 process happening in the background
2:54 here.
2:56 Last thing we want to do is generate or
2:58 pick tags. So in this case, it says that
3:02 it's science fiction and it's a dinosaur
3:05 reboot and it's basing this on this
3:07 review. So how do we set this up?
3:11 So let's get started. So the important
3:14 thing is you get the alpha module. Uh
3:16 sorry 1.2 alpha 1. Uh I will show you
3:21 that I have gotten that. You can see it
3:25 here. Uh I also have gotten token module
3:28 and admin toolbar. Token is for the
3:31 automator admin toolbar. It's just to
3:33 make it easier.
3:35 So we're just going to go ahead and uh
3:37 create those. I will also say I have
3:40 created a key already for OpenAI. I'm
3:42 going to use OpenAI in this case to
3:44 showcase everything. So we install
3:48 OpenAI Automators admin toolbar and
3:51 admin toolbar extra tools
3:54 and then the form widget actions which
3:59 is the new module that we have that can
4:01 trigger the automators.
4:07 Uh,
4:11 and
4:14 when we have this done,
4:18 the first thing we're going to do is
4:20 just turn on the OpenAI key here under
4:24 OpenAI settings. And that makes OpenAI
4:27 available for everything. And what I
4:29 thought we would do in this case, we're
4:30 going to create a content type called
4:34 uh movie review.
4:38 And
4:42 we're going to yeah we get a body field
4:45 from the start. I guess that's fine but
4:48 we should rename it. We call it review
4:50 in this case. So we have a review.
4:56 Uh the next thing we want is uh a
5:02 tagging field. So we're going to take
5:03 references
5:05 taxonomy term tags
5:09 uh and all right this is available
5:13 already. We're on a standard
5:14 installation so we can just reuse
5:16 existing field
5:18 tags
5:21 and same thing with image. We might want
5:24 to have a image that describes
5:28 uh some scene of the movie.
5:33 So uh and then we're going to create a
5:37 field that is also
5:41 uh
5:42 uh let's see should we take a optional
5:45 let's take a number field in this case.
5:50 uh no let's take a selection list
5:54 integer
5:55 rating so I mean there is the rating
5:58 field there is a automator for it we
6:00 don't have yet though
6:03 uh a form widget action for this which
6:08 is something that we would have to
6:09 create then
6:12 uh
6:14 and
6:16 we do five.
6:20 I think that should be fine.
6:24 And
6:27 so actually I'm um I just realized I
6:30 can't use the list here. The reason for
6:33 that is that uh what we're doing here is
6:37 that when you're exposing something
6:40 uh to the form
6:43 um
6:45 to the form widget action
6:49 uh and you're creating some kind of
6:52 processor for it. So basically a
6:53 processor what should happen when you
6:55 click on this button here on the entity
6:58 form field any module can go in and say
7:01 hey I want to be a processor here I want
7:04 to change something but this then has to
7:07 define which fields you're doing this on
7:11 uh so this is a plug-in system where you
7:13 create one of these where you can say
7:15 you know like this that I am for the
7:19 widget type text text area with summary
7:21 and the field type text with summary and
7:23 we don't have one for list integer by
7:26 the time 1.2.0 always out. I hope we
7:29 have one for every automator field that
7:31 exists.
7:33 Uh and I can also mention that since
7:36 it's a plug-in system,
7:38 anyone can then uh connect to this
7:43 uh where they can
7:47 um
7:49 where they can create a processor and
7:52 this exists already for AI agents. it
7:55 exists for the core module AI content
7:57 suggestion and also ECA has an
7:59 integration in well so far 3.0 but I
8:03 think it's going to come to 2.0 Z as
8:05 well where you can actually create uh a
8:08 field widget action process using ECA
8:11 that is completely custom. This means
8:14 that you can set up really custom things
8:17 without actually coding. If you want to
8:20 code, you can also create a plug-in. Say
8:22 that you have a dam or a API for
8:24 instance you could have that when you
8:26 add a ID from this dam and click on a
8:28 button it up gets this image something
8:31 like that. uh and this works on any
8:34 complex field. It can get addresses,
8:37 full address fields and stuff like that.
8:39 So anyway, now we have then set up our
8:42 uh entity
8:44 uh with the fields and in theory. Now we
8:47 could then go in and like uh
8:52 save a
8:54 movie review.
8:56 So, I'm just going to for the fun of it
9:00 here, start creating a movie review.
9:04 So, uh oh, there's one thing I want to
9:08 do.
9:10 So, I'm going to upload an image without
9:13 all things. So, I'm not going to set it
9:15 required because I'm going to showcase
9:16 what we can do. Uh,
9:20 and
9:22 what
9:24 now we can do is then create the movie
9:26 review.
9:28 Superman
9:31 2020. Oh, no. Let's do something else
9:34 first. Let's just order this because
9:37 this makes no sense to order it.
9:40 Subtitle should come under then. Yeah,
9:44 the review is under the image. Rating
9:47 and text comes last.
9:51 Um,
9:52 so we will now save
9:58 uh the review field. We could maybe have
10:01 made uh
10:05 uh
10:07 required. I guess I'm going to take
10:09 something here. IGN.
10:12 Sorry I will copy and paste your review
10:15 here.
10:26 So
10:27 some uh
10:30 I have to copy and paste it in pieces
10:32 because there's a lot of
10:35 advertisement there. Let's just add the
10:39 verdict because that will be interesting
10:42 for the rating of course. So um
10:48 let's just set a heading four there. So
10:51 we save this.
10:54 So we have our uh oops
10:58 the whole thing there became a heading
11:02 which is not great.
11:04 should be like
11:07 this and
11:10 this should be a paragraph.
11:12 No, that will not work. So then, so um
11:19 so we have this. Now we're going to
11:21 start setting up things for the editor.
11:24 So let's go to our manage fields and
11:27 we're going to say, oh, there's one more
11:30 thing I want to do.
11:33 I want to already upload an image.
11:37 So, let me just find some image here.
11:42 Uh, there we go.
11:46 Put it home.
11:50 So, I just downloaded some image there
11:54 and I don't fill out the old text now
11:56 because that's what we want to add,
11:58 right?
11:59 So, what I'm going to do now is go to
12:02 manage fields on the image. We want to
12:05 have a button that creates all text in
12:08 this case. And you might have seen the
12:12 image uh the AI alt text. The AI image
12:17 all text the module is called. I I'm
12:20 part uh co-maintainer there. It's cool
12:22 and all. The problem with this it it
12:25 can't actually take uh any
12:30 um
12:32 context from what's happening around it.
12:35 Right? So that's what we're going to do
12:37 now. So we're going to say that we want
12:39 to use advanced mode which can use
12:41 tokens then because then we can put in
12:44 stuff like uh the title here for
12:48 instance. Wait, let me see here. Um,
12:52 so we're going to say, uh, look at this
12:57 image and create an alt text that is
13:03 under 100 characters long so it doesn't
13:07 get cut off by screen readers. And then
13:10 we also say uh you will be given uh a
13:17 title and a movie review as context.
13:23 This is for a movie
13:27 uh review
13:29 website.
13:31 Please make it
13:34 quirky because I know like
13:38 uh that is what Total Film does at
13:41 least. Uh
13:44 they make like this quirky
13:46 uh uh
13:48 quirky things where they write something
13:50 funny around the image. Right? Maybe
13:53 that doesn't belong in all text. I just
13:55 want to try it out now so you can see
13:57 that it is based on the actual title in
14:00 the body because what you will see
14:03 otherwise
14:05 is that we're using open AI in this
14:08 case. So I'm just going to say here uh
14:11 wait right I will explain this. So I've
14:13 created the prompt that creates this
14:15 right I'm going to set field widget
14:17 here. So what field widget as a
14:19 automator worker does it means it
14:22 doesn't save it and this means that you
14:24 have to create a button that uh
14:27 dynamically generates this. We're going
14:29 to take the default vision module in
14:31 this case and use the image field and uh
14:35 we're going to use a image wide 190. And
14:39 what I want to test here, I was going to
14:41 say this because our image model now is
14:43 open AAI is that open AAI is not allowed
14:47 to actually
14:49 uh tell which persons it sees. So if you
14:51 try to ask it what persons are on an
14:53 image in the API,
14:56 uh it often refuses that. There are ways
14:58 you can try to like get it to do it, but
15:01 by default it doesn't do it.
15:03 Uh so now
15:06 we have added the all text on the image.
15:09 So I forgot to say that you have the
15:11 different automated uh types. So you can
15:15 actually create the image. Uh you can
15:17 also this is something we added in 1.2.
15:19 You can rewrite the image file name. So
15:21 in this case the file name was like
15:24 superman something. But say that the
15:26 file name is DSC000025.jpeg.
15:30 This is bad for SEO and you might have
15:33 hundreds of this. So this is a place
15:34 where you can use the automator to
15:36 actually look at the image and rewrite
15:38 the file name of the image.
15:41 Uh rating you should not use LMS for
15:45 this. I will just showcase it as
15:48 example.
15:49 Uh we use base mode in this case. We
15:52 will just look at the review and say uh
15:56 on a scale of one to five where one is
16:00 bad and five is good please set a a
16:06 rating for this review
16:11 uh review and then well I can show you
16:15 there's these placeholder so there's a
16:17 lot this is a lot simpler than token
16:20 once again we're going to set field
16:22 widget. So the automator weight that's
16:24 for automation that doesn't matter in
16:26 this case but it's important that you
16:27 always say field widget if you don't
16:30 want automation in this case. Uh then
16:33 we're actually going to use the body as
16:35 well. We have filled in the body right
16:37 but there is one thing we didn't fill in
16:39 the the body and that's the summary. So
16:42 there is actually now a new uh automator
16:46 in 1.2 to again protect summary where
16:50 we're going to look at the review and
16:51 say write a summary for this review that
16:56 is
16:58 two to three sentences
17:01 long.
17:03 Can write movie review to give it some
17:05 more context. Right?
17:08 view
17:10 context again just use field widget
17:15 um
17:17 and we have the review subtitle.
17:20 Same thing here that we use and text
17:24 simple paste it on the review.
17:27 Write a subtitle that is not the name of
17:33 the movie
17:36 that is under 250 characters and in one
17:43 sentence
17:45 that explains their movie review.
17:51 movie review.
17:55 Um,
17:58 so, oh, I think you hear my Slack
18:01 messages now. Let me just turn that off.
18:05 Uh, we said field widget there as well.
18:08 We don't want to extract anything. Oh,
18:10 that's a bug fix we should do. Actually,
18:13 it should be null by default.
18:15 And then the last thing is tags. And
18:18 here we have create reference entities
18:20 if they do not already exist. And
18:23 because of that, we can actually tell it
18:24 to create stuff. So I'm just going to
18:28 actually copy this. So this is the
18:31 default prompt for uh
18:35 choosing category.
18:37 Uh based on the context,
18:41 create up to two categories from the
18:44 category that fits the uh
18:47 create two
18:50 tags
18:54 that fits the text.
18:59 That is a movie review.
19:03 Make sure that one of them is genre
19:08 context context. And now you might
19:10 wonder like if it's just going to make
19:12 up stuff, it's going to like say action
19:15 and adventure and then maybe create a
19:17 tag that's called action adventure. So
19:19 what you can do then? Oh, field widget
19:21 again. We can also say we all want them
19:24 to be lowercase. But we can add this
19:26 find similar tags. Then it's also after
19:29 it's trying to generate them, it's
19:31 looking do we have something that's
19:32 similar? So it doesn't recreate them. So
19:37 now we have created all that.
19:40 So next thing I will say is um maybe we
19:44 don't need this UX. Maybe this should
19:46 actually already be set up because you
19:48 show field widget actions. But this is
19:51 two steps right now. So you have to go
19:54 to manage form display and then on
19:56 everything that you want to fill out you
19:59 have to click uh the cog wheel and there
20:02 will be field widget actions where you
20:04 can say you want to add an action.
20:08 Uh you can uh create the button label or
20:11 you have to enable it as well. Uh add
20:14 subtitle we call this button
20:18 uh and which automator to use because
20:21 you could have multiple automators. We
20:23 don't really have a good UI for that.
20:24 That's a issue we have. But uh the
20:27 example where you want to add all text
20:30 but also change the file name for
20:31 instance is uh uh is possible. So you
20:35 could add multiple field widget actions
20:38 uh to any any field. So you can have
20:42 multiple buttons in there. So now we're
20:45 going to use the automator image. No,
20:47 we're going to use the automator all
20:48 text. That's what we added. enable uh
20:52 generate alt text we call this and we
20:56 pick the image default
20:59 uh do the same for the review then we
21:03 say generate summary is that what we're
21:06 going to do here called the button
21:09 summarize you don't have to fill in that
21:11 there is a default value there but it's
21:13 nice to have personalized buttons I
21:16 guess
21:19 uh number generator enable
21:23 guess uh rating
21:28 and you can probably think of a actual
21:31 useful use case for the uh integer
21:35 field. I hope I just took something you
21:38 should not really do.
21:41 So we're enabling uh generate
21:45 pickax
21:48 and Click update and we're going to save
21:52 this. And um
21:57 actually change your heart. I'm not
21:59 going to have it to wait. That's that's
22:03 h
22:04 that's not a good thing. You can
22:06 probably think of better ways of doing
22:07 that. Uh what you can do with the
22:11 numeric field. I mean you can extract
22:13 numbers or something. Anyway, when we go
22:15 to the Superman review now, then there
22:18 are all these buttons all of a sudden.
22:21 So, we can just click them. Add
22:22 subtitle.
22:25 And you see it actually creates some
22:27 subtitle. Can click the generate all
22:30 text. And it's hopefully going to say
22:31 Superman.
22:34 It does. That's not how Total Film would
22:38 write it, but uh yeah, you get the idea.
22:41 You can base it on other context. So you
22:43 can create your perfect alt text in this
22:46 case. So if we click edit summary here,
22:49 you see there's nothing there. So if I
22:51 click summarize, it's going to be
22:52 something there.
22:55 And you see it has added a summary for
22:57 you. And the thing also here then as
23:01 compared to automators, automators
23:04 does not run
23:06 if the um if the value is filled out. So
23:10 I will just show something. Now if I
23:12 click save, you see the tags is not
23:14 filled out. If I had a normal automator
23:17 that's not a field widget, this would
23:19 have been filled out when I save. But
23:21 because we choose field widget action,
23:22 it doesn't run. But the other cool thing
23:25 is here then if I'm not happy with this,
23:28 this is maybe a bad example. You might
23:30 be happy with part of it and you start
23:31 rewriting it. Typical human in the loop.
23:34 But if it's really bad or if it's
23:35 failing, you can just click again. And
23:38 it doesn't care that there is actually
23:40 something in there. It's going to add
23:42 something new again.
23:45 And last thing we're going to do then is
23:48 generate P tags. And you will see it's a
23:51 new site. It created these tags. They
23:53 didn't actually exist. So there's a
23:56 superhero and cinematic universe. And
23:59 we're going to save this.
24:01 uh they were lowerase because I set it
24:05 to be lower case. I guess superhero is
24:06 the journey in this case. I can show you
24:08 also if I uh click here again it might
24:11 yeah you see choose a superhero again
24:14 because it should search for either
24:15 superhero or something similar to
24:17 superhero. So it doesn't generate stuff
24:19 every time you do it. And then when
24:22 you're happy you can just save.
24:25 And that is it. That is form widget
24:28 actions.
