# Text yourself when a qualified lead arrives in n8n

Import an n8n workflow that checks saved-lead events, skips unqualified and previously seen leads, and texts your own phone. Start with 10 free texts a month.

## 1. Import the workflow

Download the workflow JSON from the link below, then use n8n's Import from File option. It starts inactive and contains no credentials. Your app saves a lead and calls an authenticated webhook. The workflow validates the event, filters unqualified leads, checks its history, and asks SelfPing to text you.

Your app must save the lead and decide whether it is qualified before calling the webhook. Send one event per request with event set to lead.saved, a stable lead_id, and qualified set to true or false. The ID accepts 1 to 100 letters, digits, underscores, or hyphens. Other event types and qualified:false are ignored; missing or malformed lead fields fail the execution.

## 2. Connect two separate credentials

In Lead saved, create a Header Auth credential with Name set to X-Webhook-Secret and Value set to a long random secret. Your app uses this secret to call n8n. Keep it on the server.

In Text myself, create a different Header Auth credential with Name set to Authorization and Value set to Bearer followed by a space and your SelfPing API key. Get the key from your SelfPing dashboard. Do not reuse the webhook secret here.

Texts go to the phone that owns the SelfPing key. The free plan includes 10 texts a month; Hobby is $5/month for 100. Each send uses one credit.

## 3. Test one event

Open Lead saved and choose Listen for test event. Copy its Test URL into N8N_WEBHOOK_URL and set N8N_WEBHOOK_SECRET to your inbound secret. Running the command below sends one real SMS and uses one credit.

The webhook acknowledges receipt immediately. That response does not confirm delivery. Check the n8n execution, then the final delivery status in SelfPing and the text on your phone.

Trigger one test notification:

```bash
curl --fail-with-body --max-time 15 \
  "$N8N_WEBHOOK_URL" \
  -H "X-Webhook-Secret: $N8N_WEBHOOK_SECRET" \
  --json '{"event":"lead.saved","lead_id":"sample-001","qualified":true}'
```

Example text:

```text
A qualified lead was saved. Check your CRM to follow up.
```

## 4. Connect your saved-lead event

Publish the workflow and switch your app to the Production URL shown by n8n. Call it after each saved lead with an ID unique across your sources. Test repeated IDs through the Production URL. The duplicate filter keeps a history of 10,000 IDs; clearing that history or evicting old IDs allows them through again. This is best-effort suppression, not an exactly-once guarantee.

The template has no automatic retries. The history may contain an ID even after an SMS failure. Check the failed execution and SelfPing delivery status before deliberately retrying the Text myself step. Do not change the ID just to bypass the filter. A failed notification should not roll back the saved lead. The default message keeps names, emails, and lead details in your CRM.

## References

- [Download the n8n workflow JSON](/workflows/selfping-new-lead.json)

- [n8n import and export](https://docs.n8n.io/workflows/export-import/)

- [n8n Webhook node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/)

- [n8n HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)

- [Runnable examples](https://github.com/br-schneider/selfping-examples)

- [Pricing](https://www.selfping.com/pricing)