I need to send an email using a workflow, either using a template or using the workflow step>>Send Email: Create New Message.
The email must include a data field (Multiple Lines of Text) {!customEntity:Question;} which contains HTML tags. For instance:
Registration number <b>XSA-192034</b><br>
College <b>Private</b><br>
Principal player? <b>No</b>
What can I do to render the HTML tags within the Email template?
Template body looks like:
Hi {!User : Full Name;},
We received the info below from {!Contact:Full Name;}
{!customEntity:Question;}
At the moment is being shown as:
Hi John Clark,
We received the info below from Jason Smith
Registration number <b>XSA-192034</b><br>
College <b>Private</b><br>
Principal player? <b>No</b>
This will not work out of the box. You will have to get rid of your html tags if you wish to use it in Email Template or Workflow (Email).
You will have to use C# or java-scripting for this.
Look at these articles which will guide you furthure.
https://nishantrana.me/2010/03/05/converting-html-to-text-for-email-in-crm/
https://www.crmanswers.net/2013/03/converting-html-e-mail-to-plain-text.html
Related
I have developed a form using form builder in Kentico Xperience.
I am using localized strings for the titles and texts of my form components.
For example for a radio button component, I have
which consists of the following localized strings:
It works fine until the form is submitted and sent by email.
The email template is built as follow:
$$label:Participation$$: $$value:Participation$$
But I receive email like:
Participation in meeting: {$Form.Participation.Virtual$}
While I would like to receive the localized text in my email as follow:
Participation in meeting: Virtually
How can I do that? Is there a specific syntax in the email template?
The correct syntax in my email template to obtain what I am looking for is:
$$label:Participation$$: {%Participation%}
The behavior is by design. If you use a compoment with list of options and you add just a localization macro there, there is a risk that chaning the string will cause wrong values. The recommended and supported format is:
value;{$ResourceStringKey$}
I have a logic app that is being used to send emails using a SendGrid subscription. There is a unique link sent to each user. I can embed this link variable in the message text using expressions, but when the email is sent it transforms the link to plain text.
There is a "link" button that can be used to manually add a link but it only accepts plain text as the link title and target, it does not appear it can be mapped to any expressions or dynamic content.
I thought I could maybe add a placeholder link through the SendGrid Link insertion, and then find it in the corresponding json template for the app and map it to an expression but something happens when it is saved and it is transformed.
According to some test, it doesn't show same problem in my side. I received the email in outlook and in my opinion, it may be influenced by your email tool. In my side, the link was transformed to plain text only if the email is filtered into Junk Folder.
To solve this problem, you can test it in another email tool. Or you can do it like below screenshot, store the link with <a> tag in a variable and then use the variable in email body.
I have a question regarding the Embedded Sending View. Through our program, the user selects documents which are sent to the Embedded Sending View where the user then selects recipients and has the option to add fields on the documents. The documents can have automated anchor tags such as \s1\, \s2\, and so on. What we need is for the tabs, such as Sign Here or Initial, to be displayed in the add fields page of Embedded Sending, which is not happening. Templates are not an option at this time as the documents are defined by our users. I tested this in the DocuSign Console and it didn’t work there at all, no tabs came up automatically on the add fields page despite anchor tags existing on the page.
This is the document that I tested
This is a screenshot of the Embedded Sending View. There were two signature anchors in the document and two signers/recipients were created in the Embedded Sending View.
This is a screenshot of the Tagging View - The Sign Here tabs do not come in automatically.
This is a screenshot of the page to actually sign the document through the email is sent. There are no Sign Here tabs displayed.
Automated anchor tags rely on the number in the tag text matching a recipient ID in the signer's definition. In order for \s1\ and \s2\ to map to your recipients, they'll need to have recipient IDs 1 and 2.
Automated anchor tags do not work if the document is uploaded through the web console - only if the envelope is created through the API with the document and recipients defined.
The 'stock' automatic anchor tags only work through DocuSign for Salesforce. Upon closer inspection, it looks like DFS includes a set of tags in its API traffic to create an envelope.
To approximate this behavior, I created a custom anchor tag that did work. To create these tags yourself:
Navigate to Go to Admin > Document Custom Fields
Add Field
Name: Anchor Signature
Type: Sign Here (or Initial Here if desired)
Shared: Checked (makes tag available to all users on the account)
AutoPlace Text: \s{r}\
In practice, the {r} gets replaced with the recipient ID.
This tag definition:
Results in tags being placed in my example draft that I created through the API:
We have defined a template that will be filled in and signed by our customers. In this template we have some fields that we pre-populate along with some documents that we will attach. The customer will fill in other fields and attach more documents. We are using the REST API to generate the sign request. We are able to generate the correct REST request to fill the tabs in the template, set the recipients and successfully send the signature request. All this works great. But now we're trying to get a document attached to the appropriate SignerAttachmentTab in the template and we cannot get REST to accept it.
We've tried using the Documents field but that doesn't work with templates it seems. We created a composite template and then defined a document for the document, server template for the template itself and an inline template to contain the tab data we want to populate. This keeps generating errors about the tab page number not being right. We've tried different values and we've looked over all the forum posts and documentation related to attaching documents to templates and none of them seem to work.
For the document we specify the file to upload, set the document ID and name. In the server template we specify the template ID. In the inline template we create a recipient, set their information, build up the envelope tabs with the data and then add a SignerAttachmentTab for the document. In this tab we set the document ID to match the document ID from the Document element. We set the tabLabel to the label used in the template itself. We've tried setting pagenumber but that doesn't change anything. All we want is for the document to be sent to the customer. When the open it they can double click the attachment field and view the document we're trying to send.
I'm trying to use the recipe explorer to get this to work using raw REST and it keeps failing with the TAB_PAGENUMBER_IS_NOT_IN_DOCUMENT error. It seems like the document is taking precedence over the template. Unfortunately I cannot change the order of the templates in the editor other than setting the sequence # on the server and inline templates. Here's the request that is generated using DocuSign's test system.
{
"compositeTemplates":[{
"document": {
"documentBase64":"<Base64BytesHere>",
"documentId":"2",
"name":"Test.pdf"
},
"inlineTemplates":[{
"recipients":{
"signers":[{
"email":"abc#def.org",
"name":"Person",
"recipientId":"1",
"roleName":"Sender 1",
"tabs":{
"signerAttachmentTabs":[{
"documentId":"2",
"tabLabel":"MyAttachment"
}],
"textTabs":[{
"tabLabel":"someText",
"value":"Value1" }
]}
}]},
"sequence":"2"
}],
"serverTemplates":[{
"sequence":"1",
"templateId":"guid}]
}],
"emailBlurb":"A message",
"emailSubject":"Test",
"status":"sent"
}
I've looked at the existing posts in the forums and either they don't work for my case or they aren't trying to actually attach the documents to the template but simply include them as a document in addition to the template.
Update
Re:
...associate [a] document to the tab so that the signer will be able to click the attachment field in the document and see the document
Yes, you can now do this by using Smart Sections with a documentHtmlDisplaySettings object in the Envelopes:create request. The collapsed (or collapsible) section can be displayed in different ways:
inline
collapsible
collapsed
continue_button
responsive_table
responsive_table_single_column
print_only
Live examples that you can try online
HTML source document
Word source document
Original answer
Re:
But now we're trying to get a document attached to the appropriate SignerAttachmentTab in the template and we cannot get REST to accept it.
You're trying to use the API to add a document to a SignerAttachmentTab?
This is not supported. Only signers themselves add documents to a SignerAttachmentTab. The API can't do it for them.
Is the issue that you want to make sure that a signer attaches (uploads) a document to the envelope as part of the signing ceremony? You can make the tab non-optional (required). But that won't check the contents of the attached file.
You could use a web hook / Connect to check the file(s) that were attached and, if the right files weren't attached, generate another enveloper for the signer.
I figured out what I was doing wrong. For a template without attachments I was using TemplateRole and EnvelopeTabs. But for attachments, trying to include any document would cause the document to override the template. So I switched to composite template with server and inline templates for the template and data. Trying to add documents in various combinations in the various areas where they are allowed generally caused the request to be sent but with no documents.
The final solution was to go back to the original TemplateRole approach but to create the envelope as a draft. After the draft envelope was created I could then add the document to the envelope. But unfortunately to send the envelope you then have to reattach the recipients. I'm looking to clean that up but otherwise it is working for me now.
I've got an email processing agent. It copies the body of the email into a document's rich text field. If there are any embedded links in the email I want to process that embedded link and extract the url. I started playing around with MIMEEntity but nothing came of it. Any ideas?
thanks
clem
================
Hi Rich,
Well here's a more robust explanation of what's going on. I have several Notes apps which deal with email correspondence. An email comes in, a Notes document is created with some meta data (system generated ID, user's email, name, company, status, etc). The email body is added to a 'correspondence' rich text field of the created Notes doc. The app allows for someone on our side to follow up on the email (ask a question, provide some feedback, etc). That response from us is pre-pended to the original email. If the original sender responds with some further information, THAT email is also pre-pended. To do this pre-pending, I do
bodyText = EmailDoc.GetFirstItem("Body").text
textFromNotesDoc = CTdoc.GetFirstItem("Issue").text
newTextFromNotesDoc = bodyText + <some stuff> + textFromNotesDoc
I then do a replace.
This worked perfectly fine for years. However, recently users have been sending in emails containing embedded links. Of course anything like that is lost when I do the NotesDocument.GetFirstItem().Text. So I've been trying to think of a way to capture the embedded link. The other day it occurred to me that if I could read the html, I could find and extract the url and simply add it to text. I thought maybe using NotesMIMEEntity would allow me to read through the body field and find the url but that's not working.
Clem
The solution is to NOT NotesDocument.GetFirstItem().Text. Just simply take the email coming in and prepend the body field to the discussion RT field. I add tags to the email going out so that I know if the person responding included the previous conversation. That took a little work to figure out but by using NotesRichTextNavigator and related classes, I'm able to deal with that.
clem