Email logs only if there was an exception at any point in the run.
I only want this for a specific robot, not all robots under management console.
I know there is an option under management console, but that emails for every robot and every log.I don't want that. Thanks
Add a try step as the very first action of your robot. At the lower branch, add any action to log your error (write file, send email):
Configure each action that may fail as follows:
The special robot property Robot.executionErros will hold the relevant error message. Here's an example:
That being said, I would rather rely on Kofax RPA's logging capabilities - any error gets logged to the logging database. You can then use another robot to get those entries and email send messages. This allows you to use a single robot for sending out email notifications instead of adding above steps to each one of them.
Related
We have a CloudFormation stack that we want to provide to our clients. When they run the stack, we want to receive some output values directly, i.e. we don't want them to need them to send us the output. Our first thought was to use SNS and the notification capabilities of CF but it seems that the topic must be in the account running the template and can't be in another account. We also considered subscribing to the existing SNS topic as part of the template but that doesn't get a message sent.
We realize that CF is a resource creation tool but we think there must be a way to get the info relayed to us automatically. Doesn't have to be SNS. Any ideas on how we might be able to do this?
Update your CF script to contain a lambda and cloud watch rule which runs every 5 minutes on a cron.
Give the lambda IAM permissions to query the stack/get any output values you require.
When the lambda triggers you query the data you need and can send it to yourself however you see fit. E.g http POST to an API you own.
To finish up your lambda should call the cloud watch API to disable the cloud watch rule so this code doesn't run again.
You should consider if all this offsets the effort of saying to your client "please send us details of x y z". If you have 10 clients, probably not, if you have 1000 clients then possibly.
In our design we have something of a paradox. We have a database of projects. Each project has a status. We have a REST api to change a project from “Ready” status to “Cleanup” status. Two things must happen.
update the status in the database
send out an email to the approvers
Currently RESTful api does 1, and if that is successful, do 2.
But sometimes the email fails to send. But since (1) is already committed, it is not possible to rollback.
I don't want to send the email prior to commit, because I want to make sure the commit is successful before sending the email.
I thought about undoing step 1, but that is very hard. The status change involves adding new records to the history table, so I need to delete them. And if another person make other changes concurrently, the undo might get messed up.
So what can I do? If (2) fails, should I return “200 OK” to the client?
Seems like the best option is to return “500 Server Error” with error message that says “The project status was changed. However, sending the email to the approvers failed. Please take appropriate action.”
Perhaps I should not try to do 1 + 2 in a single operation? But that just puts the burden on the client, which is worse!
Just some random thoughts:
You can have a notification sent status flag along with a datetime of submission. When an email is successful then it flips, if not then it stays. When changes are submitted then your code iterates through ALL unsent notifications and tries to send. No idea what backend db you are suing but I believe many have the functionality to send emails as well. You could have a scheduled Job (SQL Server Agent for MSSQL) that runs hourly and tries to send if the datetime of the submission is lapsed a certain amount or starts setting off alarms if it fails as well.
If ti is that insanely important then maybe you could integrate a third party service such as sendgrid to run as a backup sending mech. That of course would be more $$ though...
Traditionally I've always separated functions like this into a backend worker process that handles this kind of administrative tasking stuff across many different applications. Some notifications get sent out every morning. Some get sent out every 15 minutes. Some are weekly summaries. If I run into a crash and burn then I light up the event log and we are (lucky/unlucky) enough to have server monitoring tools that alert us on specified application events.
Your script, Copy of Send SMS - Techawakening.org, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.
The script is used by the document Copy of Get Free SMS alerts for New Incoming Emails on Gmail - Techawakening.org.
Summary:
Error Message Count
Authorization is required to perform that action. 1024
I have received email like this
Do i have to authorize every time?
You have to (re-)authorize every time when you change the script. If you don't touch it, then the authorization will be saved and the set-up triggers run properly.
Background
Workflows and dialog processes in CRM 2011 (and CRM Online) allow us to send emails to email-enabled records (such as contacts, accounts and users). In the event that the email-enabled record does not have an email address, the process will fail with an exception (workflows remain in waiting state, dialogs throw the exception):
Unhandled Exception:
System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault,
Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]]: Object address not found on party
or party is marked as non-emailable
My scenario
In many scenarios, faulting the entire process because an email couldn't be sent is heavy-handed (equally I accept that there are many scenarios where this behaviour is desireable too). As an example, if I am creating and updating many records as part of a large workflow and simply wish to send a simple, courtesy confirmation email at the end of the process, I do not want the entire process to fail simply because this final step could not complete. I can add a simple conditional statement to my workflow to check presence of address prior to the send-email step. This works but I (or more specifically, my users) need to remember to do this for every single email step that is created.
Theoretical solutions
Ideally, I would have a child workflow that would accept an email object as input and then I'd run a little check to confirm that there is a sender and recipient before sending the email. If data is missing I could either silently fail the sub-process or invoke different logic such as email the originating user or write an error record.
Howver, given the following....
Custom workflow assemblies are still not supported in CRM Online
Workflows do not accept incoming parameters
Even dialogs don't support an "email object" as an input parameter, or an array of values (e.g. for recipients) as an input parameter
Child dialogs do not return control to the caller after completion
...I am struggling to conceive of a pattern or solution that would effectively allow me to avoid the users having to remember to put a hard-coded check in every workflow or dialog that they create (to check for the presence of a recipient email address).
Ideally I want something like a generic child-workflow that takes the email object (or a serialisation or other representation of it), makes the checks and sends the email if it can.
Over to you
I've tried to design a custom solution but it quickly gets over-engineered (plugins on system entities etc). Otherwise I can't see a way of avoiding putting the onus on the users. Has anyone else encountered a similar requirement and better still, devised a solution?
Well I can think of a pretty straight forward solution.
New field on email - "Auto Send", bit, default No
New workflow - Create of Email, If "Auto Send" == Yes && Send contains data && Recipient contains data -> Send Email in context
In all your other workflows, instead of using the "Send Email" action, use the "Create Record" action to create an email record, populate the email as normal, but also populate the "Auto Send" field.
This way users can pretty much create an email as normal, but you get to use a single workflow to perform validation logic and actually send it.
In Salesforce you can set up various workflow processes or build API apps that send email. For most standard Salesforce orgs, there is a limit of 1000 emails per day. (e.g. see here)
I can't find any info on what happens after you reach the limit.
e.g. what sort of errors occur, and are administrators automatically notified?
It'll throw an exception (I can't remember the exact message). I've gotten these from time to time and I think they can't be caught. A quick way to check would be create an anonymous block with an isFuture method that sends 10 emails inside of a loop. Call this isFuture method inside of another loop (also 10x) and you'll send 100 emails without hitting governor limits.
Of course you'll have to run your code 11x to get the email exception. This is a pretty shite way to do it, but it's better than clicking a button 1000x.