Anti-Scam Utilities
Contact Centres

Check a suspicious number or link through AI chat

Workflow purpose

This guide demonstrates how to use Proto's AI agent to let people check a suspicious phone number, link or account number before they reply, click or pay – and to explain what looks wrong about a message they've received.

The person pastes what they want checked or forwards the message. The AI agent picks out the number, link or account, looks it up in your scam records, and answers in one of three ways: a known scam, reported before, or not in your records. A pasted message is also read for common scam patterns, so the person learns why it looks suspicious, not just whether it's listed. Anyone who has already paid or shared a PIN goes straight to an urgent route.

Checking before acting is the cheapest point to stop a scam, and every check that turns up something new can become a report for your team through scam report intake.

Who can benefit from this guide:

  • National anti-scam centres and financial regulators running a public scam line
  • Banks and mobile money providers protecting customers from payment scams
  • Telecoms operators handling reports of fraudulent numbers and messages
  • Consumer protection agencies publishing scam warnings
  • Any organisation that keeps a list of reported scam numbers, links or accounts

Check a suspicious number or link

This workflow looks up a number, link or account against your scam records and explains the red flags in a message, 24/7. See how to build a scam check workflow.

Just starting with the platform?
For initial setup of your AI agent – including workspace setup, agent training, and channel deployment – please start here. This workflow guide assumes your AI agent is set up and ready for more advanced configurations.

1. Create a trigger

Start the flow when a person wants something checked – whether they type it or forward a screenshot.

  • Navigate to the Workflows tab in the AI agent settings.
  • Click New workflow and select Message received as the Workflow type.
  • Name the trigger (e.g. “Scam Check”) and add a short description (e.g. “Triggers if user wants to check whether a phone number, link, website, account number or message is a scam, or pastes a suspicious message and asks if it is real.”).
  • Add training phrases (e.g. “Is this number a scam”, “Check this link”, “Is this message real”, “Someone sent me this, is it safe”, “Can you check this account number”).
  • Click + Add workflow trigger and add an Attachment received trigger to the same workflow, limited to images and files. People often forward a screenshot instead of typing. Leave audio out – voice messages are transcribed and reach the Message received trigger as text.

The description matters here: a person who says “I was scammed” wants to report, not check. Keep that wording in the scam report intake workflow’s description so the AI agent can tell the two apart.

2. Ask what they want checked

Get the item itself in one reply, without making the person pick a category first.

Add a Send message action:

“I can check a phone number, website link or account number against reports we’ve received, and look at a message for signs of a scam. Paste the number, link or message here.”

Add an Ask survey action with one field:

Field Variable Type Invalid reply
What would you like checked? check_input Text Please paste the number, link or message you’d like me to check

If the person already pasted the item in their first message, skip the question: add a Branch before the survey that checks whether _user_input is longer than a few words or contains digits or a link, and use a Set variable action to set check_input to {_user_input} instead.

Under the Attachment received trigger, add a Send message before the survey:

“Thanks for the screenshot – I’ll keep it with this chat. To check it, please type or paste the phone number, link or account number shown in it.”

3. Pick out what to look up

Turn a pasted message into clean values your records can be searched by.

Add an LLM Processing action. Input: {check_input}. Resulting variable: check_details. Ask for JSON only, with these fields:

  • phone_numbers – any phone numbers, in international format with no spaces
  • domains – the domain of any link, lower case, without https:// or paths
  • account_numbers – any bank, wallet or till numbers
  • is_message – true if the input is a whole message rather than a single number or link
  • already_paid – true if the person says they’ve sent money
  • shared_secret – true if the person says they’ve shared a PIN, password or one-time code

On the Success branch, add a Set variable action: check_details = _.json_parse(check_details). Then set lookup_type and lookup_value from the first value found, in that order – phone, domain, account.

If nothing was found, add a Branch that sends the person back to the survey once, with a Send message: “I couldn’t find a number, link or account in that. Could you paste just the part you’d like checked?” If is_message is true, continue to Step 6 anyway – a message can still be read for red flags with no number in it.

4. Send anyone who has paid to the urgent route first

Stop the check from delaying someone who needs to act now.

Add a Branch action straight after Step 3:

Condition Next
check_details["already_paid"] == true or check_details["shared_secret"] == true Jump to Step 8
Else Continue to Step 5

People don’t always say they’ve paid in their first message, so Step 7 also offers an I already paid quick reply that jumps to the same urgent route.

5. Look it up in your scam records

Search the numbers, links and accounts your team has confirmed or received reports about.

Add a SQL Query action against a connection set up in Database Connections. SQL Query is available on Enterprise plans; on other plans, put the query behind your own API and use Send API instead. The query is read-only and never takes variables directly – use bind parameters. On PostgreSQL, for example:

SELECT status, report_count, scam_type, last_reported FROM scam_indicators WHERE indicator_type = $1 AND indicator_value = $2

Set Bind parameters $1 to {lookup_type} and $2 to {lookup_value}. On MySQL, use %(type)s and %(value)s instead. The rows are stored as a list in the resulting variable, e.g. indicator_rows.

If your records sit behind a blocklist service or a shared industry database, use a Send API action instead – a GET request passing lookup_type and lookup_value, with the authorisation key in the headers.

Both actions branch into Success, Error and Timed out. Under Error and Timed out, send: “I can’t reach our records right now. Please don’t reply to the message or pay anything until you’ve checked again or spoken to us.” Then continue to Step 6.

On Success, add a Set variable action for match_status – confirmed, reported or none – using _.len(indicator_rows) to tell an empty result apart.

6. Reply with what you found – carefully

Give a clear answer without telling anyone a number or link is safe.

Add a Branch action:

Condition Send message
match_status == "confirmed" “Warning: {lookup_value} is a confirmed scam ({scam_type}). Don’t reply, click the link or send money. Block the number and delete the message.”
match_status == "reported" “{lookup_value} has been reported to us {report_count} times, most recently on {last_reported}. We haven’t confirmed it yet, but please treat it as a scam: don’t reply, click or pay.”
Else “{lookup_value} isn’t in our records. That doesn’t mean it’s safe – new scam numbers and links appear every day. If the message asks for money, a PIN or a code, or rushes you, treat it as a scam.”

Get the not in our records wording right – a scammer’s number is often brand new. Never write “this number is safe” or “this link is genuine”.

If is_message is true, add an LLM Processing action under every branch to explain the red flags:

  • Input: {check_input}
  • Use Knowledge info to provide more context: on, with your scam typologies added to the Knowledge tab
  • System prompt: “You help people spot scams. Read the message and list up to three warning signs in plain words – such as urgency, a request for a PIN or code, a prize the person didn’t enter, a payment to a personal number, or a sender pretending to be an official body. Name the scam type if the knowledge base describes it. Never say the message is genuine or safe. Reply in under 80 words, in the language of the message.”
  • Resulting variable: red_flags

Then add a Send message: “What looks suspicious about this message: {red_flags}”

7. Offer to report it

Turn a check into a report while the person still has the details to hand.

Add a Send message with quick replies: Report it | I already paid | Check something else | That’s all.

Under a Message received sub-trigger for each:

  • Report it – a Jump action to the first action of your scam report intake workflow. Use a Set variable action first to set its description variable to {check_input}, so the person doesn’t have to paste the message again.
  • I already paid – a Jump to Step 8.
  • Check something else – a Jump back to Step 2.
  • That’s all – a Send message with one short tip, e.g. “Remember: we’ll never ask for your PIN or a one-time code.”

8. Handle the urgent route

Give people who’ve lost money or shared a code the steps that matter in the next few minutes.

Add a Send message action:

“Act now – the next few minutes matter. 1) Call your bank or mobile money provider on the number on the back of your card or in their app and ask them to stop the payment. 2) If you shared a PIN or code, change it now. 3) Don’t send any more money, even if you’re promised a refund.”

Add a Send message with quick replies: Block my card | Report the scam | Speak to an agent.

  • Block my card – a Jump to your lost or stolen card workflow, if this AI agent serves a bank. If it serves a regulator or anti-scam centre, send a Send message listing banks’ emergency numbers instead.
  • Report the scam – a Jump to scam report intake. Reports with a payment can then move into track-and-trace to freeze funds.
  • Speak to an agent – a Live agent handoff to your fraud team, with Live agent availability check on. Under If there is no live agent online, send: “Our team is offline right now. Please report the scam here so it’s waiting for them, and call your bank directly.”

9. Test the flow

Validate every path before going live using the AI agent tester side panel.

  • Paste a number that’s confirmed in your test data, one that’s only been reported, and one that isn’t listed – and check each reply, especially that the last never calls the number safe.
  • Paste a full scam message with a link and confirm the domain is extracted and the red flags are explained.
  • Send a screenshot and confirm the AI agent asks for the number in text and keeps the image in the chat.
  • Type “they took my money, is this a scam?” and confirm the urgent route comes before any lookup.
  • Build and test in an undeployed version – Duplicate the live version first – then click Deploy when every path passes.

Finalise the AI agent deployment by configuring your preferred channels and languages.