Openpieces logoopenpieces
Back to workflows

Weekly Coupon → Friday Email

active

Runs every Thursday 9am PT. Creates a Stripe coupon with a smart, time-of-year-aware code and discount (1-50%). Then schedules a promotional email via Mautic for Friday at 12:00 UTC using the branded email template.

Sydney2 pieces1 task0 eventsPublished 6/25/2026 · 20d ago

Detailed Steps

· 4
1

1. [DECIDE COUPON] Determine the current date and time. Look at the time of year: if near Easter → use code like EASTER40 or EASTER35; if near Summer Solstice → SUMMER30, SUNNY25; if near Black Friday → BLACKFRIDAY50; if near Christmas → CHRISTMAS40, XMAS35; if near New Year → NEWYEAR30; if near Valentine's → LOVE25, HEART20; if near Halloween → SPOOKY30, BOO25; if nothing special → use a default pattern like WEEKLY30, SUPER35, MEGA25, FLASH30, SPECIAL25, DEAL35, SAVER30 (rotate these to avoid repeating the same one as the previous week). The percentage must be between 1 and 50 — be smart about it, don't always pick 50. If last week was 50, pick something lower this week.

2

2. [CREATE COUPON IN STRIPE] Call the Stripe Coupon Creator action service via its POST /create-coupon endpoint. Use these params: { "percentOff": <the chosen percentage>, "couponCode": "<the chosen code>", "duration": "once", "maxRedemptions": 100 }. The Stripe Coupon Creator service URL is: https://op.munashesydney.com/api/s/bd46baf2-516b-4804-b2af-b93c66c8720f

3

3. [SCHEDULE FRIDAY EMAIL] Calculate the next Friday's date from the current time. Schedule an email for Friday at 12:00 UTC. Call the Mautic Email Scheduler action service via its POST /schedule endpoint. The service URL is: https://op.munashesydney.com/api/s/e46f6b91-cf2e-4a76-997d-b0a382f12faa. Use these params: { "subject": "<a compelling subject line mentioning the coupon code and discount, e.g. 'Your <discount>% Off Code Inside — Apply Now'>. Do NOT use emojis in the subject line.", "htmlContent": "<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Exclusive Offer</title> <link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700" rel="stylesheet" type="text/css"> </head> <body style="margin:0; padding:0; background-color:#f5f5f5; font-family:Ubuntu, Helvetica, Arial, sans-serif;"> <table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px; max-width:100%; background-color:#ffffff;"> <!-- Header with Logo + Company Name --> <tr> <td style="background-color:#ffffff; padding:30px 30px 20px; border-bottom:1px solid #f0f0f0;"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td valign="middle" style="padding-right:12px;"> <img src="https://aisignalcopier.com/images/logo.png" alt="" width="44" height="44" style="border:0; display:block;" /> </td> <td valign="middle"> <span style="font-size:20px; font-weight:700; color:#333333; letter-spacing:-0.3px;">AI Signal Copier</span> </td> </tr> </table> </td> </tr> <!-- Body Content - Insert the actual coupon code and discount % from step 1 --> <tr> <td style="padding:30px 30px 20px;"> <h1 style="font-size:24px; font-weight:700; color:#333333; margin:0 0 10px;"> Happy Friday, {contactfield=name|Trader}! </h1> <p style="font-size:16px; line-height:1.7; color:#555555; margin:0 0 20px;"> Ready to level up your trading? Use this exclusive code for <strong><DISCOUNT>% off</strong> Premium &amp; VIP plans. </p> <!-- Code Display - REPLACE <CODE> and <DISCOUNT> with the actual coupon code and percentage --> <table align="center" cellpadding="0" cellspacing="0" border="0" style="margin:0 auto 25px;"> <tr> <td style="background-color:#fff0f8; border:2px dashed #ff69b4; border-radius:8px; padding:15px 30px; text-align:center;"> <p style="font-size:14px; color:#888888; margin:0 0 5px;">Your Exclusive Code</p> <p style="font-size:28px; font-weight:700; color:#ff69b4; margin:0; letter-spacing:2px;"><CODE></p> <p style="font-size:13px; color:#888888; margin:8px 0 0;"><DISCOUNT>% off Premium &amp; VIP plans</p> </td> </tr> </table> <!-- CTA Button - Blue (#3b82f6) --> <table align="center" cellpadding="0" cellspacing="0" border="0" style="margin:0 auto;"> <tr> <td align="center" style="background-color:#3b82f6; border-radius:4px; padding:14px 35px;"> <a href="https://aisignalcopier.com/pricing" target="_blank" style="color:#ffffff; font-size:16px; font-weight:600; text-decoration:none; display:inline-block;"> Activate My Offer </a> </td> </tr> </table> <p style="font-size:14px; line-height:1.5; color:#999999; margin:20px 0 0; text-align:center;"> Offer valid for limited time. Apply at checkout. </p> </td> </tr> <!-- Sign-off - Only use one rocket emoji here, nowhere else in the email --> <tr> <td style="padding:10px 30px 25px;"> <p style="font-size:16px; line-height:1.6; color:#555555; margin:0 0 5px;">Happy trading 🚀</p> <p style="font-size:16px; font-weight:600; color:#333333; margin:0;">– The AI Signal Copier Team</p> </td> </tr> <!-- Footer --> <tr> <td style="background-color:#f8f8f8; padding:25px 30px; text-align:center;"> <p style="font-size:13px; line-height:1.6; color:#999999; margin:0 0 10px;"> <a href="{webview_url}" style="color:#3b82f6; text-decoration:none;">View this email in your browser</a> </p> <p style="font-size:12px; line-height:1.5; color:#aaaaaa; margin:0;"> {unsubscribe_text} </p> <p style="font-size:12px; line-height:1.5; color:#aaaaaa; margin:8px 0 0;"> AI Signal Copier · <a href="mailto:support@aisignalcopier.com" style="color:#3b82f6; text-decoration:none;">support@aisignalcopier.com</a> </p> </td> </tr> <!-- Legal --> <tr> <td style="padding:15px 30px; text-align:center;"> <p style="font-size:11px; line-height:1.5; color:#bbbbbb; margin:0;"> Trading involves substantial risk of loss. Past performance is not indicative of future results. </p> </td> </tr> </table> </body> </html>" (IMPORTANT: Replace <CODE> with the actual coupon code from step 1, and <DISCOUNT> with the actual percentage. Use the coupon code and discount you decided in step 1 - do NOT keep the placeholders. IMPORTANT: Do NOT use emojis anywhere in the email body except for the single rocket 🚀 in the line 'Happy trading 🚀' above The AI Signal Copier Team sign-off.)", "sendAt": "<next Friday at 12:00:00Z in ISO 8601 format>", "segmentId": 2 }

4

4. [SAVE TO BRAIN & CONFIRM] Save the coupon code and discount percentage to the workspace brain as a fact with category="credentials", tags=["coupon", "weekly", "stripe"], and summary: "Coupon <CODE> created for <DISCOUNT>% off. Created on YYYY-MM-DD for the week starting Monday YYYY-MM-DD." This stores it so it can be looked up later (e.g., by the Saturday urgency workflow). Then log what was created: the coupon code, percentage off, and the email scheduled date. Done.

Scheduled Tasks

· 1
recurringThursday 9am PT - Generate Coupon & Schedule Friday Email
Interval

weekly

Time of day

09:00

Day of week

Thu

Timezone

America/Vancouver

Similar Workflows