Event Autoresponder Emails

BC used to have a workflow email that could be setup for all forms that are submitted from an Event that could have details about the event itself included. The only thing I can find in Treepl is the actual Webform Autoresponder email which wont work as we use the one form on multiple events and each event needs their own custom autoresponder email information. Does anyone have a work around here?

We are customizing the autoresponder mail for our booking web form with the help of the formSubmissionData object. We customize the form so it also submits the event id. Then in the autoresponder code we call the event module using the event id to retrieve all kind of spezific info about the event the user has booked.

@TimL so would it work to have custom fields setup where the customer enters what they want in the webform autoresponder and inject that into it? Is that what you are doing?

Also, how do you add the event id into the webform?

@SiroccoDigital In our use case the booking form sits on the detail page of the event so if you use the form with a component code the event id would be available as {{this.parent.id}}. I made a custom field EventID in my booking form and populated it like this <input type="text" id="EventID" name="EventID" value="{{this.parent.id}}">.
On the form results page and in the autoresponder email {% component source: "Event", layout: "", filterBy: "id", filterValue: "{{ this.formSubmissionData.Fields.Custom.EventID.Value }}", limit: "1", enablePagination: "false", object: "collection", collectionVariable: "eventdetails", type: "module" %} will give you a collection with all the data sitting in the event item.
Iā€™ve also set up custom fields the customer can fill when booking an event. Their data is available on the results page and in autoresponder email via {{ this.formSubmissionData.Fields.Custom.[custom field name].Value }}.

@SiroccoDigital I can also show you through the code on Zoom quickly if you like.

@TimL I did the following setup -

  1. Add a form field called ā€˜Email Autoresponderā€™ to the Event Layouts.
  2. Add a form field called ā€˜Event IDā€™ to the webform
  3. Added the field to the webform as
    <input type="text" style="display: none;" id="EventID" name="EventID" value="{{this.parent.id}}">
  4. To the email autoresponder added
    {% component source: "Event", layout: "", filterBy: "id", filterValue: "{{this.formSubmissionData.Fields.Custom.EventID.Value}}", limit: "1", enablePagination: "false", object: "collection", collectionVariable: "eventdetails", type: "module" %}
    and
    {{this.formSubmissionData.Fields.Custom.EmailAutoresponder.Value}}
  5. To the ā€˜form-submission-resultsā€™ system page
    {% component source: ā€œEventā€, layout: ā€œā€, filterBy: ā€œidā€, filterValue: ā€œ{{this.formSubmissionData.Fields.Custom.EventID.Value}}ā€, limit: ā€œ1ā€, enablePagination: ā€œfalseā€, object: ā€œcollectionā€, collectionVariable: ā€œeventdetailsā€, type: ā€œmoduleā€ %}

It comes through blank still and I have populated content on that field. Let me know your thoughts.

Hi @SiroccoDigital. Hopefully Tim can have a look at your setup, but I think instead of that last line you posted it should just be:

{{eventdetails.EmailAutoresponder}}

To output the Event autoresponder content.

This didnā€™t work either unfortunately @Adam.Wilson.

Oh, sorry, my bad. Try:

{{eventdetails.items[0].EmailAutoresponder}}

Otherwise, Iā€™ll stay out of it and let Tim have a look :slight_smile:

Well @Adam.Wilson you did it again! That absolutely nailed it. Love your work mate :slight_smile:

2 Likes

Thanks for all your help on this @TimL it is most appreciated.

1 Like