I have a Scenario wich get the datas from a Webhook ( triggered by post submit action button in Wordpress by Jetforms )to create a google calendar event.
Now i want to update or delete the Google Calendar event from the update Form in Jetform, but everything i tried does not work. Everytime when i update the post – its creating a new post in Google Calendar
If its not working like this – is there maybe a way that i can insert or update a google calendar event in google calendar and it`s also updates the posts in Wordpress / Jetform ?
Need your help please.
Could you send some screenshots of your current automation?
There is something unclear, when you want to update an event you have to call the ad-hoc module:
How do you detect that you want to update or delete an event?
thank you for your help.
Here are some Images attached - what i thought the workflow have to be. My Problem is the Event ID for the update or delete function. I can input the Event ID for one calendar entry only (but of course it`s more then one enty) or i could map it - but i don´t know the code i have to put inside “map” function.
Could you answer these questions:
- do you create events in one or many calendars?
- do you have a data that comes from the webhook and that could be used to identify event?
If you’ve got this selective data and you use only one calendar:
- when you create the event, you create the event and then you could store in a database the couple selective_data/event_ID
- when you want to update, as I assume that you’ve got the selective data, you could access to the database and get the event_ID, then you could update the event in the calendar
- when you want to delete, as I assume that you’ve got the selective data, you could access to the database and get the event_ID, then you could delete the event in the calendar and then delete the couple (selective_data, event_ID).
If you use many calendars, it will be a little bit more complicated…
Thank you for your patience, I have attached the example photos but I have no idea if this is what you mean?
Re 1. I have created events in only one calendar in this example to better understand how it works.
Re 2. I have the Post ID
Using this example, I first want to understand how I can make the simple query that allows me to delete or edit an event.
In fact it gets a bit more complicated, because this is what the automation looks like at the moment (last picture). Here I have an array that arrives through the webhook divided into the different calendars and it works very well.
I had something more basic in mind.
You could also use a Google Sheets (it will be easier than DataStore) with 3 columns :
Calendar_ID (as you can already dispatch the event in different calendars, you’ve already got it)
Post_ID (you’ve got it)
Event_ID (it is given when you create the event).
When you create an event, you simply insert these 3 values in the Google Sheets, after the event creation
When you want to update an event, if I well understand, you’ve got as input data: Calendar_ID and Post_ID, so you can make a request to the Google Sheets, and get the Event_ID, and then you can use it to update the event in the corresponding calendar .
When you want to delete an event, (with the same assumption), you can make a request to the Google Sheets with Calendar_ID and Post_ID, and get the Event_ID, then you delete the event in the corresponding calendar, and then you delete the corresponding row in the Google Sheets.
That’s true the final scenario is already long, if you want to manage create/update/delete for each branch, it will not be easy to test.