Skip to content

Pasar variables de modulo js a portapapeles #2017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Dinasty0 opened this issue May 20, 2025 · 0 comments
Open

Pasar variables de modulo js a portapapeles #2017

Dinasty0 opened this issue May 20, 2025 · 0 comments

Comments

@Dinasty0
Copy link

const imp = automaRefData('variables', 'imp');
const clics = automaRefData('variables', 'clics');
const ctr = automaRefData('variables', 'ctr');
let anun = automaRefData('variables', 'anun');

// Construye el texto final usando template literals (plantillas de cadena)
const textoFinal = `D. Ignacio Rodríguez Morales, Director de Negocio Digital de IDEAL.ES, certifica que el anunciante [${anun}] , ha publicado en IDEAL.ES en el periodo comprendido entre FECHA_INI - FECHA_FIN, según las condiciones acordadas en el contrato.

La campaña ha servido {{variables.imp}} impresiones, con ${clics} clics y un CTR medio de ${ctr}.`;

// Guarda el texto final en una variable de Automa para que otros módulos puedan usarla
automaSetVariable('textoCertificado', textoFinal);
automaNextBlock({ variables: 'textoCertificado' }, { nextBlockId: '0v9a2n0' })

actualmente nose como puedo hacer para que el texto se auto rellene con las variables puestas en "textoFinal" y el resultado se mande al portapapeles con su módulo correspondiente.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant