Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
marketing socialmarketing email iap #marketing
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
marketing socialmarketing email iap #marketing
About this forum
  1. Marketing
  2. Forum

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

Naroči se

Get notified when there's activity on this post

This question has been flagged
actionsurveyservermarketingautomation
4 Odgovori
5394 Prikazi
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
Opusti
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
Opusti
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
Opusti
Avatar
Micheal KARL
Best Answer

Hi, have you found a solution for that?

Best regards, michael 

0
Avatar
Opusti
Avatar
Jules
Best Answer

Hello, 

I'm also looking to do this. 

Have you found the solution?

Thanks

0
Avatar
Opusti
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!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Send emails with automated action when a purchase request is created, odoo 13 community Solved
action mail server automation
Avatar
Avatar
1
mar. 24
2922
Trigger on lead automation - marketing.campaign module
action marketing lead automation
Avatar
1
jun. 22
5942
Double Opt-in - Marketing automation
marketing automation
Avatar
0
maj 25
1629
Marketing Automation
marketing automation
Avatar
1
feb. 25
8184
difference between server actions and client actions in Odoo? Solved
action server
Avatar
Avatar
Avatar
Avatar
3
jun. 23
13570
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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