Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
marketing socialmarketing email iap #marketing
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
marketing socialmarketing email iap #marketing
About this forum
  1. Marketing
  2. Fòrum

How to send invitation e-mail to a survey in marketing automation

Subscriure's

Get notified when there's activity on this post

This question has been flagged
actionsurveyservermarketingautomation
4 Respostes
5344 Vistes
Avatar
Dominik Jenzer

When you share (button) a survey, you get an email template where you can add a recipient (eg customer).


Can anyone guide me creating a server action that does this within a marketing automation activity? I think, the server action has to do two thints:

1. Set the recipient

2. Send the email


Thanks for support

0
Avatar
Descartar
Avatar
Gracious Joseph
Best Answer

To send a survey invitation email automatically within a Marketing Automation Activity in Odoo, you can use a Server Action to generate and send the survey email. Below is a step-by-step guide on how to achieve this:

1. Prerequisites

  • Ensure the Surveys module is installed.
  • Create or have an existing survey ready to send.
  • Make sure you have a working email setup configured in Settings > Email.

2. Create an Email Template

  1. Navigate to Email Templates:
    • Go to Settings > Technical > Email > Templates.
    • Click Create to design a new email template for your survey.
  2. Set the Template Details:
    • Name: Enter a meaningful name (e.g., "Survey Invitation").
    • Model: Choose the relevant model (e.g., "Contact" or "Survey").
    • Body: Design the email body and include the survey link. You can use placeholders for dynamic fields:
      Hello ${object.name},
      
      We invite you to participate in our survey. Please click the link below:
      
      ${object.response_url}
      
      Thank you!
      
    • Save the template.

3. Create the Server Action

  1. Navigate to Server Actions:
    • Go to Settings > Technical > Automation > Server Actions.
    • Click Create to define a new server action.
  2. Configure the Action:
    • Name: Enter a descriptive name (e.g., "Send Survey Invitation").
    • Model: Select the model where the server action will run (e.g., "Survey", "Contact", or "Lead").
    • Action To Do: Choose Execute Python Code.
  3. Add Python Code: Use the following Python script to send the survey email dynamically:
    template_id = env.ref('your_module_name.email_template_survey_invitation')
    if template_id:
        for record in records:
            template_id.send_mail(record.id, force_send=True)
    
    • Replace your_module_name.email_template_survey_invitation with the technical name of the email template created in Step 2.

4. Add the Server Action to Marketing Automation

  1. Create or Edit a Campaign:
    • Go to Marketing > Automation.
    • Create a new campaign or open an existing one.
  2. Add an Activity:
    • Add an activity that triggers the server action. For example:
      • Trigger Type: Email Sent, Record Creation, or Specific Time Delay.
      • Action: Select the server action created in Step 3.

5. Test the Setup

  • Trigger the marketing campaign or activity.
  • Verify that:
    • The email is sent to the recipient.
    • The survey link is included and functional.

6. Additional Notes

  • Dynamic Survey Links: If the survey is linked to a specific recipient, ensure the email template dynamically includes their response link using the response_url field.
  • Error Handling: Include logging in the server action to capture any errors:
    try:
        template_id.send_mail(record.id, force_send=True)
    except Exception as e:
        _logger.error("Error sending survey invitation: %s", e)
    

Outcome

When the marketing automation activity triggers the server action, it will dynamically send the email to the recipients with the survey link. This allows you to automate survey invitations seamlessly.

Let me know if you need further assistance!

1
Avatar
Descartar
Avatar
Pablo Lozano
Best Answer

Yes the solution in odoo 16 (17 and 18), you can create a email template in the model you need example Sales Order.
With Qweb edit the template and write: you can sustitute the object.x_studio_many2one_field_SLIMM.get_start_url() with link you have of survey.



    <a t-att-href="object.x_studio_many2one_field_SLIMM.get_start_url()" style="box-sizing:border-box;background-color: #875A7B; padding: 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">

        Survey

    </a>

And go to Technical -> Automated Actions, you push in new and action to do send by email.

0
Avatar
Descartar
Avatar
Micheal KARL
Best Answer

Hi, have you found a solution for that?

Best regards, michael 

0
Avatar
Descartar
Avatar
Jules
Best Answer

Hello, 

I'm also looking to do this. 

Have you found the solution?

Thanks

0
Avatar
Descartar
Pablo Lozano

I posted one of possible solution!

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Send emails with automated action when a purchase request is created, odoo 13 community Solved
action mail server automation
Avatar
Avatar
1
de març 24
2870
Trigger on lead automation - marketing.campaign module
action marketing lead automation
Avatar
1
de juny 22
5917
Double Opt-in - Marketing automation
marketing automation
Avatar
0
de maig 25
1605
Marketing Automation
marketing automation
Avatar
1
de febr. 25
8170
difference between server actions and client actions in Odoo? Solved
action server
Avatar
Avatar
Avatar
Avatar
3
de juny 23
13459
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now