Processing tokens through Drupal Rules - email

I am using the Rules module to respond to specific events and send email alerts. This part of my project works fine.
My problem is I need to include some dynamic data in the email message. For this I am using Tokens but the tokens do not get processed and replaced with the neccessary text. This means the email gets delivered with tokens in the message.
Can anyone suggest how I can solve this problem either programmatically or via some configuration I am missing?

I'm using Rules for emails also and hav not encountered any issues using tokens
This is an example of the body of the email from one of my rules
New Issue --> [node:url]
Title - [node:title]
Description - [node:body]
Author - [node:author]
Priority - [node:field-issue-priority]
Category - [node:field-issue-category]
Maybe you do not have the proper format?

Related

Braze canvas - unable to receive emails

I am trying to send more than 3 requests to my braze canvas from postman, immediately one ofter other. But I am not able to receive emails for all of the requests sent. I haven't setup frequency capping and customer re-entry time is 0sec. Can anyone help?
Edit: I found the Answer for this. Looks like Braze canvas cannot be used to send email to same person in succession. Braze Campaign is appropriate in this case.
Are you able to submit your code? It should look something similar to:
{"api_key":"<api_key>",
"canvas_id":"<canvas ID>",
"recipients":[
{"external_user_id": "{{User}}",
"canvas_entry_properties":{
"<any additional entry criteria>": "<values>"}}]}
That would allow you to push a single user. If the external_user_id does not appear in your instance when searched, it may not send.
https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_triggered_canvases/#request-body
The information passed for the Canvas via the API must match up to the filters in Braze, otherwise it won't send. Make sure your API key can deploy Canvases as well.
I found the solution.Apparently, Braze campaign cannot be used to send email in succession to a single user. Switching it to Braze canvas solved the issue.

Custom tags in Jira email handler

Is there a way to make a Jire email handler ignore the From field in an email and go for a custom tag instead? I know I could work with the API instead but that's in the pipe. this is a temporary solution that will be used until a more robust system is built.
To clarify what we have today:
Email is sent to inbox, (hr#company.com)
Jira picks is up and creates an issue.
Jira looks at the From field and creates a uses if none exist.
What we're trying to achieve:
Form is filled out, and an area is chosen (hr, facilities etc.).
Form is posted to an API that creates an email (basically a no-reply adress over SMTP) and sends it to the appropriate inbox (for example hr#company.com).
Email lands in the inbox and Jira looks in it and creates an issue in project or label 'HR'.
Jira now looks in the email and finds custom tags named [user] and [user-email] (or something) and creates a user from the tag.
Example email
From: no-reply#company.com
To: hr#company.com
Subject: Some problem
Body: Explanation of problem
Have a good day!
/Mike
[user:"Michael Smith"]
[userEmail:"michael.smith#company.com"]
If we were to implement this system now, we would loose the possibility to create new users because all emails would come from the same "no-reply" adress.
I have searched in the Atlassian forums and such, but with no luck. Have not found anything in the official documentation, but I fear that I might be looking in the wrong place.
I hope that I'm being clear, and that someone has any idea if it is possible.
Thank you!
You need to write your own plugin and create your own Mailhandler.
For example you can use a regex which looks for the tag
[userEmail:"michael.smith#company.com"] and retrieve the emailadress from the string. Do the same for the [user]-tag, if the user doesn't exist.
Here is a tutorial that shows how to create and setup custom Message Handlers:
https://developer.atlassian.com/jiradev/jira-platform/guides/email/tutorial-custom-message-mail-handler-for-jira#Tutorial-Custommessage(mail)handlerforJIRA-Step7:Implementarealmessagehandlerback-end
The rest should be easy from here.

(drupal) Webform2pdf blank submitted data tokens when PDF send by mail

I run into an issue with module webform2pdf, which I am too unable to solve for a few days. I am using Commerce Kickstart as a drupal commerce module for handling all the shopping fuctionality, and we were in need to add webforms for returns policy (required by law in my country).
This form has many fields, like when you have pursached the product, what is it's serial number etc. Webform2pdf module was used for sending submitted data as PDF as attachment to email. But the received PDF by mail has blank data tokens, no matter how I try. Weird thing is, that when I hit download PDF in administration of drupal website, it just fills the data tokens right.
I have tried many tokens, all of these:
[submission:values:meno:withlabel]
[submission:values:meno]
[webform:val-meno]
[webform:meno]
%email[meno]
%email_values
%label_nl[meno]
%nl[meno]
%label_all[meno]
%label_all_nl[meno]
%all[meno]
%all_nl[meno]
[submission:values]
%value[meno]
Neither of them works, most of them simply prints token label. For example [submission:values] prints all the labels, but no data.
Upper in the mail, I have also token:
%label_all[typ_servisu]
Which prints correctly when sent via mail, but refuses to print when "download PDF" in administration. This token holds select radio buttons.
I have also tried send pdf as attachment via Rules, but with no success. I am not very experienced developer.
Any advice would be greatly appreciated. Thank you.

Expression Engine using the Champagne Extension troubleshooting

I have an issue in Expression Engine using the Champagne Extension where it won't allow me to send out campaigns. This extension utilizes https://www.campaignmonitor.com/ api to send out mass emails.
The Error I get is "HTML Content URL Required" when I try to send out campaigns form the back end of the Expression Engine Install.
What could be causing this issue that relates to the expression engine install?
This error is received anytime the URL to your html or text content is not visible. More often this is seen when someone forget to include the text version. A good way to test is to click the preview HTML/TEXT button and make sure both give you the correct results.
They cannot be blank.
For an alternative solution, be sure to checkout my add-on Postmaster. It allows clients to publish email campaigns just by creating a new entry. You can setup any number of configuration, so you can even send draft email to a test subscriber list. And since everything is within channel entries, you can use whatever fieldtypes you like, and it works with MailChimp as well as CampaignMonitor.
https://objectivehtml.com/articles/postmaster-the-definitive-email-solution-for-expressionengine

Drupal email users

I'm using Drupal 6.16: When a user creates an account on my site I have them select a category (ie children, youth, adult, etc). This is done with the select list box using the content_profile module. I have a content type that posts an announcement. In this content type is a check box that says 'email group'. Right now it does nothing, but what I would like for it to do is e-mail all the users that are associated with the group they chose when signing up for their account. If this will require extra code please be specific as I am not a strong php programmer.
Thanks for the help!!
msindle
There might be some module that do it exactly, but I don't think so.
I would have done it using few building blocks:
Retrieve the list of emails using Views - define a view that gives you the addresses according to a given group argument.
Use Rules module that will send an email notification after node is created.
Combine the two (this is the hard part) - insert the values from the view as the recipients for the email. You might be able to do it using PHP inside the Rule definition, plus view execution.
Try to accomplish it, and if you get into troubles, you are welcome to contact me via shushu.i#gmail.com
I would try http://drupal.org/project/subscriptions module + http://drupal.org/project/messaging module. You can set preferences for automatic subscribing to content type. Maybe Rules module can subscribe users automatically after creating or updating content_profile. Or maybe Rules can flag users after creating or updating content_profile and Subscription module could autosubscribe flagged users.