Skip to content

Commit f14c12f

Browse files
committed
add automation
1 parent 786f56b commit f14c12f

File tree

3 files changed

+82
-2
lines changed

3 files changed

+82
-2
lines changed

src/app/user-manual/admin-panel/page.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ The CMS component is documented separately, it can be found <Link href="/user-ma
6767
On the settings page you can find all of the components that are less frequently visited and did not receive their own entry in the main navigation.
6868

6969
Here you can find:
70+
- <Link href="/user-manual/automation">Automations</Link>,
7071
- Badges,
7172
- <Link href="/user-manual/calendar">Calendars</Link>,
72-
- Menu Builder,
73+
- <Link href="/user-manual/menu-builder">Menu Builder</Link>,
7374
- Plugins,
7475
- Reactions,
75-
- Roles,
76+
- <link href="/user-manual/security">Roles</Link>,
7677
- Themes.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import { Wrench, GitBranch } from '@phosphor-icons/react/dist/ssr';
2+
import Link from 'next/link';
3+
import Alert from '@/components/Alert';
4+
5+
# Automations
6+
7+
8+
## Managing Automations
9+
10+
Automations can be managed from the Admin panel. They can be found under <Wrench /> Settings -> <GitBranch /> Automations.
11+
12+
Each automation consists of 3 parts:
13+
14+
1. Trigger
15+
2. Condition
16+
3. Action
17+
18+
<Alert severity="info">
19+
If you are seeing any triggers, conditions or actions that are not in the documentation below, they are probably added by a plugin, and you should refer to their documentation.
20+
</Alert>
21+
22+
23+
### Trigger
24+
25+
The trigger decides when to execute the action. Triggers also provide the payload which is available in the condition and action.
26+
27+
forumify currently ships with the following triggers:
28+
29+
#### Doctrine: Persist
30+
31+
**Execute**: After an entity is created in the database.
32+
33+
**Payload**:
34+
- `entity`: object
35+
36+
#### Doctrine: Update
37+
38+
**Execute**: After an entity is updated in the database.
39+
40+
**Payload**:
41+
- `entity`: object
42+
43+
#### Doctrine: Remove
44+
45+
**Execute**: After an entity is removed from the database.
46+
47+
**Payload**:
48+
- `entity`: object
49+
50+
### Condition
51+
52+
Once the automation is triggered, conditions make it easier to decide wether to continue with the action or not.
53+
54+
For example, if the trigger is set to "Doctrine: Persist", and the entity is "Topic", a condition can filter only for topics created in a specific forum.
55+
56+
#### Expression
57+
58+
Learn more: <a href="https://symfony.com/doc/current/reference/formats/expression_language.html" target="_blank">Symfony Expression Language</a>
59+
60+
### Action
61+
62+
<Alert severity="warning">
63+
While the trigger and condition run synchronously, the action is executed in a message queue worker to prevent a slow running action from impacting user experience.
64+
This means that sometimes the automation may seem to "lag behind" a little bit.
65+
</Alert>
66+
67+
#### Webhook
68+
69+
Sends a POST request to the given webhook URL.
70+
71+
#### HTTP Request
72+
73+
Call any external API using a HTTP request.
74+
75+
## Examples
76+
77+
Examples TBA.
78+

src/app/user-manual/page.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ import Link from 'next/link';
77
- <Link href="/user-manual/cms">Content Management System</Link>
88
- <Link href="/user-manual/calendar">Calendar</Link>
99
- <Link href="/user-manual/menu-builder">Menu Builder</Link>
10+
- <Link href="/user-manual/automation">Automation</Link>
1011
- <Link href="/user-manual/security">Security</Link>

0 commit comments

Comments
 (0)