mirror of
https://github.com/rowyio/rowy.git
synced 2026-02-24 04:01:17 +01:00
sample config
This commit is contained in:
36
cloud_functions/functions/src/sparks/index.ts
Normal file
36
cloud_functions/functions/src/sparks/index.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
const sampleConfig = [
|
||||
{
|
||||
type: "slack",
|
||||
triggers: ["create"],
|
||||
shouldSend: (row, db) => true,
|
||||
requiredFields: [],
|
||||
target: (row, db) => ({ emails: ["shams@antler.co"], channels: [] }),
|
||||
message: (row, db) => ({
|
||||
text: "I am a test ${user.firstName} message",
|
||||
attachments: [
|
||||
{
|
||||
text: "And here’s an attachment!",
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
{
|
||||
type: "sendGrid",
|
||||
triggers: ["create"],
|
||||
requiredFields: [],
|
||||
shouldSend: (row, db) => true,
|
||||
to: (row, db) => "",
|
||||
cc: (row, db) => undefined,
|
||||
bcc: (row, db) => undefined,
|
||||
attachments: (row, db) => undefined,
|
||||
templateId: "d-",
|
||||
personalizations: ["firstName", { email: "user.email" }],
|
||||
},
|
||||
{
|
||||
type: "algolia",
|
||||
triggers: ["create", "update", "delete"],
|
||||
index: "users",
|
||||
requiredFields: ["email"],
|
||||
fieldsToSync: ["firstName", "lastName", "email", { email: "user.email" }],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user