Email ID for the same email changes? - gmail

I'm facing an issue lately that the id of an email changes.
I have an application that search the mail box on an hourly basis and I store the email id in order to prevent processing of the same email twice (the scans overlap hence I see the same emails more than once).
Any idea what can cause this change?

I understand you mean Google's ID which is returned by the API like with this example code; https://developers.google.com/gmail/api/v1/reference/users/messages/list#try-it
That ID of a message doesn't change by itself.
If one moves the email out of the account, and back in (via IMAP), then it would get a new ID.
Also, if you check the same email but in a different Gmail account, the ID will be different. the ID is unique only per account.
Perhaps it is useful for you to use the message-id? The message-id uniquely identifies any email, this ID is in the email header generated by the sending server and does not change. You can search for it in Gmail with rfc822msgid:
Hope this answers your question, but also let us know if not. ^^

Related

DocuSign RecipientId changed by DocuSign - Effective way for mapping recipients in webhook responses?

When using the DocuSign REST API, I assign a numeric value to each recipient in my envelope, starting from 1, 2, 3 etc.
However, when I receive DocuSign webhook events, within the RecipientStatuses section in the DS payload, the 'RecipientId' is now a GUID (generated by DocuSign). This Id means nothing to me, and so I can't use my originally assigned Recipient Id to map from the DS response to the relevant recipient in my system.
I'm not sure I can rely 100% on Name & Email for the mapping.
So, I thought I'd make use of the 'CustomFields' section against each recipient, as that seems comes back in the webhook payload unchanged. However, I've done some more testing and found a scenario where this logic falls down.
If my recipient happens to reassign to another user (upon visiting the signing ceremony), whilst I do receive a webhook event containing the updated RecipientStatuses (which now shows the original recipient as 'Completed' and a NEW recipient - the one that it was reassigned TO), the custom field that I'd assigned is moved out from my original recipient and into the NEW recipient - so if I was to use that custom field value as my approach to mapping, I would now have a recipient in my system with that custom field value that does not correspond with the recipient sent in the webhook payload.
I would use the list envelope recipients method to determine the mappings from my RecipientId to DocuSigns auto generated (Guid) RecipientId, but with the API limits, I can't make that call every time I receive a webhook event to get the latest recipient mapping data.
Has anyone come up against this issue, or implemented an alternative solution for this?
Good question. For now, I'd suggest that you record the triplet of {name, email, guid} where guid is a unique guid value that you assign to a recipient customField (as you're doing now).
This should then let you keep track of the recipients, including detecting the case of a recipient forwarding to another person that you discuss in your question.
But I also am puzzled by your statement that the {name, email} pair are not enough for identifying a given recipient. As it happens, DocuSign itself assumes {name, email} is a unique pair per person for various flows in the system.
Lastly, remember to test the case where the recipient changes their name. This can be done when a signing recipient first "adopts" a signature. Eg, they might change their name from an initial "Bob Smith" to their legal name of "Robert Smith" in preparation for signing your document.
Re: API limits -- as long as you're using Connect webhooks (and not polling), upgrading your API limit is usually not too hard. Discuss with your DocuSign customer support contacts or account manager.

DocuSign - How to get a URL that lasts longer than a few minutes?

I am using the DocuSign REST Api and noticed that the lifetime of a URL obtained using the EnvelopeViews API (https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient) is only a few minutes. However, I have gotten emails in the past with DocuSign links. How are these links able to be added to an email (and therefore have a longer lifetime)?
Is there a separate API that can be used to get a longer-life link like the one in the email?
For example, here is an email that has a Review Document DocuSign link:
Good question. Here's what you can do.
Your application wants to let Larry sign a document using the
EnvelopeViews::createRecipient API call.
Your application should store the details needed for the API call in your app's database. Something like: envelopeId, signerEmail, clientUserId.
Create a guid for the database record and add it to the database record.
Now you can look up the database record via either the row's key or
via the guid. Ensure that the guid database column is indexed.
Now create a signing url that you will send to Larry. Something like:
https://myapplication.example.com/docusign-ceremony/[guid]
Send the url to Larry
When Larry clicks on the URL:
Your app is invoked
Look up the guid in the url in your database. You should find the
record that you stored there.
Retrieve all of the record's info: envelopeId, signerEmail,
clientUserId.
Call the EnvelopeViews::createRecipient API call with the data
and get back the signing ceremony url (that must be used within
5 minutes)
Redirect the user's browser to the url.
They'll sign the document(s) and then be re-directed back to your
application.
Done.
And guess what? This is pretty much what DocuSign does itself.
The response from Larry K above is correct, you would need to handle this on your side.
These are all the parameters that you can send as part of the request body for the POST {vx}/accounts/{accountid}/envelopes/{envelopeid}/views/recipient API endpoint and there are no options to set the expiration time for the recipient view that you create.
You could look into using PowerForms to see if they fit your needs. With PowerForms you can create a URL that users can click and it will allow them to fill out a specific DocuSign envelope. This might not fit your needs if you need to pre-fill some of the fields with information related to the specific recipient but it might be worth looking at.
PowerForms Documentation:
https://www.docusign.com/features-and-benefits/features/powerforms
Please correct me if I'm wrong but I think that your goal is creating the recipient view URL, creating an email formatted in a specific way and sending that email to the recipients.
If you use the branding feature you could specify the format for your email (if you want to use a specific message) and just send the envelope to your recipients. Once the recipients receive the email they'll see the message in the format that you specified and the link for accessing the envelope would be a regular DocuSign link that doesn't expire.
The link below shows how to create Brands in your account. Specifically signing brands would allow you to set the email content.
If you have multiple email formats you could create multiple brands and just specify the brandId when creating the envelope.
I hope this helps.
Branding:
https://support.docusign.com/guides/ndse-admin-guide-configure-branding

Editing Signature Request email in resource file

I opened a ticket with DocuSign enterprise support and was instructed to post my issue to StackOverflow.
We are working on a new feature for a client in our demo account and would like to know how to override the content of the Signature Request email that is sent to a signer recipient when an envelope is created from a template. See the attached screenshot—we would like to change the name and email address that appear in the body of the email. Currently, it shows the main account holder’s information. I have looked through our Email resource XML and do not see an element that pertains to this email.
According to the Resource File guide, it seems like I might be looking for a <data name=”DigitalSignaturesPending_HtmlBody”> element. However, I do not see one in the resource file. I see elements for editing other emails that go to recipients, but not this email. Therefore, I cannot remove the desired fields. I appreciate any help. Thank you.
If the goal is to hide the sender's icon, name and email, you can do so in the Signing Resource File: Change DocuSign_HideIntroductionSenderProfileImage = True and DocuSig
n_HideIntroductionSender = True
If you want to change what appears in that block, check the Email Resource File. Look for lines that start with [[Conditional:ShowIntroductionSender]] and contain [[Data:SenderName]] and [[Data:SenderEmail]] and edit those accordingly. Note that you can only hard-code a name and email so that all notifications sent with that Brand will show the same data.
You will probably need to make several changes, as there are many notification types.
If you want to change who owns the envelope, consider setting up an Envelope Transfer Rule that fires Prior to First Send. You can have envelopes sent from your account transfer to a generic/faceless user, so all notifications will have that profile on them. Note that you may want to set up Envelope Sharing so that sending users can still view envelopes they've sent.

Gmail Message Unique Identity

What is a unique identity corresponding to a gmail message?
X-GM-MSGID 1462906561521916648
or
Message-ID that you get in headers of a mail
Which of them is permanent? Are they unique for a user and identify a message uniquely for a user or are they unique for a user only and two users with same/different message can have the same messageid?
Thanks
Message-ID is a unique identifier for a digital message, most commonly a globally unique identifier used in email and Usenet newsgroups.
I'd go with that, as it's independent of GMail, guaranteed to be unique, well documented, and used since the dawn of time.
Further: Google commented that X-GM-MSGID could theoretically change.

How to respond to duplicate e-mail address during registration

I have a registration form in my website. I don't want to give away information about the existence of an e-mail address for security reasons. How should we, security wise, handle the "e-mail already exist" scenario without giving this information away?
Theoretically, its impossible, think about the email as the user name, you will inform the user that the user name is already reserved or taken, the same applies for the email address.
You can let the user enter his email twice by typing to ensure that he didn't enter other email by mistake, how ever, if the user entered his email wrongly twice, then, its his problem!
On the other hand, you won't send the confirmation email for already confirmed users, also for emails that are not stored at your side, you need to put this message in your confirmation emails:
If you are not {First Name + Last Name} then please ignore this email or something similar.
I hope this will help.
You could make it so the user can create an account / sign in with openid/google/facebook/yahoo. That way those sites hand the auth and if they can log in successfully through those you can collect any additional information you need.
You could alternatively have them create an account by first only providing an email. You would email the user with a link where they could continue the registration process if they don't already have an account. If an account is already created you can send an email saying something like: a request was made to create an account using this email address, but an account already exists. If this wasn't you then....

Resources