Search code examples
triggersgmailactionwebhookszapier

Is there some way to use Zapier code to transform data from a trigger before it passes to an action?


There are several instances where the values from a Zapier trigger need to be parsed or cleaned up before they can be used by a Zapier action. I can get halfway there by using Zapier code as an action but I don't see a way to turn around and have it also behave as a trigger.

As an example, say that I have a GMail trigger that I want to feed into my CRM system. The fields needed for the CRM system are contained in the body of the email. In this case I would want to send the email body to a Zapier code action to parse the values I need from the email body and add them as field to the output object. Next I need some way for the output to trigger the CRM action.

Does anyone know of a way to accomplish this?


Solution

  • Since asking this question, Zapier has released Multi-Step Zaps. This enables you to chain actions together. This is critical as they also provide a "Code" Zap that enables the developer to create javascript code that will take as input any of the fields of the previous zaps in the flow and can output virtually anything you want using Javascript.