# Trials ending

Every morning, Stripe trials ending soon go to Slack, with a Gmail draft to each customer for you to review. No trial is nudged twice.

Requires Stripe, through Composio. Requires Gmail, through Composio. Requires Slack, through Composio. Runs on a schedule.

## Install

No one has run this against real Stripe, Gmail and Slack accounts through Composio yet. Its eval cases use stand-ins.

```sh
npx @parcha/agentrun template install github:Parcha-ai/agentrun-templates/templates/trial-ending-nudge@9ed9ff98e3130d3dce065743e8c60bb13e84f646 --trust
```

Or open `<your AgentRun address>/#/templates/install?src=github%3AParcha-ai%2Fagentrun-templates%2Ftemplates%2Ftrial-ending-nudge%409ed9ff98e3130d3dce065743e8c60bb13e84f646`. Pinned to commit 9ed9ff98e3130d3dce065743e8c60bb13e84f646.

### Install with your agent

Copy this prompt into your coding agent:

```text
Help me install the Trials ending template on my existing AgentRun.

Pinned template source: github:Parcha-ai/agentrun-templates/templates/trial-ending-nudge@9ed9ff98e3130d3dce065743e8c60bb13e84f646
Read the template and its instructions: https://github.com/Parcha-ai/agentrun-templates/tree/9ed9ff98e3130d3dce065743e8c60bb13e84f646/templates/trial-ending-nudge

Ask for my AgentRun address or local installation directory if you do not already know it. Confirm which instance to use before making changes.
Read https://agentrun.ai/SKILL.md and inspect the installed version's template install help. Use the installation workflow that version supports.
Review this template's setup, instructions and requested tools with me, then install the pinned version on that instance with the settings and permissions I approve. Do not start a second instance or redeploy my existing one.
If this version cannot install templates, explain what is missing and the supported next step. Verify the result and tell me how to run the installed agent.
```

## What it does

Each morning it finds the Stripe free trials that end in the next few days (3 unless you set it). For each one you get the customer, their plan and price, the day the trial ends and whether a card is on file, in one Slack post. It also writes one Gmail draft per customer, to that customer, for you to read and send yourself. A trial gets one nudge, never a second on a later day. A day with none posts nothing unless you ask it to. It reads Stripe and never changes a subscription, a price or a customer.

- Skill `trial-nudge`: Find the Stripe subscriptions whose free trial ends within the next N days, post one Slack list of them (customer, plan and price, trial end, card on file) and save one Gmail draft per customer for the owner to review. Reads Stripe only; never nudges a trial twice across runs. Use for the daily schedule and for "which trials end this week".

## What starts it

- On a schedule: every day at 09:00 (UTC), unless you pick another time when you install it.
- By hand, any time: from the console, the API or the CLI.

## Inputs

Each run takes a plain message (`content`).

### Setup, filled in once at install

| Name | Type | Required | What it is |
| --- | --- | --- | --- |
| `channel` | string | yes | Where the list is posted, by id: a channel (C0123ABCD: in Slack, the channel's details, at the bottom) or your direct-message channel with the app (D0123ABCD). The only place it posts. |
| `days_ahead` | integer, 1 to 14 | no | How many days ahead to look for trials ending, 1 to 14: 3 unless you set it. Default: `3`. |
| `post_when_empty` | boolean | no | Post a short "no trials ending" line on a day with none. Off: a quiet day posts nothing. Default: `false`. |
| `sign_off` | string | no | How each draft is signed, like "Mia, Acme". Blank: the drafts end with \[your name\] for you to fill. |
| `cron` | string, cron | no | When it runs, as a cron line (minute hour day-of-month month day-of-week): every day at 09:00 unless you set it. Default: `0 9 * * *`. |
| `timezone` | string, timezone | no | Your IANA time zone (Europe/Madrid, America/New\_York): the cron line and every date in the post are read in it. UTC unless you set it. Default: `UTC`. |

## What it needs

- Harness: pi, claude-agent, codex
- Model: balanced tier, medium effort
- Tools: read
- Composio Stripe tools: STRIPE_LIST_SUBSCRIPTIONS, STRIPE_RETRIEVE_CUSTOMER, STRIPE_LIST_PRODUCTS. Lists your trialing subscriptions, then reads each ending trial's customer and product name. It only reads: no change to a subscription, a trial, a price or a customer.
- Composio Gmail tools: GMAIL_CREATE_EMAIL_DRAFT. Saves one draft per ending trial, addressed to that customer's billing email in Stripe, for you to review and send. It can't send, and it never adds cc, bcc or another recipient.
- Composio Slack tools: SLACK_SEND_MESSAGE. Posts the day's list of ending trials to the one Slack channel you set, and nowhere else.
- Computer: Wherever your AgentRun puts a new agent
- Keys: A model key
- Learning: on

## Sample output

No sample output ships with this template yet.

## Tested

Passes 8 of 8 eval cases on pi, 8 of 8 on Claude Code and 8 of 8 on Codex.

8 eval cases: draft-retry, ended-trial-carried, injection-in-customer, no-repeats, none-today, quarterly-price, two-trials-ending, yen-price.

## Source

- Package: https://github.com/Parcha-ai/agentrun-templates/tree/9ed9ff98e3130d3dce065743e8c60bb13e84f646/templates/trial-ending-nudge
- Publisher: Parcha-ai
- Author: Parcha Labs
- Version: 0.1.0
- License: Apache-2.0
- Category: Sales
- Page: https://marketplace.agentrun.ai/templates/trial-ending-nudge/
