FORM_URL_ENCODED body and the "&" character is breacking the url

Hi,

I’m using une of the proposed file formats to send a PDF file through whatsapp: https://drive.google.com/uc?export=view&id={fileID}
The problem is that I’m using it on a FORM_URL_ENCODED body and the “&” character is breacking the url.

This is the Body content:

To=whatsapp:<<[Teléfono]>>&From=whatsapp:160XXXXXXXX&Body=Hola! Hay una nueva orden de trabajo para usted.&MediaUrl=https://drive.google.com/uc?export=view&id=<<[File ID]>>

How can I avoid the & character to split the URL?

Tanks,

Joaquin.

I don’t follow what the issue is or how you think it needs to be solved. Nonetheless, in case it’s helpful and you didn’t already realize, you can certainly create multiple ENCODEURL expressions separated by non-encoded text if you need to experiment putting any of the following (or other elements) either within or between encoded elements:

  • &
  • fileid=
  • <<[File ID]>>
1 Like

Thanks for the answer, the thing is that is a FORM_URL_ENCODED template, so all the content is URL encoded

Then maybe you need to remove your ENCODEURL function to avoid double-encoding?

1 Like

I’m not using ENCODEURL

This is the Body content:

To=whatsapp:<<[Teléfono]>>&From=whatsapp:160XXXXXXXX&Body=Hola! Hay una nueva orden de trabajo para usted.&MediaUrl=https://drive.google.com/uc?export=view&id=<<[File ID]>>

OK. ICYMI, your screenshot indeed includes ENCODEURL.

1 Like

Yes, because it needs to de encoded, but I’m not using encode in the body.

Selecting JSON as HTTP Content Type and the following content in the body doesn´t work either:

{
“To”: “<<ENCODEURL([Teléfono])>>”,
“From”: “<<ENCODEURL(whatsapp:16075272757)>>”,
“Body”: “<<ENCODEURL(Hola! Hay una nueva orden de trabajo para usted.)>>”,
“MediaUrl”: “<<ENCODEURL(CONCATENATE(“https://drive.google.com/uc?export=view&id=”,[File ID]))>>”
}

To=whatsapp:<<[Teléfono]>>&From=whatsapp:16075272757&Body=Hola! Hay una nueva orden de trabajo para usted.&MediaUrl=https://drive.google.com/uc?export=view<<ENCODEURL(“&”)>>id=<<[File ID]>>