VCARD download

Since most of this topic is from 2021/2002….just asking: Is their a simple/standard method to take information stored in columns and download it to a device as a VCard.

Basically a button “download VCARD” which downloads a VCF file to the local device.

PS…tried AI but didn’t get it to work (it pretended to work but didn’t download anything)

TIA

1 Like

Hi @MattLB :slight_smile:

To be honest, I haven’t reviewed past topics in detail, but what you’re asking is easily achievable by following these steps:

  1. Get a properly formatted vCard column.
    If you have different columns (such as First Name, Last Name, Phone Number etc.), you can use a Template column to concatenate all data with appropriate prefixes. Here, to simplify things, I’m using a fake vCard:

    VERSION:3.0
    N:Dupont;Jean;Michel;Dr.;PhD
    FN:Dr. Jean Michel Dupont
    NICKNAME:J-M
    ORG:ExempleCorp;Département Recherche
    TITLE:Directeur Innovation
    ROLE:Chef de projet IA
    TEL;TYPE=CELL:+33 6 12 34 56 78
    TEL;TYPE=WORK,VOICE:+33 1 23 45 67 89
    EMAIL;TYPE=INTERNET,WORK:jean.dupont@example.com
    EMAIL;TYPE=HOME:jmdupont@gmail.com
    ADR;TYPE=WORK:;;123 Rue de la Science;Paris;;75001;France
    URL:https://www.exemplecorp.com/jeandupont
    BDAY:1980-05-01
    NOTE:Fake contact for testing purposes.
    REV:20250805T090000Z
    END:VCARD
    

    Let’s store that in a column called vCard for now.

  2. Create a vCard encoded column (Encode Text), using url encoding:

  3. Create a Template column to define a Data URL (vCard link):

    Here’s the template: data:text/vcard;charset=utf-8,{{vCard}}

  4. Now, in the Layout, you just need to create an Open link action that references this last column. Here’s a screenshot with a single button, for demonstration purpose only:


When the user taps the button on a smartphone, they are prompted with a download option.
When opening the file, it’s recognized as a vCard and the user can import the contact :+1:
Tested successfully on a recent Android smartphone using Firefox, not tested in an Apple environment though :confused:


Could you give this a try and let us know if it’s what you expected?

First - thank you.

First pass on MacOS downloaded the file from the builder (after a flash). I need to check out the data payload since I got this when I opened the Vcard…but it did successfully download to my local machine which was what I was looking for.

I will keep you updated on the progress and will check on iOS and MacOS from the App not the builder.

Quick follow-on, the downloaded file is “download(n).vcf”; is their a way to use the person’s name as the name of the file instead of ‘download’?

Thanks again for your help.

Unfortunately, not to my knowledge.

It seems that in some cases, you can add a filename property but it’s unreliable and completely unofficial. Some browsers or devices might use this information to rename the file correctly, according to forums or blogs where this trick is mentioned - but there’s no straightforward way to get a compatibility list (unlike "uri" | Can I use... Support tables for HTML5, CSS3, etc for example).

To be more specific:
If the intended filename is nicolas.vcf; simply add this at the bginning or your template column:
data:text/vcard;charset=utf-8;filename=nicolas.vcf,{{vCard}}

More information can be found here:

It doesn’t work on my phone, and for the record, the downloaded file in my case was named: jeandupont BDAY_1980-05-01 Note_… vCard.vcf.

Another difference in our experiences so far! :stuck_out_tongue:

1 Like

If you dynamically create a small html file as a datauri (HTML to URL column) and open it via a web embed, you can include javascript in that html that will generate and automatically download a file with any filename you want. I use this method to dynamically create downloadable invoice PDFs as well as using it to download files with file names that differ from the file name that is actually stored.

1 Like

BTW….when I asked ChatGPT how to do this task it suggested the web Embed/javascript method.

JeffGPT !

I will try both methods and keep people up-to-date.

1 Like