I’ve been using the python Google cloudsDNS api to create spf records. The problem was that the TXT record was splitting the value on spaces, which breaks everything. Super fun stuff. Anyways, I spent way to long figuring out what the heck was going on.
Obviously (read with sarcasm), you need to wrap the value in an extra quote. I guess cloudDNS likes TXT records to be lists of string. Heres a code snippet for the off chance someone reads this while tackling the same problem.