SubsKeepr
SubsKeepr
NNovu
Created by SubsKeepr on 10/27/2024 in #💬│support
Failed to preview Step with id: `send-email`
Thanks for catching that. I will check it out
8 replies
NNovu
Created by SubsKeepr on 10/27/2024 in #💬│support
Failed to preview Step with id: `send-email`
anyone? stuck here.
8 replies
NNovu
Created by SubsKeepr on 10/27/2024 in #💬│support
Failed to preview Step with id: `send-email`
there is this, but doesn't help me. can't paste the whole thing. If you need it all, I can get it.
✗ Failed to execute workflowId: 'subscription-due' ├ σ stepId: 'send-email' ├ α action: 'preview' └ Δ duration: '135.33ms' Y [Error]: Failed to preview Step with id: send-email: {} at Ee.previewStep (webpack-internal:///(rsc)/./node_modules/@novu/framework/dist/servers/next.js:27:3237) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.eval [as email] (webpack-internal:///(rsc)/./node_modules/@novu/framework/dist/servers/next.js:24:13061) at async subscriptionDueWorkflow.name [as execute] (webpack-internal:///(rsc)/./app/novu/workflows/subscription-due.js:24:5) at async Ee.executeWorkflow (webpack-internal:///(rsc)/./node_modules/@novu/framework/dist/servers/next.js:25:373) at async preview (webpack-internal:///(rsc)/./node_modules/@novu/framework/dist/servers/next.js:27:5441) at async Oe.handleAction (webpack-internal:///(rsc)/./node_modules/@novu/framework/dist/servers/next.js:27:4996) at async eval (webpack-internal:///(rsc)/./node_modules/@novu/framework/dist/servers/next.js:27:3876) at async eval (webpack-internal:///(rsc)/./node_modules/@sentry/nextjs/build/cjs/common/wrapRouteHandlerWithSentry.js:57:36) at async F:\code\sk\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:55778 at async eO.execute (F:\code\sk\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:46527) at async eO.handle (F:\code\sk\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:6:57112) at async doRender (F:\code\sk\node_modules\next\dist\server\base-server.js:1352:42) at async cacheEntry.responseCache.get.routeKind (F:\code\sk\node_modules\next\dist\server\base-server.js:1574:28) at async DevServer.renderToResponseWithComponentsImpl
8 replies
NNovu
Created by SubsKeepr on 10/27/2024 in #💬│support
Failed to preview Step with id: `send-email`
// app/novu/emails/trial-ending.jsx
import * as React from "react";
import {
Button,
Html,
Text,
Container,
Heading,
} from "@react-email/components";
import { render } from "@react-email/render";

function TrialEmail(props) {
const {
userFirstName,
subscriptionName,
trialEndDate,
daysLeft,
convertsToPaid,
paidAmount,
subscriptionUrl,
} = props;

return (
<Html>
<Container>
<Heading>Trial Subscription Ending</Heading>
<Text>Hello {userFirstName},</Text>

<Text>
Your trial for {subscriptionName} ends in {daysLeft} days (
{trialEndDate}).
</Text>

{!convertsToPaid && (
<Text>
Your trial will end without any automatic charges. Please verify
this matches your actual {subscriptionName} subscription settings to
avoid any unexpected charges. To continue the service after the
trial, you'll need to select a subscription plan.
</Text>
)}

{convertsToPaid && (
<Text>
When your trial ends, you'll be automatically charged ${paidAmount}.
</Text>
)}

<Button
href={subscriptionUrl}
style={{ background: "#3b82f6", color: "#fff", padding: "12px 20px" }}
>
Manage Subscription
</Button>
</Container>
</Html>
);
}

export function renderTrialEmail(inputs) {
return render(<TrialEmail {...inputs} />);
}
// app/novu/emails/trial-ending.jsx
import * as React from "react";
import {
Button,
Html,
Text,
Container,
Heading,
} from "@react-email/components";
import { render } from "@react-email/render";

function TrialEmail(props) {
const {
userFirstName,
subscriptionName,
trialEndDate,
daysLeft,
convertsToPaid,
paidAmount,
subscriptionUrl,
} = props;

return (
<Html>
<Container>
<Heading>Trial Subscription Ending</Heading>
<Text>Hello {userFirstName},</Text>

<Text>
Your trial for {subscriptionName} ends in {daysLeft} days (
{trialEndDate}).
</Text>

{!convertsToPaid && (
<Text>
Your trial will end without any automatic charges. Please verify
this matches your actual {subscriptionName} subscription settings to
avoid any unexpected charges. To continue the service after the
trial, you'll need to select a subscription plan.
</Text>
)}

{convertsToPaid && (
<Text>
When your trial ends, you'll be automatically charged ${paidAmount}.
</Text>
)}

<Button
href={subscriptionUrl}
style={{ background: "#3b82f6", color: "#fff", padding: "12px 20px" }}
>
Manage Subscription
</Button>
</Container>
</Html>
);
}

export function renderTrialEmail(inputs) {
return render(<TrialEmail {...inputs} />);
}
8 replies