Help

How to send line breaks to webhook

Topic Labels: Automations Community
729 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Christina_K
4 - Data Explorer
4 - Data Explorer

Hi I'm not a programmer so bear with me, i found a script online that can send information to a webhook for another automation.

i have defined the following fields in the input.config( ) panel

numbers (works)

message (this is a block of text with line breaks)

Script:

let url = "webhook url"; // Replace the [ZapWebhook] with the webhook provided from the Zap Trigger step.

let config = input.config(); // This allows the Input Variables to be used in the code.

await fetch(url + "?number=+" + config.numbers + "&text=" + config.message);
 
this all works but my question is in my config.message - how can i send it with the formatting and line breaks? right now its a big block of text without line breaks when its sent to the webhook
1 Reply 1

I see that you are using Zapier. While my instructions below will work with Zapier, I would very very strongly recommend that you switch to Make’s webhooks instead of Zapier’s webhooks.

Make is significantly cheaper than Zapier, yet it is INFINITELY more powerful and customizable than Zapier. I’ve written an entire post here about Make vs. Zapier.

The easiest solution for you would be to simply send the Airtable Record ID to Make, and then have Make grab all of the Airtable record data for you — which will bring in all of the line breaks.

I describe how to do that in this thread: Sending Airtable data to a webhook.

I also give an advanced lesson on webhooks in this episode of the BuiltOnAir podcast.

Additionally, to learn more about using Make, I created this basic Make training video.

p.s. If you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consultant — ScottWorld