# Export to vCard

**URL:** <https://community.thunkable.com/t/export-to-vcard/1285570>\
**Category:** Questions about Thunkable X\
**Tags:** design\
**Created:** [May 15, 2021, 11:45pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570 "2021-05-15T23:45:58Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 17, 2021, 12:00pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/21 "2021-05-17T12:00:22Z")

</div>

@catsarisky  
Thank you for the confirmation about file types. I’ll check on my end to see if it works for Android too.

I saw that the names are reversed but as it is a proof of concept and didn’t bother to fix it.

Thanks again.

[Update]  
Yes, I tested the file type “text/vcard” and it works for Android too.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 17, 2021, 1:10pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/22 "2021-05-17T13:10:44Z")

</div>

HTML file required for the app

> [@film\_projector WDC #15 "Show Thunkable"](https://community.thunkable.com/t/wdc-15-show-thunkable/1283467/25):
>
> Without the “pointing out” of what was broken I would have kept trying and nothing accomplished by now. Many thanks for your prompt response. The app requires an HTML file See attached [Create-file.txt](https://community.thunkable.com/uploads/short-url/55FV8vw82yZeed1OPFA3QO1CAGq.txt) (1.9 KB)

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 17, 2021, 1:43pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/23 "2021-05-17T13:43:40Z")

</div>

Thanks for posting it!

@jim.malmberg38 , if you have questions on how to use @muneer’s work, post 'em and we’ll get you squared away. To summarize what I think you need to do:

Muneer’s prototype takes text inputs. Use his work as a model to plug in your google sheets values instead. If you want to include additional information (address, company, etc), you’ll just need to look up the VCARD standard and pass that in as well. Note that content-data needs to be url-encoded. You can see where Muneer did it for spaces (and carriage returns around the BEGIN and END text). If you expect other problem characters, you’ll need to do the same.

You’ll need to put the file he provided somewhere on the internet, with a .html ending. There are free options, including github, blogger, etc, that will let you serve an HTML file with built-in javascript. You need to update the URL in muneer’s example to point at that URL. I’d also consider adding some basic HTML content so that the user doesn’t get a blank screen in the browser.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 17, 2021, 2:04pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/24 "2021-05-17T14:04:00Z")

</div>

Many thanks for the explanation.

See a vCard sample file attached

[vcard-format.txt](https://community.thunkable.com/uploads/short-url/ev79xgtdClWDtbQSY26y1RZWWBY.txt) (909 Bytes)

---

<div class="post-metadata">

**Author:** ![jim.malmberg38](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jim.malmberg38](https://community.thunkable.com/u/jim.malmberg38)\
**Post date:** [May 18, 2021, 12:11am UTC](https://community.thunkable.com/t/export-to-vcard/1285570/25 "2021-05-18T00:11:13Z")

</div>

Sorry for the late response. I just tried this and it downloaded it. Txt file to my phone. I changed it to vcf and tried to imported but that didn’t work. What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 18, 2021, 12:51am UTC](https://community.thunkable.com/t/export-to-vcard/1285570/26 "2021-05-18T00:51:18Z")

</div>

Which version of the project are you using? And what type of phone?

You aren’t trying to install muneer’s createfile.txt as a vcf are you? (Sorry if that’s a silly question - I find it good to rule out the easy problems first.)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [May 18, 2021, 2:00am UTC](https://community.thunkable.com/t/export-to-vcard/1285570/27 "2021-05-18T02:00:38Z")

</div>

@jim.malmberg38

> [@muneer](#):
>
> I need you to test it so we can say it works on different phones.
> 
> [Export vCard](https://x.thunkable.com/projectPage/60a172a49d5e640011cd9947)

Just delete the project you previously copied and remix this one instead.

It seems the Drive-To-Web is a bit slow. I uploaded the HTML file in my Github account and updated the project to point to it.

---

<div class="post-metadata">

**Author:** ![jim.malmberg38](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jim.malmberg38](https://community.thunkable.com/u/jim.malmberg38)\
**Post date:** [May 18, 2021, 8:06pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/28 "2021-05-18T20:06:13Z")

</div>

Interesting. It took me a while to figure out what was happening with the file. The file name threw me off because it comes out something like “just\_a\_file.vcf” but it went into my address book with your name. Don’t know if that was the intent since the only thing I wrote in the text box was “test.”

Still looking through all of your and @muneer 's notes. Thank you both for your work on this!

---

<div class="post-metadata">

**Author:** ![jim.malmberg38](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jim.malmberg38](https://community.thunkable.com/u/jim.malmberg38)\
**Post date:** [May 18, 2021, 8:07pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/29 "2021-05-18T20:07:01Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![jim.malmberg38](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jim.malmberg38](https://community.thunkable.com/u/jim.malmberg38)\
**Post date:** [May 18, 2021, 8:14pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/30 "2021-05-18T20:14:17Z")

</div>

@muneer your Export VCard 3 worked great for me.

---

<div class="post-metadata">

**Author:** ![jim.malmberg38](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jim.malmberg38](https://community.thunkable.com/u/jim.malmberg38)\
**Post date:** [May 18, 2021, 8:59pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/31 "2021-05-18T20:59:05Z")

</div>

Muneer (@muneer) & Cathy (@catsarisky ),

Before I start incorporating this, I want to make sure that I understand the blocks so I’ve got a few questions.

1. In the Export to Vcard program, the user is typing out the fields. Is there any reason that I can’t set the field values based on the already populated labels on the screen in my program? Cathy, you had mentioned taking the values from the Google sheet but labels will already be filled from that data source so I was thinking they would be more efficient. Do you agree?

2. I want to make sure that I understand The CreateFile.txt use. I would take the html code in it and park it at a URL. Then I point my blocks to that URL. Is that correct?

3. With regard the the vCards themselves, I’m not seeing anything in the html code that refers to specific fields. Does that mean that it operates independently of the fields, so that I can include any fields I want as long as the vCard format is followed?

4. In the vCard file save, I see seconds since 1970. Is that just to make sure that all of the file names are unique? If so, can I replace that with the individual’s first and last names, again taken from the labels in my program?

I think that’s it for the moment.

Again I really appreciate the work that both of you have done on this!!! I’m pretty much a beginner and there is no way that would be anywhere near as far along on this without your assistance.

Thank you both!!!

Jim

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 18, 2021, 9:33pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/32 "2021-05-18T21:33:07Z")

</div>

1. There’s no reason you can’t just directly use the values from the google sheet. You /could/ set text inputs, but I don’t see a reason to let the user edit the vcard. (Maybe you do.) Muneer’s buildcard function could be adjusted to do that pretty easily, and you can add any (valid) fields to the vcard you want just by adjusting it.

2. Yes, you need to put the full contents of createfile.txt on a website somewhere, and point your blocks at that URL. Note that everything in Muneer’s example from the ? onward is the query text for that page, NOT part of the URL itself.

3. Right, the javascript (on the html page) just takes and returns whatever you pass it as content-data, so you can pass anything you want, with limits that if the phone receiving it doesn’t recognize the fields, that may not work well. 🙂

4. You can pass back the file with any name you want. I’d put a .vcf on the end to help the phone recognize it, but the name of the file is not important, and you can use whatever you want.

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 18, 2021, 9:34pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/33 "2021-05-18T21:34:13Z")

</div>

> [@jim.malmberg38](#):
>
> The file name threw me off because it comes out something like “just\_a\_file.vcf” but it went into my address book with your name. Don’t know if that was the intent since the only thing I wrote in the text box was “test.”

Sorry for any confusion - I was too lazy to type valid text in the boxes while I was playing with just getting the phone to recognize it. The final project muneer posted is the best starting point, for sure.

---

<div class="post-metadata">

**Author:** ![jim.malmberg38](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@jim.malmberg38](https://community.thunkable.com/u/jim.malmberg38)\
**Post date:** [May 18, 2021, 10:09pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/34 "2021-05-18T22:09:48Z")

</div>

Thank you! Now, I’ll start playing around with it. I’m sure that I’ll have more questions as I move along.

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [May 18, 2021, 10:10pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/35 "2021-05-18T22:10:40Z")

</div>

You know where to find us if you do! 🙂

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:22pm UTC](https://community.thunkable.com/t/export-to-vcard/1285570/36 "2024-11-08T13:22:26Z")

</div>

Closed on November 8, 2024, 1:22pm UTC



[Previous page](https://community.thunkable.com/t/export-to-vcard/1285570.md?page=1)
