How to delete contact and email and event and Task?

Hi All

I am face with all similar issue on delete contact and gmail and calendar and task.

I notice that below google tools :-
contact , email , task , calendar , all have Operation like Create , Delete , update , etc

if i need to delete record at contacts database.
Take for example ,

i need to delete John Demo record from contacts database.
I need to delete all email received today
I need to delete all today event at calendar’

I get error msg when delete contact :

To delete the contact “John Demo,” I need the specific Contact ID associated with that contact. Please provide the Contact ID, or let me know if you need assistance in finding it.

I get error msg when delete Gmail :

Please provide me with the Message ID of the email you would like to delete from today.

I also get error msg when try to delete Event calendar :

Please provide me with the Event ID of the calendar event you want to delete today.

Can some one share with me how to provide contact ID to AI ?

Remark :-
I have search the community i unable find solutioin,
I don’t have issue on Create but i have problem on delete.
Credential no issue , since i can perform Create operation.

I have try to drag the query to ID field , still not work , see below image :

Paul

Hi @Paul_Yeo

Gemini isn’t very adept at handling agents without clear instructions.

You need to explicitly prompt it by explaining what actions it should take.

For example, tell it that it has access to Gmail search and delete tools and instruct it accordingly.

Please try that and see if it resolves your issue…

1 Like

@mohamed3nan Thank you for your very detail explanation , appreciate it very much. I have try create email and calendar search and delete workflow. it work fine.

As for Contacts , i still unable to get the search work.

search how many contacts with last name “Demo”
It seems there’s an issue retrieving the contacts. Unfortunately, I’m unable to access the contact information at the moment. If you’d like, I can try again or assist you with something else.

Search how many contacts with first name “John” ?
It seems that there is a persistent issue retrieving the contact list. Unfortunately, I am unable to perform the search for contacts at this moment. If you’d like to retry later or need assistance with something else, please let me know!

Search how many contact i have ?
It seems that there was an issue retrieving your contacts. Please try again later, or I can attempt to fetch the contacts again if you like.

From below screen shown i have :

I do remember last week , when i ask contacts Agent , how many contacts i have , it does reply me i have 800 contacts. I think i need to take break and walk now.

Once again thank you very much for your help. atlest now i can delete Gmail and Calendar,

Paul

1 Like

Hi @Paul_Yeo

Please ensure that you have enabled the following API in GCP:

  • Google People API

According to Google, the “Contacts API” is no longer being developed and you should consider migrating to the People API instead

Regarding the issue with handling contacts and Gemini’s inability to locate the “Contact_ID”:
Gemini appears unable to search for the contact, retrieve its ID, and then delete it.
I’ve tested this several times, so it’s important to provide clear and detailed instructions in the prompt,


Or try another models like deepseek-r1-distill-llama-70b from Groq, which worked perfectly for this task. You might consider using it if you cannot use the OpenAI API.

Below is an example of the working workflow:

@mohamed3nan
When i try to change LLM model from OpenAI to Groq chat model , I get below error msg :

Problem in node ‘AI Agent‘

Cannot read properties of undefined (reading ‘content’)

After i change model to deepseek-r1-distill-llama-70b , the error dis-appear.

But when i did a search again on Search how many contact i have ?

I’m sorry, but I’m unable to retrieve the number of contacts you have at the moment. Please try again later.

When i try turn on “Require Specific Output Format“

[empty]

It return output empty

Just to make sure not due to Goggle contact credential issue , I try to re-create google people credential again ( last week i remember i select google people API )

I still get the same error.

Are you able to using my workflow to test , see it work at your end ?

https://www.dropbox.com/scl/fi/3sxsd6uywfbdzf8eh0af4/T2_Contacts_with_search_n_delete_Groq.json?rlkey=x0v5ux6kt7wqw7gxwjieonoly&dl=0

Above link is my workflow.

Alternative you can share your workflow , let me test , see i can do a search ?

Paul

1 Like

Can you try add a Memory to the AI Agent and try again

@mohamed3nan

Look like now is improve a lot. But for delete still cannot . Most import I can create contact . As now I try for too long , need to set update field to email address, name . Will take a break .
Thank you for your sharing , now I know I can use Groq LLM .
May I know how long you ago you start learn AI Agent ? Are you a software programmer ?

Paul

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.