Sends a contact form message on behalf of a logged-in user. Contact submissions are stored and visible to administrators in the feedback panel alongside problem reports.
Endpoint: FEEDBACK service
Action: sendContactForm
Request
Must be "sendContactForm".
The sender’s email address for reply purposes.
The ID of the logged-in user submitting the form.
Response
Always "success" on success.
Example
const FEEDBACK_ENDPOINT = 'https://script.google.com/macros/s/AKfycbwHTr8MSFuNio8rky8tflcErlRlAb1YSH2jmszZp77SM5e_-SVMO2pBU1UmeGOH1Aig/exec';
const response = await fetch(FEEDBACK_ENDPOINT, {
method: 'POST',
headers: { 'Content-Type': 'text/plain' },
body: JSON.stringify({
action: 'sendContactForm',
payload: {
name: 'Carlos Mejía',
email: '[email protected]',
message: '¿Cuándo van a agregar datos para vehículos eléctricos?',
userId: 7
}
}),
redirect: 'follow'
});
const result = await response.json();
if (result.status === 'success') {
console.log('Message sent successfully');
}