Select to view content in your preferred language

Integromat: Send Email, Then Edit a Field to Show Email/Text was Sent?

357
1
01-23-2023 10:53 AM
ArmstKP
Regular Contributor

I am watching edits with Field Maps watch features in Integromat.  If the scenario runs and an email or text is sent, then I want to be able to edit a field to show that it has been sent.

Anybody have any ideas on how I would perform this in Integromat?

1 Reply
jcarlson
MVP Esteemed Contributor

We do something very similar in one of our scenarios! The catch here is that if you're just watching a service webhook, you need some way for your scenario to authenticate in order to edit features (unless the layer is publicly editable). The specifics for that may vary. Ours is part of a larger scenario in which a valid token is already present when the scenario runs, but you may be able to acquire one by making additional HTTP requests in your scenario.

You need to create an HTTP request like this:

  • URL: the feature service URL
  • Method: POST
  • Body type: multipart/form-data
  • Fields
    • 1
      • Field type: text
      • Key: token
      • Value: a valid token string
    • 2
      • Field type: text
      • Key: f
      • Value: json
    • 3
      • Field type: text
      • Key: returnEditMoment
      • Value: false
    • 4
      • Field Type: text
      • Key: features
      • Value: [{"attributes":{"objectid":<the objectid of the feature from your webhook>, "attribute_you_edit":"new value"}}]

And that will edit the feature accordingly. You'll want to put it behind a condition / filter in your scenario so that it only makes the edit after the message is successfully sent, but that's simple enough.

- Josh Carlson
Kendall County GIS