Can I put a stackdriver label metric in a email notification? - google-cloud-platform

I have a metric on Stackdriver, which filter my application logs. When a log pass by this filter, I want to send this logs by email, to fast act on this.
I created a policy in Stackdriver, added the metric and the label(which contains the information that I need) to the policy condition and added the email to notification chanels. But I receive emails with defaults title and body, not distinguing by label's metric type.
Is there any way to modify this email, adding the content of the label in title email?
Ps: I Tried put variables in the Documentation by this link https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars , but not working.

I do believe the email notification you a receiving have GCP’s network configuring the email header, and therefore, the subject line. You can’t alter the header information from GCP and pipe in custom information, change headers or add complex scripts, etc.
Any variables you set will only affect the body of the message and not the title.
In my test, the alert email title and subject line cannot be altered. There is a “view details” link where it will bring you to your Stackdriver alert. The pertinent information on the alert, including the variables you mentioned, is in the body only.
If you want a programmatic way to set your notifications, you can look into webhooks which can be configured in addition to your email alert. There is a Google Blog post about this.

Related

How to change the default sender id in AWS Cognito messages to verify mobile number?

I am using AWS Cognito User Pool for user sign up. I am using phone number as the attribute and I have set up verification of mobile number and enabled Multi-Factor Authentication.
I get messages from AWS and its getting verified and everything is working fine. But the sender of the message is "AXNOTICE".
I need to change "AXNOTICE" to my business id. I tried changing "Default sender ID" in "Text messaging preferences" of SNS Dashboaard but this didn't work.
Please let me know whether this is the correct place to change or do I need to change somewhere else.
Any help is appreciated.
I know this is late, but maybe useful for someone who is sending SMS where SenderId is allowed (e.g. UK):
It is possible to set a default SenderId in Simple Notification Service(SNS) which will then be used by Cognito when sending SMS.
Open SNS
Expand "Mobile" menu and click "Text Messaging (SMS)"
Scroll down to "Text messaging preferences" and click "Edit"
Set "Default sender ID"
Click "Save Changes"
Cognito will now send the SMS using the specified SenderId.
(Note, things may have changed since this question was answered it seems India does allow SenderId, but requires a reserved SenderId to be used, which is expensive ~£800/month. See https://docs.amazonaws.cn/en_us/sns/latest/dg/channels-sms-awssupport-sender-id.html
Some countries do not allow SenderId: https://docs.aws.amazon.com/sns/latest/dg/channels-sms-originating-identities-sender-ids.html )
AWS currently does not support custom sender id in some countries to find the list of countries that are supported by aws click on the below link
AWS custom sender id supported regions

Vtiger : How we have to manage Email thread on Lead Module?

We are sending email to customer from Lead module and email sent to customer successfully from Vtiger. also we have integrate Mail Manager
in Vtiger.
i can also see that email in Sent box.
now, When Customer will give reply for that mail which i have sent from Lead module that will automatically appear in Lead Module Email Tab. right now i am getting am reply in Mail Box but i need log email in Lead section with particular customer replay.
Please help me if anyone solution..
It's by default functionality which is provided by Vtiger CRM.
We have configure Mail Scanner and select folder which we have to scan.
also, we have add condition or rule for this what we have to do if we can get result while scanning.
Please check status for MailScanner in vtiger_cron_task table. it must be 1.
also we have to set vtigercron.php in cronjob.
you can also run vtigercron.php in console on server with below command
php vtigercron.php
After success full scan you can get below message
Please Let me know if you have any question.

How to strip attachments from inbound mails in Mailgun before POSTing?

Is it possible for Mailgun to POST only the non-attachment part of emails to my API, to prevent big attachments affecting the performance of the app?
Mailgun can host the attachments for you with the inbound functionality.
You can use the Events API command store(notify=”http://myapp/post”) specifying as shown the notify option, which will send a webhook to your application with a URL on message arrival.
One of the headers sent with through webhook will look something like: ["[{\"url\": \"https://api.mailgun.net/v2/domains/YOURDOMAIN/messages/ALARGESTRINGOFCHARACTERS/attachments/0\", \"content-type\": \"META/META\", \"name\": \"MYFILE.EXT\", \"size\": 74622}]"]
Then you can retrieve it and delete the stored message.
Keep in mind that stored messages are kept only for so long so you should process attachments rapidly.
This is one of the options of the routes functionality that Mailgun gives you.
Personally I love it ! Let me know if something is unclear i can dig into more details!
Best,
I am getting mail on the Mailgun which I am routing to my local server and their. I am parsing the JSON but problem is coming in case of attachments. In attachment json, it is showing the path of temporary file on mailgun server. I need to download the attachment and store it on my local machine.
My question is how to retrieve that attachment. Do we have any API for that?
To access the data from the link, you will need to specify credentials as your get parameters. The user is 'api' and the password is your mailgun's private key
Please refer to this answer that I've given here

How would I know that email has been sent or not via SendGrid in Django

I am working on django and sending emails to multiple users at once. in the given scenario it only tells me that if it has sent or not.
I want to display the report of same page that how many emails has sent to user successfully and how many not. more if i want to get details why email has failed to sent.
How would i do such things via SENDGRID APIs.
There are two options that I know of:
Connect to SendGrid Event Webhooks and start parsing events for every email to flag ones that were not sent. I believe you can configure SendGrid to only send certain events, so if you're interested in bounces you don't need to worry about handling all events.
The second option is to use a service like sendwithus which will connect to your SendGrid account on your behalf and track all bounces/opens/clicks for you and provide a simpler API/UI to view the data. I believe they do this via SendGrid's webhooks, so it's effectively the same solution but written for you.
Happy to elaborate on either, I've used both before.

OTRS 3.0: Agent notes by email - notifications

My goal is that agents can attach notes to a ticket by email.
I have set up a second mail address ticketnotes#... which is filtered by a PostMaster Filter. In this way I can set the X-OTRS-[FollowUp-]ArticleType header to note-internal and X-OTRS-[FollowUp-]SenderType to agent and the email gets attached as agent note to the ticket mentioned in the subject. That works quite well. The problem is that the subsequent notifications emails are of the type Agent::FollowUp and not Agent::AddNote. That is confusing my agents.
Can someone tell me what I'm missing here?
Followups are when a user mails an email. You will want to set the header. Set this field: X-OTRS-FollowUp-ArticleType
see the code:
ArticleType => $GetParam{'X-OTRS-FollowUp-ArticleType'},
http://tesisitil.googlecode.com/svn/trunk/trunk/otrs-2.4.5/Kernel/System/PostMaster/FollowUp.pm
see also: http://forums.otterhub.org/viewtopic.php?f=61&t=4966