User Avatar

Dino Arturo Celotti

4y ago

In this social blog I'll be writing about finance, investing, and product management of finance and payment systems.

Create Dynamic Links for your Google Sheets-backed NoCode App so that Users can Directly Open WhatsApp Chats
Dino Arturo Celotti

Here you'll learn how to create dynamic WhatsApp chat URLs for your NoCode app.

If building a NoCode contact list you're probably storing phone numbers in Google Sheets. Level-up your user experience by adding a "Chat with WhatsApp" button in your app!

Many don't because it involves:

  • WhatsApp URLs

  • CONCAT

  • ARRAYFORMULA

  • Open ended Ranges

  • IF statements

This sounds complicated, but we'll walk through each step together.

Step 1: Setting up your Google Sheet

Create a sheet for contact information

  • Column A: Name

  • Column B: Number

  • Column C: WhatsApp link

Enter a name in cell A2 and number in B2.

Step 2: Create a WhatsApp link

Every WhatsApp user has a simple two part URL:

  1. "https://wa.me/" followed by

  2. Full international number e.g. "+15551234123" for USA

In cell C2, we'll create the finished URL from the number we have using CONCAT:

=CONCAT("[<https://wa.me/>](<https://wa.me/>)",B2)

Great, so you're already creating the link for this contact.

Step 3: Apply the CONCAT to all of Column B

Your CONCAT only applies to B2. You'll want the same formula to run through all cells as the sheet grows. Use an open ended range so the CONCAT can capture the entire column:

=CONCAT("[<https://wa.me/>](<https://wa.me/>)",B2:B)

Step 4: Generate link dynamically

Your formula is only in C2, but you'll want it to expand down down Column C as new entries are added.

ARRAYFORMULA allows you to enter a formula in just one cell and have it apply to an array of cells. Use that to make Column C auto-populate with the same formula.

=ARRAYFORMULA(CONCAT("<https://wa.me/>",B2:B))

Almost perfect.

Step 4: Stop the ARRAYFORMULA from creating useless content

If there is no phone number, you don't want to create a link.

Use an IF statement so the formula skips the CONCAT step if no number exists.

=ARRAYFORMULA(IF(B2:B=0,,CONCAT("<https://wa.me/>",B2:B)))

Done! New WhatsApp links will auto-generate anytime new rows are added to your sheet.

I've included screenshots and some additional notes here.

The all-in-one writing platform.

Write, publish everywhere, see what works, and become a better writer - all in one place.

Trusted by 80,000+ writers