Question

Custom MySQL insert alternative (replace into)

  • 1 September 2023
  • 4 replies
  • 62 views

Rather simple - most DBs allow an UPSERT or REPLACE command. 

It is insert if not found or update if found.

It is rather bothersome that Zapier has not added such a simple action and instead advices using a search and path type of workflow. Why in the world would one want to use 3-4 tasks to do what a single SQL statement can do in ANY modern DBMS? 

I assume it is because allowing an UPSERT (REPLACE INTO)  uses only 1 tasks and  SELECT (search) → PATH → INSERT or UPDATE takes 3 tasks instead of 1.  

REPLACE INTO please!!!!

Or at least allow us to write a custom Query.  The Custom Search query will not work because an update or insert does not “return” a row and therefore generates an error. 

This is bare bone basic SQL - come on Zapier - at least provide basic SQL functionality.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +14

@NoLogic 

For context, there is no UPSERT Zap action for Airtable, altho the Airtable API supports it: https://community.airtable.com/t5/development-apis/new-beta-rest-api-upserts/td-p/51628

Userlevel 7
Badge +14

@NoLogic 

Many Zap apps have Find else Create logic.

 

 

That is a fools errand and we both know it. 

1- Public eyes and conversations move needles. Feedback and “feature requests” are a bottomless pits, not even needle in a haystack hopes.

2 - Zapier sells tasks and their way takes, at a minimum 3x the tasks (read costs 3 times as much per record), compared to the accepted SQL method. 

3- This is a SIMPLE sql action that is literally an exact copy of INSERT with the word changed to REPLACE. It would take likely take a Zapier dev no more than a few minutes to copy, edit, test and publish the new action… but see point #2 and then consider point #1 to ice the cake. 

 

Userlevel 7
Badge +14

Hi @NoLogic 

Best to submit feedback and feature request via a ticket to Zapier Support to be properly logged: https://zapier.com/app/get-help