Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f0b5d85a7a |
@@ -1,6 +1,7 @@
|
|||||||
import defineApp from '../../helpers/define-app.js';
|
import defineApp from '../../helpers/define-app.js';
|
||||||
import addAuthHeader from './common/add-auth-header.js';
|
import addAuthHeader from './common/add-auth-header.js';
|
||||||
import auth from './auth/index.js';
|
import auth from './auth/index.js';
|
||||||
|
import triggers from './triggers/index.js';
|
||||||
|
|
||||||
export default defineApp({
|
export default defineApp({
|
||||||
name: 'Monday',
|
name: 'Monday',
|
||||||
@@ -13,4 +14,5 @@ export default defineApp({
|
|||||||
primaryColor: 'F62B54',
|
primaryColor: 'F62B54',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
triggers,
|
||||||
});
|
});
|
||||||
|
3
packages/backend/src/apps/monday/triggers/index.js
Normal file
3
packages/backend/src/apps/monday/triggers/index.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import newBoards from './new-boards/index.js';
|
||||||
|
|
||||||
|
export default [newBoards];
|
@@ -0,0 +1,29 @@
|
|||||||
|
import defineTrigger from '../../../../helpers/define-trigger.js';
|
||||||
|
|
||||||
|
export default defineTrigger({
|
||||||
|
name: 'New board',
|
||||||
|
key: 'newBoard',
|
||||||
|
pollInterval: 15,
|
||||||
|
description: 'Triggers when a new board is created.',
|
||||||
|
|
||||||
|
async run($) {
|
||||||
|
const body = {
|
||||||
|
query: 'query { boards { id, name } }',
|
||||||
|
};
|
||||||
|
|
||||||
|
const { data } = await $.http.post('/', body);
|
||||||
|
|
||||||
|
if (!data?.data?.boards?.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const board of data.data.boards) {
|
||||||
|
$.pushTriggerItem({
|
||||||
|
raw: board,
|
||||||
|
meta: {
|
||||||
|
internalId: board.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
@@ -228,7 +228,10 @@ export default defineConfig({
|
|||||||
text: 'Monday',
|
text: 'Monday',
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
collapsed: true,
|
collapsed: true,
|
||||||
items: [{ text: 'Connection', link: '/apps/monday/connection' }],
|
items: [
|
||||||
|
{ text: 'Triggers', link: '/apps/monday/triggers' },
|
||||||
|
{ text: 'Connection', link: '/apps/monday/connection' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Notion',
|
text: 'Notion',
|
||||||
|
12
packages/docs/pages/apps/monday/triggers.md
Normal file
12
packages/docs/pages/apps/monday/triggers.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
favicon: /favicons/monday.svg
|
||||||
|
items:
|
||||||
|
- name: New board
|
||||||
|
desc: Triggers when a new board is created.
|
||||||
|
---
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import CustomListing from '../../components/CustomListing.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<CustomListing />
|
@@ -23,6 +23,7 @@ The following integrations are currently supported by Automatisch.
|
|||||||
- [Invoice Ninja](/apps/invoice-ninja/triggers)
|
- [Invoice Ninja](/apps/invoice-ninja/triggers)
|
||||||
- [Mattermost](/apps/mattermost/actions)
|
- [Mattermost](/apps/mattermost/actions)
|
||||||
- [Miro](/apps/miro/actions)
|
- [Miro](/apps/miro/actions)
|
||||||
|
- [Monday](/apps/monday/triggers)
|
||||||
- [Notion](/apps/notion/triggers)
|
- [Notion](/apps/notion/triggers)
|
||||||
- [Ntfy](/apps/ntfy/actions)
|
- [Ntfy](/apps/ntfy/actions)
|
||||||
- [Odoo](/apps/odoo/actions)
|
- [Odoo](/apps/odoo/actions)
|
||||||
|
Reference in New Issue
Block a user