So I have an email integration and automation that allows people to reach out and register via email. If they send an email to a given address, I want to automatically create an additional entity and attach any attachments to that newly created entity (not the email):
Somehow in the Add Field section, Files does not appear. Is there any way to do this?
Not a massive thing as we hope to move to a registration form eventually. I assume there’s a cost/benefit trade-off reason in here, just wondering.
The main remaining question for me to use this is, how do I pass the targetEntityId into the script? I think it should exist in [Step 1 Email Message].[Contact].[Public Id] but I’m not sure how to pass it into the script.
(as mentioned elsewhere, the whole scripting interface is unclear to me as the documentation is confusing to me)
The results of previous steps are available in scripts as args.steps which is an array.
So you can examine args.steps[2] to get info about the outcome of step 2.
In your case, to get the id, you probably need something like this: args.steps[2].result.entities[0].id
Admittedly, this capability is not documented very well (at all) so we need to update our user guide, but I’m working on it