Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyaml
pipeline:

 - event.listen:
     eventKey: webhook.lead.created
     
 - iam.run.as: systemuser

 - mail.send:
     to: name@company.tld
     subject: "New lead was created!"
     body: ${@convert.fromBase64(body.payload.origin)}

...

Code Block
languageyaml
pipeline:

 - event.listen:
     eventKey: webhook.lead.created

 - iam.run.as: systemuser

 - mail.send:
     to: name@company.tld
     subject: "New lead was created!"
     body: ${body.payload}

For security reasons, by default, the webhook pipeline is executed with very limited anonymousUser privileges. So, make sure that you use only commands in your pipeline which can be executed by this user. In case you need more privileges, you can use the iam.run.as command as shown in this example to switch to the privileges of the given user before executing the command. See the IAM portal for the permissions (or roles) of a given user. Also see Groups, Roles, and Permissions for more details on user privileges / permissions.

...