Just starting out on using the Api so be gentle
I’ve managed to get an API to write data into a subtable using both fixed text and variables encoded in the body e.g.
{
"Action": "Add",
"Properties": {
"Locale": "en-GB",
"Timezone": "UTC",
},
"Rows": [
{
"Business": "<<[_ThisRow].[BusinessID]>>",
"ContactID": "<<UniqueID()>>",
"ContactCreation": "<<Today()>>",
"ContactMod": "",
"ContactUser": "<<UserEmail()>>",
"Type": "Test",
"Details": "foo",
},
{
"Business": "<<[_ThisRow].[BusinessID]>>",
"ContactID": "<<UniqueID()>>",
"ContactCreation": "<<Today()>>",
"ContactMod": "",
"ContactUser": "<<UserEmail()>>",
"Type": "Test",
"Details": "bar",
}
]
}
what I’m trying to do now is basically the same but for the API to call an action to create the records. I’ve already created a “Add a new row to another table using values from this row”. The action works fine. What I’m struggling with is how to code the body. Since the action already calculates all the values for the row to be created. I’ve tried:
{
"Action": "TestAction2",
"Properties": {
"Locale": "en-GB",
"Timezone": "UTC",
}
{
"Action": "TestAction2",
"Properties": {
"Locale": "en-GB",
"Timezone": "UTC",
},
"Rows": []
}
}
I dont get any errors. I can see the action button triggers the workflow and the workflow reads the right data. But the result in the monitor is
#
3
Name
New process 2-returnStep
Created TimeStamp
23/11/2021, 10:40:30 am
Output data
{}
I need it to work this way (an API calling an existing action) as I have a very complicated action that can create 200+ rows. But its taking 10-20mins!!! to create all those rows. Which isn’t ideal for someone using the app to see 200+ in the sync queue. So my thought was to simply create a trigger that runs a Bot that calls the API that calls the action.
User | Count |
---|---|
25 | |
14 | |
4 | |
3 | |
3 |