Sending Email From Celigo
I would like to send an email from Celigo to our customer service (internal) Gmail account when a particular flow fails (it would purposely/correctly be failing and customer service would need to be notified). The email would need to contain specific information from the flow (i.e. patient name, payment method, etc.) that we capture in the initial webhook export. I am thinking I would not be able to do this with a simple notification in Celigo and that I would need to utilize the Gmail connector (or some email connector), but wanted to confirm if thats accurate or if there are other ways this could be accomplished.
0
Comments
Dave Guderian using an email connector like Gmail would definitely give you more flexibility since you could compose the email message to however you need. That being said, you could add the customer service email as a monitor user and then setup error notifications for that user. The email sent would include the error message which may be good enough for you. If that error message isn't good enough, you can manipulate the error message via a postSubmit script.
Thanks so much Tyler for the help on this. I did end up going with the Gmail Connector because I think long term its probably our best solution here.
I made the connection and plugged it into the flow, but have been receiving an error (below). I'm trying to determine if this is something with my mapping, or with the connection itself but haven't been able to find much documentation on it. Any help on where to look would be greatly appreciated!
Dave Guderian What's it show on the HTTP request tab? Do you see a recipient address?
Hey Steve-
Here is what I see on that tab.
What's in the body?
It appears nothing. I am trying to send a website link, but it appears its not rendering here.
Dave Guderian do you have a mapping made for this?
Sure, see below. Also note that CC info and SSN are test data (just wanted to call that out!). I would like the view link to be in the email and it would be different for each instance. After doing some reading, it looked like I may need to use the base64Decode handlebar potentially????
Dave Guderian it's a bit tricky because you have to format the raw field with text that conforms to RFC 2822, but it can be done.
You're flow could look something like this. Notice there is a response mapping on the step fails and it maps in the error data to the record. Additionally, we've specified for the record to proceed to the next step even if there is an error.
On the gmail step, I set this up like this.
On the mapping step, you need to keep the fields as I have them because the next step is to formulate the HTTP body and it requires these mappings to be in place. I set it up like this so you would only need to modify the mappings and not touch the HTTP request body. For this, use the mapping handlebar expressions below and change your to and from email and subject of course.
Date mapping handlebar:
Message ID mapping handlebar:
Message handlebar. You would change this to what you need.
Finally, add this handlebar expression to your request body.
Example output:
Tyler - As always this is an EXCELLENT explanation and I am going to give this a shot today.
One question that I did have (since this is seems to be pretty complicated) is if this is how the gmail connector is intended to be used? Is what you describe above the "standard" protocol (i.e. anytime this connector is used similar steps would need to be done for this connector), or am I trying to use this connector in a more complicated fashion and not necessarily how its intended to be used?
Dave Guderian we definitely could improve the UI for this specific use case. It's just a bit complex given that the body has to be an encoded string and within a specific format to follow the standard email protocol.
Dave Guderian I modified this flow a bit to add some more functionality. Instead of using the handlebar expressions in the body, I ended up converting it to a postMap script so that I could add some validation and notify users if they don't have all the required mappings. Additionally, I made it so the message field can have HTML in it so that your emails can be more than just plain ole text. So if you use this, the mappings are the same as I have above, but you need to remove the handlebars from the HTTP request body, then add this postMap script to the step.
Please sign in to leave a comment.