Skip to Content

Fill a text template

Replaces template tags like {{ input name type="string" }} with actual values.

Billable OperationProviderBilling Mode
Docs
Connection
Docs
Cost per operation
Docs
template-fill
P
pipe0
Always
Managed

0.00 credits

const options = {
  method: 'POST',
  headers: {'content-type': 'application/json', authorization: 'Bearer <TOKEN>'},
  body: JSON.stringify({
    config: {environment: 'production'},
    pipes: [
      {
        pipe_id: 'template:fill@1',
        config: {
          template: 'Hey team: A new user has just signed up. Here\'s the info:\n**Name**: {{ input name type="string" }}\n**Email**: {{ input email type="string" }}\n'
        }
      }
    ],
    input: [{id: '1', name: 'John', email: 'john@pipe0.com'}]
  })
};

fetch('https://api.pipe0.com/v1/pipes/run', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));