Builtin_text created in content usage in action?

Dear team , assume i have builtin_text in content with variation “Alternatives” which created on UI , can i use it in action ? like this :

 const payload = await bp.cms.renderElement(
        'builtin_text',
        { text: #!builtin_text-yrBR3N },
        { botId, channel: 'web' }
      )

or should i call internal api to extract the text content?

Yes you can render a specific element in an action. You can do the following example.

function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) {
  /** Your code starts below */

  /**
   * Render Element
   * @title Render Element
   * @category Render
   * @author Botpress
   */
  const myAction = async () => {
    const payloads = await bp.cms.renderElement('!builtin_text-AEmVn7', {}, event)
    return await bp.events.replyToEvent(event, payloads)
  }

  return myAction()

  /** Your code ends here */
}

The contentType have alternative text.

Thanks its work ! I dont want to spread my questions here , but i have last question !

I read somewhere here in forum or in github issue , that i can send request header through the converse API . is that correct ? could i have access to it through my actions or through dialogs ?

I spend hours searching to recall where if found it , but i can’t :frowning: !

Hello @m7mdcc , I think it could be a good idea to create a new question on the forum. What are you trying to achieve ? I’m not sure if I understand correctly.