Skip to main content

Hi, how can I use variables in “Body” section in “App Extensions”? I tried curly braces {{title}} but it doesn’t work for me. All variables are defined and filled in zap. Thank you

 

Hi @Artem2266 

Good question.

When you select the App Extension action you created in the Zap step, you can then map dynamic variables.

Help: https://help.zapier.com/hc/en-us/articles/16276574838925-App-Extensions-in-Zapier


Variables are mapped, but api request to Klaviyo doesn’t work if I use variables like {{variableName}}, it only works if I put static data instead of variables for testing purposes

 


@Artem2266 

Can you elaborate by what you mean for when it does and doesn’t work? (screenshots, errors, etc.)


Okay, let’s simplify my question: does variable in request body supposed to work? If yes - what is the right syntax? Please refer my screenshot: if I put static title - zap works; if I put variable - zap crashes

 


@Artem2266

e.g. In the App Ext config, the {{Title}} placeholder value becomes the mapped variable value for the Title field in the Zap step config.

 

 


@Troy Tessalone, it seems that Zapier is not resolving the Variables. Wordpress returns an Invalid Json Body error everytime I add a variable to my body. 
Example:

"expireType":{{expiration_date_type}},

doesnt work, but 

"expireType":"draft",

works completely fine.

I believe that its the same error @Artem2266 is getting.

Error I get when I have a variable in my Body:

Failed to create an app extensions in WordPress
Raw request failed. Problem executing your request: WordPress ran into an issue. Error code 400: Invalid JSON body.

 


@jakobbott 

Probably best to submit a ticket to Zapier Support: https://zapier.com/app/get-help


@Artem2266 and @jakobbott 

Another option is to try using this Zap action: WordPress - API Request

 


@Troy Tessalone, yeah seams like its time for the Support. 
Because I just wanted the App Extension for easy reusability, Im probably going to go smooth out my prototype Code Action and just go with it. 
Anyway, thank you a lot for the Idea.