Hello, I have looking around for the past few days trying to figure out how I can create a rule that will fire off one of my feeds importers.

The closest thing I found was

<?php
FeedsParser::parse(FeedsSource $source, FeedsFetcherResult $fetcher_result);
FeedsProcessor::process(FeedsSource $source, FeedsParserResult $parser_result);
?>

but I have been unable to get that to work. If I have a feed named Test Feed how can I get rules to trigger it so it imports data.

Thanks so much.

Comments

hampshire’s picture

Can it not be done? Is anyone doing something like this?

Jason Dean’s picture

I'd be really interested to know this too :)

OldAccount’s picture

Status: Active » Closed (duplicate)
tuccio’s picture

Status: Closed (duplicate) » Active

What's being asked here is an action to trigger a Feeds import. It does not appear to me that the other thread is discussing the same issue. I need an action component that initiates a Feeds import possibly passing parameters such as the file to be imported and other settings. Or am I missing something?

tuccio’s picture

sorry for the duplicate post

timb’s picture

I would also like to know how to do this. I currently have a feed in a standalone form that I would like to be able to configure and fire with rules.

tuccio’s picture

Hi, I think I am now able to fire an import from Rules with some php code. I followed this tutorial: http://nodesforbreakfast.com/article/2012/09/23/programmatically-execute...

clemens.tolboom’s picture

Following along https://drupal.org/node/622700 "Programmatic operations" and to extend this to rules enable PHP Input filter and create a new PHP action component with 2 or 3 arguments $type, $title and $uri containing this snippet

$node = new stdClass();
$node->type = $type;
$node->title = $title;
$node->feeds['FeedsHTTPFetcher']['source'] = $uri;
node_save($node);

Now you can use this action component for your rules to trigger imports.

clemens.tolboom’s picture

Status: Active » Fixed

I've added #8 to the developer documentation https://drupal.org/node/622700.

Please edit over there your experiences ;)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.