https://discord.gg/botpress logo
Can you save the email and phone no of
# 🌎general
l
Can you save the email and phone no of users as tags?
b
what do you mean as tags, and to what end - what would you like to do with them?
l
Copy code
javascript
const userId = event.userId

const url = `https://api.botpress.cloud/v1/chat/users/${userId}`

const config = {
  method: 'put',
  url: url,
  headers: {
    accept: 'application/json',
    Authorization: 'Bearer bp_pat_ln26FIaVS9KZzVMIJn',
    'x-integration-id': '87b01760-ede8-49d5-afc6-6afc0d0d1bdb',
    'x-bot-id': 'bdfd7d9d-e20c-418a-a041-adb4ab2a9f04',
    'content-type': 'application/json'
  },
  data: {
    name: workflow.userNames
  }
}

axios(config)
  .then((response) => {
    console.log(JSON.stringify(response.data))
  })
  .catch((error) => {
    console.error('error:', error)
  })
Right here i have a code card here to update the User's Name. SImilarly i want to update the email and phone no. from the capture cards as well to the newly made tags for them to fetch them in a react app.
SO i would like to add a tag for example, email: xyz@gmail.com to a fixed UserID
d
@bumpy-butcher-41910 can you please help out here