<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using webhooks, how can I get the email address of a contact that was deleted in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Using-webhooks-how-can-I-get-the-email-address-of-a-contact-that/m-p/252962#M22382</link>
    <description>&lt;P class="p1"&gt;Hi there,&lt;/P&gt;&lt;P class="p1"&gt;This is a tough problem because it doesn't seem like it is possible for us to pass the email of a contact when it is deleted via a subscription of the Webhook API. &lt;A href="https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview" target="_blank" rel="noopener"&gt;&lt;SPAN class="s1"&gt;https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;A possible workaround I could think of is to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a custom property such as "To be deleted"&lt;/LI&gt;&lt;LI&gt;Have users in the portal set a value such as 'True' for this property when they are about to have a contact deleted&lt;/LI&gt;&lt;LI&gt;Once they have this value set, they can then go ahead to delete this contact&lt;/LI&gt;&lt;LI&gt;On the side, when we the property is being set to 'True' we can set up a workflow to take an action of POST-ing to a set webhook&lt;/LI&gt;&lt;LI&gt;This will allow you to receive information about the deleted contact externally&lt;/LI&gt;&lt;/OL&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;All said, this workaround requires modification in a user's workflow processes - which can sometimes be really hard. However, it might be one of the few ways whereby we can get this information collected without too much backend jobs running.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;The alternative is to find a way to regularly grab all the contact's information into an external DB, and do a match back of the VID when we receive notification of deletion. However, as you may have already figured, that ain't the most elegant implementation either. And that's really just because we have to workaround the limitations of the current workflow API. I hope that helps.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Feb 2019 07:35:37 GMT</pubDate>
    <dc:creator>hot_z</dc:creator>
    <dc:date>2019-02-14T07:35:37Z</dc:date>
    <item>
      <title>Using webhooks, how can I get the email address of a contact that was deleted</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Using-webhooks-how-can-I-get-the-email-address-of-a-contact-that/m-p/252910#M22369</link>
      <description>&lt;P&gt;I am using webhooks to post data back to our application whenever a contact is deleted. We are trying to store the email addresses of deleted contacts in our database so we can create a report of deleted contacts. I was assuming that the webhook would send the email address of the contact that was deleted. Unfortunately it looks like it just sends the vid of the deleted contact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Querying for the vid using the &lt;A href="https://developers.hubspot.com/docs/methods/contacts/get_contact" target="_blank" rel="noopener"&gt;Contacts API&lt;/A&gt; returns an error saying "&lt;SPAN&gt;contact does not exist" so we can't get the email address that way.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can we get the email address (along with the name) of the deleted contact?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I did notice that an eventId was returned but querying for the eventId using the &lt;A href="https://developers.hubspot.com/docs/methods/events/get_event_by_id" target="_blank" rel="noopener"&gt;Events API&lt;/A&gt; returns a 404. The other identifiers returned (subscriptionId, portalId, appId) don't seem to be helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 22:38:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Using-webhooks-how-can-I-get-the-email-address-of-a-contact-that/m-p/252910#M22369</guid>
      <dc:creator>akeller84</dc:creator>
      <dc:date>2019-02-13T22:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using webhooks, how can I get the email address of a contact that was deleted</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Using-webhooks-how-can-I-get-the-email-address-of-a-contact-that/m-p/252962#M22382</link>
      <description>&lt;P class="p1"&gt;Hi there,&lt;/P&gt;&lt;P class="p1"&gt;This is a tough problem because it doesn't seem like it is possible for us to pass the email of a contact when it is deleted via a subscription of the Webhook API. &lt;A href="https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview" target="_blank" rel="noopener"&gt;&lt;SPAN class="s1"&gt;https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;A possible workaround I could think of is to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a custom property such as "To be deleted"&lt;/LI&gt;&lt;LI&gt;Have users in the portal set a value such as 'True' for this property when they are about to have a contact deleted&lt;/LI&gt;&lt;LI&gt;Once they have this value set, they can then go ahead to delete this contact&lt;/LI&gt;&lt;LI&gt;On the side, when we the property is being set to 'True' we can set up a workflow to take an action of POST-ing to a set webhook&lt;/LI&gt;&lt;LI&gt;This will allow you to receive information about the deleted contact externally&lt;/LI&gt;&lt;/OL&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;All said, this workaround requires modification in a user's workflow processes - which can sometimes be really hard. However, it might be one of the few ways whereby we can get this information collected without too much backend jobs running.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;The alternative is to find a way to regularly grab all the contact's information into an external DB, and do a match back of the VID when we receive notification of deletion. However, as you may have already figured, that ain't the most elegant implementation either. And that's really just because we have to workaround the limitations of the current workflow API. I hope that helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 07:35:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Using-webhooks-how-can-I-get-the-email-address-of-a-contact-that/m-p/252962#M22382</guid>
      <dc:creator>hot_z</dc:creator>
      <dc:date>2019-02-14T07:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using webhooks, how can I get the email address of a contact that was deleted</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Using-webhooks-how-can-I-get-the-email-address-of-a-contact-that/m-p/252967#M22383</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/86545"&gt;@akeller84&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We had a similar scenario for one of our clients - they wanted to know which Contacts were being deleted and why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We added an Action to a CRM Extension (we had previously built for them).&amp;nbsp;The Action moved the Contact to a "Archive or Delete List" and the person performing the Action chose Delete or Archive and a filled in a reason why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, once a month, the administrator deletes everyone on the list (because you can't Delete from a Workflow) or Archives (opt out) so they remain in the CRM for archival reasons but don't count against the Contact Count.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 08:48:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Using-webhooks-how-can-I-get-the-email-address-of-a-contact-that/m-p/252967#M22383</guid>
      <dc:creator>Mike_Eastwood</dc:creator>
      <dc:date>2019-02-14T08:48:36Z</dc:date>
    </item>
  </channel>
</rss>

