I’m using Zapier’s RSS trigger and webhook action. I want to add an extra key-value pair to the raw data from the RSS feed. But I’m stuck.
If I don’t put anything in the data field, I get all the RSS info. But I need to add one more thing to it. Like this:
{
"title": "Some RSS post",
"published": "2023-05-10",
"link": "https://example.com/post",
"custom_field": "my_value" // This is what I want to add
}
When I try to add the custom field in the data box, it overwrites everything else. How can I keep all the RSS stuff and add my own field too? Help!
I’ve faced a similar challenge with Zapier’s RSS and webhook setup. Here’s what worked for me:
Instead of using the standard webhook action, try the ‘Custom Request’ action in Zapier. This gives you more control over the data structure.
In the ‘Custom Request’ action, set the method to POST and the URL to your webhook endpoint. For the data, use a combination of the RSS fields and your custom field like this:
{
…webhook.data,
“custom_field”: “my_value”
}
The ‘…webhook.data’ part spreads all the existing RSS data, and then you can add your custom field after it. This approach preserves all the original RSS data while allowing you to inject your additional key-value pair. It took me some trial and error, but it’s been working flawlessly for my photography blog feeds. Hope this helps!
I encountered a similar issue when setting up my RSS-to-webhook workflow. A solution that worked for me was to use Zapier’s Formatter action before the webhook step.
After your RSS trigger, add a Formatter step and choose the Utilities transform type with JSON as the action event. Then, in the Value field, combine all your RSS data with the custom field you want to add so that the original data remains intact while your additional key-value pair is merged in.
This approach has been reliable and more straightforward than coding a custom solution. Give it a try and see if it resolves your issue.
hey mandy, i had the same prob. try using zapier’s ‘code’ action instead. u can write a lil javascript to merge the RSS data with ur custom field. something like:
output = {…inputData, custom_field: ‘my_value’};
works like a charm for me. good luck!