This topic contains 15 replies, has 3 voices, and was last updated by admin 6 years, 3 months ago.
-
AuthorPosts
-
June 13, 2018 at 8:43 pm #74997
Justin CloseHi again,
I’m working with fmGateway. I was hoping you could give me a bit of guidance. I’m trying to do an fmGateway ‘Find records’ action, based on a TimeStamp field. Ultimately, I’m looking to find records that were modified in the past hour, and send a Slack message for each of those records found.
I set up a Zapier Date/Time step to get the current timestamp, subtract an hour and format it as “MM/DD/YYYY H:mm:s”. That seems to work. But when I build the fmGateway Find routine and define the criteria for the find as this (not sure if this image will come through):
… and run the test, it is returning me records that don’t have any value defined in the Z_StatusModifiedTS field. (I think it’s returning all records because the sample record I get back is the first one in the table.) “Step 3” in this example is the Zapier Date Formatting step. The test data there is the output of my formatting.
I have also tried hard-coding in various search strings into the Zapier fmGateway definition field, but that seems to get the same results.
Thanks,
Justin
-
June 14, 2018 at 12:07 pm #74998
-
June 14, 2018 at 2:47 pm #75000
I did some further testing. I am able to query my DB directly via the DataAPI (using Postman) with this query criteria:
{“z_StatusModifiedTS”: “>=06/14/2018 09:10:00”}
But when I try this string in the “z_StatusModifiedTS” configuration field of the fmGateway Zap…
>=06/14/2018 09:10:00
…the test record returned is the first one in the table and does not match the Find criteria. (When I put quotes around it, it was giving me an error.)
Is this just an artifact of the Zap test step – it’s not really fully running the query?
I’ve enabled the Zap and will see if things work as hoped; it should run in about 15 minutes.
-
June 15, 2018 at 12:35 pm #75001
Well, it’s probably not an issue of just being done in the test sandbox – when I run this Zap from the dashboard (or when it ran automatically) it also only gave me information from the first record in the table – which shouldn’t have been returned by the Find query.
So that seems to leave fmGateway as the only remaining variable. I’m pretty sure that I have configured things correctly in the Zapier config page for the Find query…
-
June 15, 2018 at 1:12 pm #75002
Hi Justin –
There was in fact an error in how searches were performed.
We just fixed it and resubmitted the app. Thanks for troubleshooting it – I hope it wasn’t terribly inconvenient. This was a new feature we just added to the app and apparently didn’t work out all the kinks.
I expect the new version to be up within 24 hrs – they’re usually pretty quick about updating it.
-
June 15, 2018 at 1:20 pm #75003
Cool! Glad there was a specific issue. I’ll keep testing it an see how it goes. (I don’t suppose that there’s anyway for me to explicitly test/see what version of fmGateway I’m getting?)
-
June 15, 2018 at 1:28 pm #75004
I’m afraid I don’t have an answer for that. Sorry!
-
June 15, 2018 at 1:28 pm #75005
Woot! It looks like it has already been updated. When I tested it I got one of the records that I expected. Excellent!
As a side note – do you have any tips for getting the Zap to iterate over multiple records returned from this Find? I’ve just started looking into it.
- This reply was modified 6 years, 4 months ago by JustinC.
-
June 15, 2018 at 3:39 pm #75007
I haven’t found a Zapier specific looping construct. But curiously, using the fmGateway ‘New Records’ action, I do get separate messages for each new record that it found. I’m testing that with a ‘Find’ operation. (Up to now, I haven’t gotten multiple messages as a result of multiple found records.)
-
June 15, 2018 at 3:41 pm #75008
Sorry, Justin. You lost me.
-
June 15, 2018 at 4:20 pm #75009
When I set up a Zap using fmGateway’s ‘New Records’ step, it did send a separate Slack message for each new record that it found.
I have not been able to find a specific Zapier ‘app’/action that would explicitly loop over the results from a previous Step and feed those results into a different Step, one at a time.
<span style=”caret-color: #000000; color: #000000; font-family: -webkit-standard; font-size: medium;”>In my original testing, if my Find step (using fmGateway) returned multiple records, a follow-on Action step (e.g. send Slack direct message), would only send 1 message. I would like it to send a separate message, 1 per each record found, using data from within each record of the found set.</span>
-
June 15, 2018 at 4:39 pm #75010
Typically the way Zapier works is it runs the action for each record returned. So you don’t need to explicitly loop over anything.
There was an error in the old search method so only one record (and the wrong record at that) was returned. It should work as expected now.
-
June 18, 2018 at 11:27 am #75013
Do you know if that behavior, running the ‘action’ for every record, only applies to the Trigger event’s records?
When I do a Schedule -> fmGateway Find -> Slack DM Zap I’m only getting 1 message. When I test the same Find query using Postman, I get 6 records back from the Data API. So I would assume that the fmGateway Find results in the same record count. Unfortunately I’m only getting 1 Slack message out of it.
Here’s the outline of the Zap (attached).
Attachments:
You must be logged in to view attached files. -
June 19, 2018 at 11:44 am #75015
Justin – you are so right!
The search mechanism from Zapier was intended to find a specific record to fill in details during a workflow – not to trigger as new records are created. I apologize for the confusion.
We added a new TRIGGER to perform an action when new records match your request. Give that a shot and let me know how it works for you.
Thanks
Attachments:
You must be logged in to view attached files. -
June 19, 2018 at 5:36 pm #75017
I haven’t been able to test it yet – but is there a way to just do a straight up Find as the ‘Trigger’? That is, a Find that doesn’t also require that it be ‘new’?
The goal I was attempting to achieve was to find records that had been modified within a certain time frame (e.g. the past hour). If I can only search amongst ‘new’ records, then that excludes records that were simply modified, of course.
-
June 19, 2018 at 6:19 pm #75019
It may require some testing and some tweaking.
Typically, Zapier does remember records it’s already “seen” as part of that Zap. So if the record has already been processed, Zapier will probably ignore it. So if you want to re-process records that were modified again, I’m not sure if that will work – I’d love to hear your test results though.
I can look to see if there’s a way around that. Right now we’re keying on FileMaker’s built-in record id. Perhaps allowing you to define your own record ID field would allow you to re-process existing records. It’s something we were considering.
-
AuthorPosts
You must be logged in to reply to this topic.