How to dynamically pass tags in in-app workflows?
import { workflow } from "@novu/framework";
import { payloadSchema } from "./schemas";
export const testInAppNotification = workflow(
"test-in-app-notification",
async ({ step, payload }) => {
await step.inApp(
"send-in-app",
async () => {
console.log(JSON.stringify(payload));
return {
body: payload.body,
subject: payload.subject,
avatar: payload.avatar,
redirect: payload.redirect,
primaryAction: payload.primaryAction,
secondaryAction: payload.secondaryAction,
data: payload.data,
};
},
);
},
{
payloadSchema,
tags: ["DEFAULT"]
},
);
Currently, I'm statically setting tags: ["DEFAULT"] in the workflow options.
Is there a way to dynamically pass or compute tags during the execution of the workflow? If so, could you provide an example or guidance?
2 Replies
@Dhiraj
I think this is similar post as https://discord.com/channels/895029566685462578/1318508534027255868
Currently we don't support dynamic tags. I have shared the feature request with team
Thanks, @Pawan Jain Looking forward to exploring this feature when it comes