Importing vCards using Insert from URL

The Insert from URL step is very versatile, and if you want to see some cool ways of using it, don’t miss Jason Young’s DevCon session next Tuesday at 10:45 am, right after the opening keynote.

Here’s a video preview of one of the applications Jason will be showing, where the contents of a .vcf file (vCard) are imported as new FileMaker records, including images. The video also features a demo of Dan Wheelon’s recent custom implementation of this technique in a customer’s SeedCode Complete files.


And if you missed the last preview of Jason’s work, checkout this sweet FileMaker to Dropbox integration he’ll also be diving into.

Update: Jason’s unlocked example file is now available here  =)

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode


  • Taylor

    Would anyone here by willing to help me? I am not an advanced coder, and I have 20,000 vcf files which are scattered origins, from Google Contacts, Apple, My Smart Phone, etc, some with base64 and some with contact photo url. I am having a mental breakdown trying to get all of them back into Google Contacts and showing the contact photos. Having a difficult time over here. Anyone can save me? Willing to paypal! My Skype: SMARTCHOICEWEB

    • seedcode

      Hi Taylor, As I mentioned over email, we don’t really have any insight into vcf files per see (this article was really about using FileMaker’s inset from URL feature). Were you able to make any progress here?

  • This is a great solution, but drag-and-drop only worked once for me. Am I missing something here? I tried downloading a fresh copy of your unlocked VCF db. I tried using a different user account, turning off my firewall, and rebooting. I get no response from FileMaker Pro Advanced 16 when drag-and-dropping either the Washington.vcf or my own test vCard files. I am using Sierra 10.13.2, and again, your db worked flawlessly the first time. Any suggestions?

    • seedcode

      Hi Liam, All I can suggest is that you may need to make a new record first; the script doesn’t make a new record in the contact table. But if I make a new, blank record then I can drag the Washington.vcf to it and it works just like the first time. (Tested in 10.13.3)

      Hope that helps.

      • It failed again after I created a new record first. On a possibly related note, my computer was unresponsive to mouse clicks a few times even before I tried your example. I am running a virus scan now. If the issue doesn’t resolve after that then I’ll try this on another computer (if I can figure out how to install a second copy of Filemaker with a single license). I’ll keep you posted.

        • Ok, got it working! Evidently all I needed to do was drag the vCard file/icon on top of the profile photo placeholder in your database.

          Just doing things the hard way, one day at a time…

  • paolo

    Hi and many thanks for your code.
    Before changing lines you indicated, loop was infinite.
    After changing lines it is still partially not working for me, because text data are imported but image not and the ending part of base64 image is stored as text in the notes field

    • seedcode

      I’m so glad that worked Paolo! Thanks for letting us know–and thanks for your kind words about our work.

    • seedcode

      > Using original ContactsVcard.fmp12 and applying only change 1, $sc_b64 matches the one in vcf, with the exception of first “/” character and lasts “//Z” characters.

      Perfect. That’s what I was trying to get at in change #2. Try playing with the middle math to get those characters included.

      • paolo

        Works perfectly.
        Your change #2 was correct, but if I copy and paste it from here to script step, it does not work. I’m using italian FM version. There is something does not match in language conversion. I have tried making slight changes to different part of the step content, to understand the reason (eg. field names are stored as ID, strange chars could have been inserted pasting text …) but nothing. The only chance was to rewrite the step manually and it was OK after that ! Note that change #1 have had no problem…
        Anyway … it does not impact the value of your code, so thanks again !

    • seedcode

      I assume this is with our sample vCard? Sounds like the loop is terminating (change #1) but the base64 may not be getting trimmed correctly (change #2). I’d run the script debugger into line 122 and see if the base64 being returned matches that in the vCard: you may need to change the Middle() function.

      • paolo

        Hi, yes I’m using your George Washington.vcf.
        Debugging into line 122, $sc_b64 results as only “/” character.
        Using original ContactsVcard.fmp12 and applying only change 1, $sc_b64 matches the one in vcf, with the exception of first “/” character and lasts “//Z” characters.
        Image is still not loaded, but all other fields are stored correctly.
        Hope this is understandle

  • Gordon

    Love this script, fantastic implementation. However seem to be broken by the update to FM15 and FM16. Any thoughts?

    • seedcode

      Hi Gordon, So it looks like this is related to line-endings and the following changes to the script “Import vCards [ Text ]” get this working in FM16….

      1. change the If() calc in line 116 to this: $sc_thisChar = Char(13) or $sc_thisChar = Char(10) or $sc_thisChar = Char(1000013)

      2. change the value set at line 122 to this: Middle ( Contact::VCardGlobal ; $sc_position1 -1 ; $sc_nextLine – $sc_position1 +1 )

      That gets it working with the base64 image included in our example file. If you get cards with different line endings, at least you’ll know where to make your changes. Hope that helps.

      • Gordon

        AWESOME, many thanks for the rapid response and fantastic code.

    • seedcode

      Something has changed in the way we’re looking for the end of the base64 encoded image. So the script works great for vcards without images. I’ll take a look at the image part when I get a chance. Thanks!

      • Gordon

        Understood and appreciated, the other issue to report is, IF the destination container field is stored remotely via FMS, the script will fail since the IMPORT variable will not be valid.

  • Andrew

    Hi there, this is great however unfortunately there is a slight problem with the scripting for companies. If you add a Vcard that is a company (no first or last name) the name of the company is not inserted into your company field in filemaker. Instead the company name is divided up and inserted into your first and last name fields. Hopefully that makes sense. It would be great to here how this is resolved. Thanks

  • Guillaume

    Congrats for this script,It is very interesting and well thought especially for the part “extract variables”. I would like to insert this script in a solution with 3 different tables (CONTACT, TELECOM, ADRESSES). I tried to add a step to create anew records on the linked table CONTACT_TELECOM juste after the “Make Phone Record(s): first of each “class” in the contact’s record” but I have not succeeded, Do you have a script that works with this modele ?
    Thanks for your precious help

  • How is the Demo coming? Really excited to check it out.

    • Carlo

      … You really hope the demo will come out soon…. I’ve been waiting frantically about it…

  • Carlo

    Are we ever going to see a demo file on this technique ?

  • Carlo

    Any progress on the demo ? I’m sure it would interest a lot of people 🙂

  • Carlo

    Amazing stuff ! Any idea of when/if there will be a demo file to play with ?

    • seedcode

      There WILL be a demo =) We’ve started blogging about the dropbox demo from the same DevCon session…
      …but will blog about this one as well. Just can’t say when that and the demo will get out there.

  • Really excited to see this Vcard method. Contact management is brutal.

  • Wow! this is really nice! Wondering if an example file will be shared after DevCon?

    • seedcode

      Definitely. Jason is pretty much in the tunnel getting ready for the conference but after Vegas we’ll be talking more about that file here.

Leave a Reply

Your email address will not be published. Required fields are marked *

Check out some of our other posts ...

Improved Resource Selection

We’ve made some big changes to how you filter and assign resources when editing events in DayBack. These changes will make it much easier to

Suggesting Appointment Slots

Show Available Slots that Match Multiple Criteria Schedulers often look for gaps in their schedules to find the open resources for each opportunity. But sometimes,

Introducing Draft Settings Mode

Following up on this idea that people stretch themselves when they feel a little safer, we’ve been very focused on the customization experience for DayBack

New Longer Timescales for DayBack

Resource Scheduling Swimlanes You can now extend the pivoted scheduling view in DayBack to show items by week instead of solely by day. This lets



Stay up to date with the latest news & examples from SeedCode

© 2024 SeedCode, Inc.