Get random record from database with Zapier - zapier

I want to build an action in Zapier that winds up sending a random email. The body of the email would be randomly pulled from any source that would be appropriate for storing HTML. I was thinking Google Sheets or Knack.
My problem is, I can't figure out how to ask Zapier to get a random record from the source.
Have any of you done something similar?

David here, from the Zapier Platform team.
It really depends on how you store that data. Your first step is probably to add a code step that generates a random integer. From there, you need a way to turn that id into a piece of data. In the case of sheets, you could put each HTML in a row and give it an "id" of an integer. Then, do a search to find the row with the random ID and pull the data out of that row.
Alternatively (depending on how much data you're storing), you could use Storage by Zapier and a code step to do the whole process.
Hopefully that points you in the right direction!

Related

How to make google form responses submit to bottom of spreadsheet and not ignore manually entered data in the spreadsheet

I have a spreadsheet with responses from a form, but occasionally we manually enter responses into the spreadsheet that do not come in through the google form. I would like these to remain in order with the form responses, but when a google form is submitted it inserts the next form response after the last form response and shifts the manually entered data on the spreadsheet down.
Is there a way I can get the manually entered data to be recognized when the form submits and always append the latest form response to the bottom of the spreadsheet?
I followed this answer here but it doesnt work for me, it still ignores manual entries. Any help is appreciated.
You cannot have automated data and manually entered data in the same range.
For instance, if you use an array formula on a sheet in in B:B, the array formula "owns" B:B. If you then enter manual data anywhere in B:B, you will "break" the array, all of your formula data will disappear and the original formula cell will show an error. Think of that error as Google Sheets' way of saying, "Looks like you decided that you want to use this range for manual data now instead of formula-produced data, so it appears your formula is now not what you want."
The same concept is true for form integration. A form does not "read" cell from your Google Sheet. It just outputs data to it. It's a one-way conversation, so to speak. As such, the form doesn't know what else you are doing on the form-data intake sheet. It only knows how to find the information that marks where it left off with the last submission; and then its instructions are to enter a new line below that point for the next new submission.
In other words, a form "owns" the sheet you integrate it with. And the form will do what it is programmed to do, regardless of whether you try to also "own" that sheet by typing into in manually.
The simple solution: always use your form to enter data.
If you say to yourself, "But using the form is more work than manual entry," it's time to rethink your form and your user experience, since forms are meant to make data entry easier than manual entry into the spreadsheet, not harder.
This sounds plain, but i keyed in the timestamps columns of manually entered data to any earlier date and sorted the data by timestamp. the new data from the form would populate the bottom rows after
however new responses doesn't take your formats n formulas..maybe u have to export it for calculations etc
hope this helps

Zapier to Monday.com, is there a way to retrieve or save the numerical monday pulse ID to reference later?

So I have an asknicely.com board that we get customer survey responses from.
I have a Monday.com board where I track these responses and our follow ups for management.
I am using a zapier zap, that filters the responses, that works. BUT it currently puts all the data I want into a new pulse in the first column only. Someone has to move it all manually into each column (me) after it arrives.
I am trying to develop a new zap that creates the pulse then puts the data into the correct columns. I have a zapier structure like this.
When this happens … New Response in AskNicely
Do this … New Pulse on a Board in monday.com
Do this … Update column B in Monday.com
Do this … Update column C in Monday.com
... etc.
My issue is that in order to update a now existing pulse (3 onwards) I have to populate Pulse Id1 2 3 field which accepts only a number.
Here are my questions;
Can I get Zapier to "catch" the pulse ID upon creation so I can save and reference it later?
Or can I retrieve the numerical pulse ID by searching with the text field I first created the pulse with? pulses.getID().contains(someaskicelyTextField);
Or lastly, is there a better approach to this than the one Im using?
I have a java background and its frustrating using these visual widgets instead of working in the actual code to do the above. I am new to both products so if this has been asked before I apologize.
spencemw, you can get the pulseID when you configure the zap.
On the 'Update column value' step, on the item ID, reference the parameter from the previous step.
(Make sure to click the 'show all options')
#Roy Nevo answered. Here are the screen shots for finding the data I was looking for.

Advance Search : Airtable to Zapier

this is my first post!
We want to create an airtable integration: when an ID in a certain column is an ODD number, so we will automatically update the STATUS for another column. Have googled and searched but perhaps couldn't find the right answer, especially for the Search Formula field. Appreciate any help for this!
Huge Thanks!
Within your Airtable table, you can create a new formula field called "Is Odd." The formula within that field would then be IF(MOD({ID}, 2) = 1, "True", "False"). If the ID field mod 2 is equal to 1, then the field is odd, otherwise, it is not.
You could just use this Airtable formula logic to assign a status. Change "True" and "False" to whatever your status values are. You can then group, filter and sort your records based on the values in that field. For more info on Airtable formulas: https://support.airtable.com/hc/en-us/articles/203255215-Formula-Field-Reference
If you really need to continue with Zapier, you have a couple of different options for how to proceed. One way would be to use the "Path" helper step to split your workflow. Zapier should follow Path A if the Is Odd field of the record is equal to the string True and Path B if the field is equal to the string False. Down each path, you can then use the Update Record Airtable action to update the record with the correct status. The "Path" step requires a "Professional" account with Zapier.
The other option requires a "Pro" account (which is cheaper than a Professional account). You can create two different Zaps, one for Odd IDs and one for Even IDs. Use the Filter helper step in Zapier to then only execute the Odd Zap if Is Odd is equal to the string True and the Even Zap if Is Odd is equal to the string False. Each Zap can then use the Update Record Airtable action to update the record with the correct status.
I definitely recommend using functions within Airtable to manage this. No reason to include a third party if you don't have to!

OnEdit or Time based triggers to check one cell then edit another

My scripting skills are not the greatest but I can not figure out how to accomplish what I need to with just functions inside of Google Sheets.
My sheet looks something like this: https://docs.google.com/spreadsheets/d/1R6YJIR37wtOt8ZknSdMQPFFp0Llf_LHpmGCV32iQY00/edit#gid=1213399830
I have form responses being brought into the second tab via the Indirect function and are then modified with a ArrayFormula function to convert everything to the correct unit of measure and the summed to keep everything on the same row. All of this could be altered if needed.
I then have a column that is totaling inputs in other columns to give me my on hand inventory. We'll call this TotalsColumn.
What I am attempting to achieve is to make a script that checks the form responses, then either with:
OnEdit (which if I understand correctly does not work for information being ported in) and then alter the corresponding cell in the TotalsColumn.
or if not possible, then
With a time based trigger checking the ported information to see if there is a new entry if I don't sum it with a last function or something, or if the information remains summed (which seems easier to me) then to check if the sum is greater than it was last time it was checked and alter TotalsColumn.
The alter to the TotalsColumn, regardless of which method used, will always be a static number and I am pretty sure I'll need to make a script for each of my different inventory items but that's fine if I can just figure out a way of making this happen.
Thank for your time and any information you can provide.
Please feel free to point me to another thread where I can start to piece together a solution, I just could not find anything that related closely enough to my question or find a good jumping off point.
What happens in this situation?

Append Query That Also Selects A Lookup Table Value Based On Text Parsing?

I've posted a demo Access db at http://www.derekbeck.com/Database0.accdb . I'm using Access 2007.
I am importing an excel spreadsheet, which my organization gets weekly, importing it into Access. It gets imported the table [imported Task list]. From there, an append query reformats it and appends it to my [Master Task List] table.
Previously, we have had a form, where we would manually go through the newest imports, and manually select whether our department was the primary POC for a tasking. I want to automate this.
What syntax do I require, such that the append query will parse the text from [imported Task list].[Department], searching for those divisions listed on [OurDepartments] table (those parts of our company for which we are tracking these tasks), and then select the appropriate Lookup field (connected to [OurDepartments] table) in our [Master Task List] table?
I know that's a mouth full... Put another way, I want the append query update the [Master Task List].[OurDepartments], which is a lookup, based on parsing the text of [imported Task list].[Department].
Note the tricky element: we have to parse the text for "BA" as well as "BAD", "BAC", etc. The shorter "BA" might be an interesting issue for this query.
Hoping for a Non-VBA solution.
Thanks for taking a look!
Derek
PS: Would be very helpful if anyone might be able to respond within the work week. Thx!
The answer is here: http://www.utteraccess.com/forum/Append-Query-Selects-L-t1984607.html

Resources