# How to add email to my pod?

**URL:** <https://forum.solidproject.org/t/how-to-add-email-to-my-pod/4165>\
**Category:** General Discussion\
**Created:** [April 1, 2021, 6:25am UTC](https://forum.solidproject.org/t/how-to-add-email-to-my-pod/4165 "2021-04-01T06:25:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wenjingli-qa](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/wenjingli-qa/32/2401_2.png) [@wenjingli-qa](https://forum.solidproject.org/u/wenjingli-qa)\
**Post date:** [April 1, 2021, 6:25am UTC](https://forum.solidproject.org/t/how-to-add-email-to-my-pod/4165/1 "2021-04-01T06:25:32Z")

</div>

i read the tutorial [https://docs.inrupt.com/developer-tools/javascript/client-libraries/tutorial/getting-started-part2/](https://writedata)  
,try to add email to my pod,but addStringNoLocale not useful to add email  
has an error when i run

```auto
Uncaught (in promise) TypeError: Cannot read property 'value' of undefined
    at internal_toIriString (interfaces.internal.mjs:27)
    at internal_isValidUrl (datatypes.mjs:300)
    at addTerm (add.mjs:219)
    at addLiteral (add.mjs:201)
    at addLiteralOfType (add.mjs:229)
    at addStringNoLocale (add.mjs:167)
    at createCard (index.js:99)
    at HTMLButtonElement.buttonCreatecard.onclick (index.js:193)
internal_toIriString @ interfaces.internal.mjs:27
internal_isValidUrl @ datatypes.mjs:300
addTerm @ add.mjs:219
addLiteral @ add.mjs:201
addLiteralOfType @ add.mjs:229
addStringNoLocale @ add.mjs:167
createCard @ index.js:99
buttonCreatecard.onclick @ index.js:193

```

Are there any way to add the email to my pod?

```auto
async function createCard(){
    labelCreatecardStatus.textContent = "";
    const podUrl1 = document.getElementById("PodURL1").value;
    //add a link to this resource in my profile that applications can follow.
    const cardListUrl = `${podUrl1}/getting-started/cardList/myCard`;
    // Add email to the Dataset
    let cardemail = document.getElementById("cardemail").value;
   
    let myCardList = createSolidDataset();
    let cardinfo = createThing({name:"CardID"});

    cardinfo = addStringNoLocale(cardinfo, SCHEMA_INRUPT_EXT.email, cardemail);

```

---

<div class="post-metadata">

**Author:** ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.solidproject.org/u/Vincent)\
**Post date:** [April 1, 2021, 10:21am UTC](https://forum.solidproject.org/t/how-to-add-email-to-my-pod/4165/2 "2021-04-01T10:21:59Z")

</div>

Hi @wenjingli-qa, it looks like `@inrupt/vocab-common-rdf` does not include a constant for `schema:email`.

An alternative is to just use the URL directly, e.g. like this:

```auto
    cardinfo = addStringNoLocale(cardinfo, "http://schema.org/email", cardemail);

```

Another alternative is to import it from a package that does include all [Schema.org](http://Schema.org) terms, such as [rdf-namespaces](https://www.npmjs.com/package/rdf-namespaces):

```auto
import { schema } from "rdf-namespaces";

// ...later
    cardinfo = addStringNoLocale(cardinfo, schema.email, cardemail);

```

I’m currently not sure if there’s a way to request additional constants to be added to `@inrupt/vocab-common-rdf`, but I’ll ask around.

---

<div class="post-metadata">

**Author:** ![pmcb55](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/pmcb55/32/1256_2.png) [@pmcb55](https://forum.solidproject.org/u/pmcb55)\
**Post date:** [April 1, 2021, 3:13pm UTC](https://forum.solidproject.org/t/how-to-add-email-to-my-pod/4165/3 "2021-04-01T15:13:23Z")

</div>

Hi @wenjingli-qa - yes, `@inrupt/vocab-common-rdf` very deliberately does not include all the terms from [Schema.org](http://Schema.org), because there are over 2,500 of them now!  
So Inrupt’s common RDF vocab module cherry-picks terms from [Schema.org](http://Schema.org), terms that we think are ‘the most useful Terms to most people’, and we plan to add to that cherry-picked list based on our own usage, and of course, general feedback - i.e., precisely the kind of feedback you’re providing here 🙂 !  
That’s why the classname we expose in our module is `SCHEMA_INRUPT_EXT`, and not just `SCHEMA`, i.e., it’s Inrupt’s interpretation of the most useful terms, and it also extends [Schema.org](http://Schema.org) in that it also provides various translations (e.g., into French, German, Italian, etc.) for the labels and comments of the terms we’ve cherry-picked (a contribution we’ve already discussed with the [Schema.org](http://Schema.org) folks, and they’ll be happy to accept).  
So I’ve already added `schema:email` to our cherry-picked list, and I can do a new release later - but before I do, are there any other terms from [Schema.org](http://Schema.org) that you might like added…?

---

<div class="post-metadata">

**Author:** ![pmcb55](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/pmcb55/32/1256_2.png) [@pmcb55](https://forum.solidproject.org/u/pmcb55)\
**Post date:** [April 1, 2021, 3:25pm UTC](https://forum.solidproject.org/t/how-to-add-email-to-my-pod/4165/4 "2021-04-01T15:25:57Z")

</div>

Oh, and actually, `@inrupt/vocab-common-rdf` already provides a convenient workaround for your use-case that you can use straightaway - rather than hard-coding the full string, you can use `SCHEMA_INRUPT_EXT.NS("email")`. At least that way to don’t have to hard-code the namespace part of the IRI (although you do have the nasty hard-coded string for the `email` part - hence this being a workaround!).

---

<div class="post-metadata">

**Author:** ![pmcb55](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/pmcb55/32/1256_2.png) [@pmcb55](https://forum.solidproject.org/u/pmcb55)\
**Post date:** [April 5, 2021, 10:18pm UTC](https://forum.solidproject.org/t/how-to-add-email-to-my-pod/4165/5 "2021-04-05T22:18:39Z")

</div>

Hi @wenjingli-qa - just to update you, and hopefully close this out, I released an update to `@inrupt/vocab-common-rdf` (to version 0.7.4) that now includes [Schema.org](http://Schema.org)’s `email` term. Thanks again for the feedback!

---

<div class="post-metadata">

**Author:** ![wenjingli-qa](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/wenjingli-qa/32/2401_2.png) [@wenjingli-qa](https://forum.solidproject.org/u/wenjingli-qa)\
**Post date:** [April 6, 2021, 3:41am UTC](https://forum.solidproject.org/t/how-to-add-email-to-my-pod/4165/6 "2021-04-06T03:41:50Z")

</div>

Thank you so much! It has been worked after updating @inrupt/vocab-common-rdf to latest version. thx for your help~
