Answered

Delete responses automatically


Userlevel 2
Badge +2
  • Sharing wisdom
  • 18 replies

Hi,

I will send responses from Typeform via Zapier to a CRM. Due to GDPR I do not want to save personal data on several places. Is is possible to setup a time period where responses are deleted? Is thereany other way to do it automatically?

/TJ

icon

Best answer by picsoung 31 August 2021, 23:54

View original

24 replies

Userlevel 7
Badge +5

Hi @tojo Nice to hear from you again! Happy Tuesday! :grinning:

We don't have any option to automatically delete response after a certain time, but you could set something like this up on your own using our Responses API. With this, you could run the API call every so often to automatically delete the responses for you. Would something like that work? 

Userlevel 2
Badge +2

Hi,

Thanks for your response. If DELETE is available in Zapier then it is OK, but it seems that is not, unfortunately.

Userlevel 7
Badge +5

Hi @tojo I don’t think there is a delete option within Zapier, I’m afraid, even with the webhook option, but tagging @picsoung just in case they know a workaround I don’t!

Userlevel 7
Badge +5

Hey @tojo 

While Delete might not be available as a built-in Zapier Action for Typeform, you can use a Webhook block to make an API request directly to Typeform and delete the response.

Here you can find our documentation regarding delete response: https://developers.typeform.com/responses/reference/delete-responses/

Userlevel 2
Badge +2

Hi picsoung,

That could solve the problem but I don't get it to work. Can you see where the problem is?

 

Userlevel 2
Badge +2

Hi again, 

I got a little bit further. This is my first use of webhooks. I now have a correct link (I guess) according to the form and Zapier does not complain any more but nothing is deleted in Typeform. Any ideas why?

 

Userlevel 7
Badge +5

@picsoung do you happen to have any ideas?

Userlevel 7
Badge +5

You are almost there @tojo!

As explained in our API doc
the URL you need to call is of the form https://api.typeform.com/forms/{form_id}/responses

Then you need to pass a query parameter included_response_ids containing a list of response ids you want to delete.

So the url should be https://api.typeform.com/forms/{form_id}/responses?included_response_ids={RESPONSE_ID_FROM_TRIGGER}

With this you are set for success! 🎉

Userlevel 2
Badge +2

Hi again,

Thanks for your support. I get no error message any more but NO Delete. Here is the Webhook call.

What am I doing wrong?

 

Userlevel 2
Badge +2

Hi again,

The DELETE functionis for a customer project. If I succeed he may sign up for Typeform so I need to get this to work.

/TJ

Userlevel 7
Badge +5

Hey @tojo 

Looking at the URL, looks like you are calling https://770g1rnk9ds.typeform.com
instead of https://api.typeform.com

Userlevel 2
Badge +2

Hi picsoung,

I tested your suggestion but now I receive an error message

 

according to the manual it seems that it should be the URL to the form where mysite is the api.

Unique ID for the form. Find in your form URL. For example, in the URL "https://mysite.typeform.com/to/u6nXL7" the form_id is u6nXL7.

In my case it is

 

and the actual form that shall be deleted is: rclpt07cdl1s57hdcc5krclpt07tv7tk

 

I can not see the error. Have somebody else tried to use this to delete a typeform response?

/TJ

Userlevel 7
Badge +5

Hi @tojo 

Please refer to my original message or our API documentation


Where I mentioned the URL you should use.
it should be of the form https://api.typeform.com/forms/{form_id}/responses?included_response_ids={RESPONSE_ID_FROM_TRIGGER}

In your example the form_id is T10O7MNN

note there is no `/to/` in the API url.

Userlevel 2
Badge +2

But in the guide it is

form_id

, required

Unique ID for the form. Find in your form URL. For example, in the URL "https://mysite.typeform.com/to/u6nXL7" the form_id is u6nXL7.

Userlevel 7
Badge +5

Exactly, so your form is available at the URL: https://770g1rnk9ds.typeform.com/to/T10O7MNN

Right?

So the form_id is T10O7MNN

You can then replace the placeholder {form_id} in https://api.typeform.com/forms/{form_id}/responses?included_response_ids={RESPONSE_ID_FROM_TRIGGER}

by the form_id we just found, and the other place holder {RESPONSE_ID_FROM_TRIGGER} by the id of the response you want to delete. Taken from your example it should be rclpt07cdl1s57hdcc5krclpt07tv7tk 


So the final URL should be: https://api.typeform.com/forms/T10O7MNN/responses?included_response_ids=rclpt07cdl1s57hdcc5krclpt07tv7tk

 

Hope it makes sense

Userlevel 2
Badge +2

I tried your suggestion but now I get an error message in Zapier

 

I got stuck at the same point earlier, but managed to set that up with the help of one of our devs. 

You can generate a “personal token” via your Typeform profile. 

In your Zapier settings add “Authorization” in the header field and “Bearer [token]” in the value field. Replace “[token]” with the personal token you generated. 

Userlevel 2
Badge +2

Hi,

I still don’t get it right. Can you show an image of your Zapier setup for Custom Request?

Here it is. I hid my personal token, so as not to spread authentication data. That token is behind the colored bar in the image.

 

 

Userlevel 2
Badge +2

Hi,

Thank you so much. That solved my problem. Jimdo, I owe you one.

Hi Everyone,

Is there a way to set form responses to automatically delete after a period of time (like 60 or 90 days)?

Userlevel 7
Badge +5

Hi @Maritza_help Thanks for stopping by the community! I added your post here where we have the answer. 

Let us know if you have any other questions!

Hi together,

i want to be gdpr conform in germany. For that it would be great to have the possibility to automatically delete responses after e.g. 6 month.


Is there any option to set this? 

 

Best regards,
Sebastian

Userlevel 7
Badge +5

Hi @SebastianDLS I added your post here where we have the answer. 😊

Reply