Skip to main content
Question

How can I use variables in the "Body" section of the "App Extensions" in Zapier?


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

 

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

9 replies

Troy Tessalone
Forum|alt.badge.img+14

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


  • Author
  • New
  • 2 replies
  • October 24, 2023

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

 


Troy Tessalone
Forum|alt.badge.img+14

@Artem2266 

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


  • Author
  • New
  • 2 replies
  • October 24, 2023

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

 


Troy Tessalone
Forum|alt.badge.img+14

@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.

 

 


  • New
  • 2 replies
  • October 26, 2023

@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.

 


Troy Tessalone
Forum|alt.badge.img+14

@jakobbott 

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


Troy Tessalone
Forum|alt.badge.img+14

@Artem2266 and @jakobbott 

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

 


  • New
  • 2 replies
  • October 27, 2023

@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.